From a24f5b41072a5c21990b01e2deec832cca3dbb1c Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 7 Nov 2022 12:46:32 -0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20improve=20host-sets/new?= =?UTF-8?q?=20titling=20-=20icu-6721=20(#1418)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: icu-6721 --- addons/core/translations/resources/en-us.yaml | 2 ++ .../host-sets/new/header/index.hbs | 5 +++-- .../host-catalog/host-sets/new.js | 18 ++++++++++++++++++ .../host-catalog/host-sets/new-test.js | 17 +++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 ui/admin/app/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/new.js create mode 100644 ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/new-test.js diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index f9422c3ff..d59c3dbe2 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -111,6 +111,8 @@ host-set: title: Host Set title_plural: Host Sets description: A host set is a collection of hosts within a host catalog. + titles: + new: New Host Set actions: add: Add Host Set create: New Host Set diff --git a/ui/admin/app/components/host-catalogs/host-catalog/host-sets/new/header/index.hbs b/ui/admin/app/components/host-catalogs/host-catalog/host-sets/new/header/index.hbs index 490891bfc..804d6d391 100644 --- a/ui/admin/app/components/host-catalogs/host-catalog/host-sets/new/header/index.hbs +++ b/ui/admin/app/components/host-catalogs/host-catalog/host-sets/new/header/index.hbs @@ -1,4 +1,5 @@

- {{t 'titles.new'}} + {{t 'resources.host-set.titles.new'}} -

\ No newline at end of file + +

{{t 'resources.host-set.description'}}

\ No newline at end of file diff --git a/ui/admin/app/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/new.js b/ui/admin/app/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/new.js new file mode 100644 index 000000000..776bcf058 --- /dev/null +++ b/ui/admin/app/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/new.js @@ -0,0 +1,18 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewController extends Controller { + // =services + + @service intl; + + // =attributes + + /** + * Translated roles breadcrumb + * @type {string} + */ + get breadCrumb() { + return this.intl.t('resources.host-set.titles.new'); + } +} diff --git a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/new-test.js b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/new-test.js new file mode 100644 index 000000000..4e5c86ba4 --- /dev/null +++ b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/new-test.js @@ -0,0 +1,17 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module( + 'Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/new', + function (hooks) { + setupTest(hooks); + + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/host-catalogs/host-catalog/host-sets/new' + ); + assert.ok(controller); + }); + } +);