From 0e4f8718a284afd9cc76490b7519c366b7347b49 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 09:15:11 -0800 Subject: [PATCH 1/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20updates=20to=20labe?= =?UTF-8?q?ls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 2 +- .../host-catalog/host-sets/host-set/hosts.hbs | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 29bd6c7a3..e7f2737dd 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -89,7 +89,7 @@ host-catalog: label: Static help: Provide a list of hosts and host sets with static addresses unknown: - label: Unknown + label: Plugin aws: label: AWS azure: diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs index 9bcbe0fd4..bc3251dfd 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs @@ -26,7 +26,21 @@

{{host.description}}

- {{host.type}} + {{#if host.isStatic}} + + {{t (concat 'resources.host.types.' host.compositeType)}} + + {{else}} + + {{t (concat 'resources.host.types.' host.compositeType)}} + + {{/if}} Date: Mon, 14 Feb 2022 11:21:14 -0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20=F0=9F=90=9B=20remove=20duplicate=20?= =?UTF-8?q?types=20from=20host/host-set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 20 ------------------- .../components/form/host-set/aws/index.hbs | 2 +- .../components/form/host-set/azure/index.hbs | 2 +- .../app/components/form/host/aws/index.hbs | 2 +- .../app/components/form/host/azure/index.hbs | 2 +- .../form/target/add-host-sets/index.hbs | 2 +- .../host-catalog/host-sets/host-set/hosts.hbs | 12 +++++++++-- .../host-catalog/host-sets/index.hbs | 8 ++++++-- .../host-catalog/hosts/index.hbs | 8 ++++++-- .../scope/targets/target/host-sources.hbs | 2 +- 10 files changed, 28 insertions(+), 32 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 63387fdf1..8d4a00641 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -121,16 +121,6 @@ host-set: add-none: title: No Hosts Available description: No hosts available for selection. - types: - static: - label: Static - help: Provide a list of hosts and host sets with static addresses - unknown: - label: Unknown - aws: - label: AWS - azure: - label: Azure host: title: Host title_plural: Hosts @@ -148,16 +138,6 @@ host: add: Add Host create: New Host delete: Delete Host - types: - static: - label: Static - help: Provide a list of hosts and host sets with static addresses - unknown: - label: Unknown - aws: - label: AWS - azure: - label: Azure session: title: Session title_plural: Sessions diff --git a/ui/admin/app/components/form/host-set/aws/index.hbs b/ui/admin/app/components/form/host-set/aws/index.hbs index 6e2529a60..d61cdc0de 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -65,7 +65,7 @@ as |radioGroup| > {{hostSet.name}} {{t - (concat 'resources.host-set.types.' hostSet.type) + (concat 'resources.host-catalog.types.' hostSet.type) }} diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs index bc3251dfd..f854d86e0 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts.hbs @@ -28,7 +28,11 @@ {{#if host.isStatic}} - {{t (concat 'resources.host.types.' host.compositeType)}} + {{t + (concat + 'resources.host-catalog.types.' host.compositeType '.label' + ) + }} {{else}} - {{t (concat 'resources.host.types.' host.compositeType)}} + {{t + (concat + 'resources.host-catalog.types.' host.compositeType '.label' + ) + }} {{/if}} diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/index.hbs index 50188d665..8a949544c 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/index.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/index.hbs @@ -29,7 +29,9 @@ {{t (concat - 'resources.host-set.types.' hostSet.compositeType '.label' + 'resources.host-catalog.types.' + hostSet.compositeType + '.label' ) }} @@ -43,7 +45,9 @@ > {{t (concat - 'resources.host-set.types.' hostSet.compositeType '.label' + 'resources.host-catalog.types.' + hostSet.compositeType + '.label' ) }} diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs index ee8f060cd..8877b6ea1 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs @@ -30,7 +30,9 @@ {{#if host.isStatic}} {{t - (concat 'resources.host.types.' host.compositeType '.label') + (concat + 'resources.host-catalog.types.' host.compositeType '.label' + ) }} {{else}} @@ -42,7 +44,9 @@ }} > {{t - (concat 'resources.host.types.' host.compositeType '.label') + (concat + 'resources.host-catalog.types.' host.compositeType '.label' + ) }} {{/if}} diff --git a/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs index 9a7c0ce5b..eefbb0e64 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs @@ -39,7 +39,7 @@ {{t - (concat 'resources.host-set.types.' hostSet.model.type) + (concat 'resources.host-catalog.types.' hostSet.model.type) }} From 4e513cbb9f5eb7c8a4f0d261c08a9e0a6c7724e1 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 11:39:06 -0800 Subject: [PATCH 3/7] translations --- ui/admin/app/components/form/target/add-host-sets/index.hbs | 2 +- .../app/templates/scopes/scope/targets/target/host-sources.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/components/form/target/add-host-sets/index.hbs b/ui/admin/app/components/form/target/add-host-sets/index.hbs index f80b4c673..b96753741 100644 --- a/ui/admin/app/components/form/target/add-host-sets/index.hbs +++ b/ui/admin/app/components/form/target/add-host-sets/index.hbs @@ -35,7 +35,7 @@ {{hostSet.name}} {{t - (concat 'resources.host-catalog.types.' hostSet.type) + (concat 'resources.host-catalog.types.' hostSet.type '.label') }} diff --git a/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs index eefbb0e64..be374ae3d 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs @@ -39,7 +39,7 @@ {{t - (concat 'resources.host-catalog.types.' hostSet.model.type) + (concat 'resources.host-catalog.types.' hostSet.model.type '.label') }} From 616c7c73fbdc07418e8f8154a1d4f189f46bf8f7 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 13:37:30 -0800 Subject: [PATCH 4/7] =?UTF-8?q?fix:=20=F0=9F=90=9B=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/target/add-host-sets/index.hbs | 32 ++++++++++++++++--- .../scope/targets/target/host-sources.hbs | 31 ++++++++++++++++-- 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/ui/admin/app/components/form/target/add-host-sets/index.hbs b/ui/admin/app/components/form/target/add-host-sets/index.hbs index b96753741..241489b42 100644 --- a/ui/admin/app/components/form/target/add-host-sets/index.hbs +++ b/ui/admin/app/components/form/target/add-host-sets/index.hbs @@ -33,11 +33,33 @@ /> {{hostSet.name}} - - {{t - (concat 'resources.host-catalog.types.' hostSet.type '.label') - }} - + {{#if hostSet.isPlugin}} + + {{t + (concat + 'resources.host-catalog.types.' + hostSet.compositeType + '.label' + ) + }} + + {{else}} + + {{t + (concat + 'resources.host-catalog.types.' + hostSet.compositeType + '.label' + ) + }} + + {{/if}} {{hostSet.host_catalog_id}} diff --git a/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs index be374ae3d..3dce601fb 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/host-sources.hbs @@ -38,9 +38,34 @@

{{hostSet.model.description}}

- {{t - (concat 'resources.host-catalog.types.' hostSet.model.type '.label') - }} + {{#if hostSet.model.isPlugin}} + + {{t + (concat + 'resources.host-catalog.types.' + hostSet.model.compositeType + '.label' + ) + }} + + {{else}} + + {{t + (concat + 'resources.host-catalog.types.' + hostSet.model.compositeType + '.label' + ) + }} + + {{/if}} + Date: Tue, 15 Feb 2022 08:39:08 -0800 Subject: [PATCH 5/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20use=20hostcatalogty?= =?UTF-8?q?pebadge=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../host-catalog/hosts/index.hbs | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs index 7176af48f..0371cefac 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs @@ -27,29 +27,7 @@

{{host.description}}

- {{#if host.isStatic}} - - {{t - (concat - 'resources.host-catalog.types.' host.compositeType '.label' - ) - }} - - {{else}} - - {{t - (concat - 'resources.host-catalog.types.' host.compositeType '.label' - ) - }} - - {{/if}} + Date: Tue, 15 Feb 2022 11:32:27 -0800 Subject: [PATCH 6/7] =?UTF-8?q?fix:=20=F0=9F=90=9B=20refactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 20 ++++++++----------- .../form/host-catalog/aws/index.hbs | 14 ++++++------- .../form/host-catalog/azure/index.hbs | 14 ++++++------- .../form/host-catalog/static/index.hbs | 12 +++++------ .../components/form/host-set/aws/index.hbs | 2 +- .../components/form/host-set/azure/index.hbs | 2 +- .../app/components/form/host/aws/index.hbs | 2 +- .../app/components/form/host/azure/index.hbs | 2 +- .../host-catalog-type-badge/index.hbs | 6 +++--- 9 files changed, 35 insertions(+), 39 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 8d4a00641..5b5b02e45 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -84,19 +84,15 @@ host-catalog: title: Welcome to Host Catalogs actions: delete: Delete Host Catalog + help: + static: Provide a list of hosts and host sets with static addresses + dynamic: Automate discovery of target hosts and services on Azure or AWS types: - static: - label: Static - help: Provide a list of hosts and host sets with static addresses - unknown: - label: Plugin - aws: - label: AWS - azure: - label: Azure - dynamic: - label: Dynamic - help: Automate discovery of target hosts and services on Azure or AWS + static: Static + unknown: Plugin + aws: AWS + azure: Azure + dynamic: Dynamic host-set: title: Host Set title_plural: Host Sets diff --git a/ui/admin/app/components/form/host-catalog/aws/index.hbs b/ui/admin/app/components/form/host-catalog/aws/index.hbs index 36ebed43a..71568288b 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -57,15 +57,15 @@ as |radioGroup| > @@ -91,13 +91,13 @@ as |radioGroup| > @@ -90,13 +90,13 @@ as |radioGroup| > @@ -92,12 +92,12 @@ as |radioGroup| > diff --git a/ui/admin/app/components/form/host-set/aws/index.hbs b/ui/admin/app/components/form/host-set/aws/index.hbs index f090e2d18..5e860c34e 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -65,7 +65,7 @@ as |radioGroup| > - {{t (concat 'resources.host-catalog.types.' @model.compositeType '.label')}} + {{t (concat 'resources.host-catalog.types.' @model.compositeType)}} {{else if @model.isUnknown}} - {{t (concat 'resources.host-catalog.types.' @model.compositeType '.label')}} + {{t (concat 'resources.host-catalog.types.' @model.compositeType)}} {{else}} - {{t (concat 'resources.host-catalog.types.' @model.compositeType '.label')}} + {{t (concat 'resources.host-catalog.types.' @model.compositeType)}} {{/if}} \ No newline at end of file From 79f242c4aa5b2f651593b01fb038d771315f68a9 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 15 Feb 2022 11:32:40 -0800 Subject: [PATCH 7/7] refactor translations --- .../scopes/scope/host-catalogs/host-catalog/host-sets/new.js | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new.js index 38b1c86c6..040ee98d3 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/new.js @@ -18,7 +18,6 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends if (this.currentModel?.isNew) { this.currentModel.rollbackAttributes(); } - console.log('typedwed', compositeType); return this.store.createRecord('host-set', { compositeType, host_catalog_id,