From 6a8bbcad9d06be158eb0ec7624eae23b07f5784c Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Wed, 26 Jan 2022 10:38:04 -0500 Subject: [PATCH 001/148] feat: Add type param support to creation form of host catalog --- .../app/components/form/host-catalog/index.hbs | 14 ++++++++++++++ .../components/form/host-catalog/static/index.hbs | 1 + .../app/routes/scopes/scope/host-catalogs/new.js | 15 +++++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 ui/admin/app/components/form/host-catalog/static/index.hbs diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index 39571b820..2df4c07d9 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -45,6 +45,20 @@ {{/if}} + +

Place Radio Button Group Here

+ + {{#if @model.isNew}} + {{#if @model.type}} + {{component + (concat 'form/host-catalog/' @model.type) + model=@model + submit=@submit + cancel=@cancel + }} + {{/if}} + {{/if}} + {{#if (can 'save model' @model)}} Date: Wed, 26 Jan 2022 10:49:28 -0500 Subject: [PATCH 002/148] feat: Trigger update to host catalog type --- ui/admin/app/routes/scopes/scope/host-catalogs/new.js | 10 ++++++++++ .../app/templates/scopes/scope/host-catalogs/new.hbs | 1 + 2 files changed, 11 insertions(+) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 5105e168a..b8f6a396d 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -1,4 +1,5 @@ import Route from '@ember/routing/route'; +import { action } from '@ember/object'; export default class ScopesScopeHostCatalogsNewRoute extends Route { // =attributes @@ -25,4 +26,13 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { scopeModel, }); } + + /** + * Update type of host catalog + * @param {string} type + */ + @action + async changeType(type) { + await this.router.replaceWith({ type }); + } } diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs index fb936598e..983c1e86f 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs @@ -18,6 +18,7 @@ @model={{@model}} @submit={{route-action 'save' @model}} @cancel={{route-action 'cancel' @model}} + @changeType={{route-action 'changeType' @model.type}} /> From 07b2c646b1efb504990b9975c485bbaef93201cf Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Wed, 26 Jan 2022 10:56:38 -0500 Subject: [PATCH 003/148] feat: Question on default host catalog type value --- ui/admin/app/routes/scopes/scope/host-catalogs/new.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index b8f6a396d..c95aea7b4 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -18,8 +18,7 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { */ model(params) { const scopeModel = this.modelFor('scopes.scope'); - // TODO Use model provider type method - // to set params.type to 'static' if type is not provided + // FIXME Should default static type be specified when type is undefined? params.type = 'static'; return this.store.createRecord('host-catalog', { type: params.type, From feec5d96f3a68bcf6fbeb8ab7f11f2ba81842274 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 25 Jan 2022 19:12:18 -0800 Subject: [PATCH 004/148] typed host catalog init --- .../form/host-catalog/aws/index.hbs | 38 +++++++++++++++++++ .../form/host-catalog/azure/index.hbs | 38 +++++++++++++++++++ .../form/host-catalog/static/index.hbs | 38 +++++++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 ui/admin/app/components/form/host-catalog/aws/index.hbs create mode 100644 ui/admin/app/components/form/host-catalog/azure/index.hbs create mode 100644 ui/admin/app/components/form/host-catalog/static/index.hbs diff --git a/ui/admin/app/components/form/host-catalog/aws/index.hbs b/ui/admin/app/components/form/host-catalog/aws/index.hbs new file mode 100644 index 000000000..2632020d2 --- /dev/null +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -0,0 +1,38 @@ + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs new file mode 100644 index 000000000..2632020d2 --- /dev/null +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -0,0 +1,38 @@ + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs new file mode 100644 index 000000000..2632020d2 --- /dev/null +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -0,0 +1,38 @@ + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file From f13a3ee18cafe39b4ff1d8d446f2bf8b59675649 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 26 Jan 2022 09:34:23 -0800 Subject: [PATCH 005/148] split host catalog into other types --- .../app/components/form/auth-method/index.hbs | 4 +- .../form/host-catalog/aws/index.hbs | 2 +- .../form/host-catalog/azure/index.hbs | 2 +- .../components/form/host-catalog/index.hbs | 65 +++---------------- .../form/host-catalog/static/index.hbs | 2 +- 5 files changed, 16 insertions(+), 59 deletions(-) diff --git a/ui/admin/app/components/form/auth-method/index.hbs b/ui/admin/app/components/form/auth-method/index.hbs index 77cf37d4d..224c8006f 100644 --- a/ui/admin/app/components/form/auth-method/index.hbs +++ b/ui/admin/app/components/form/auth-method/index.hbs @@ -8,4 +8,6 @@ addStringItem=@addStringItem addAccountClaimMapItem=@addAccountClaimMapItem }} -{{/if}} \ No newline at end of file +{{/if}} + +{{{log @model 'mdelll'}}} \ No newline at end of file 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 2632020d2..5c8278a97 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -6,7 +6,7 @@ @showEditToggle={{if @model.isNew false true}} --}} as |form| > - +AWASSS! - +AZURE!! +{{#if @model.compositeType}} + {{component + (concat 'form/host-catalog/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel + changeType=@changeType + }} +{{/if}} - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - {{#if (can 'save model' @model)}} - - {{/if}} - \ No newline at end of file +{{{log @model 'modede'}}} \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index 2632020d2..ab96e4e79 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -6,7 +6,7 @@ @showEditToggle={{if @model.isNew false true}} --}} as |form| > - +STATIC!! Date: Wed, 26 Jan 2022 14:35:31 -0800 Subject: [PATCH 006/148] static form with radioCards --- .../form/host-catalog/aws/index.hbs | 39 +------------------ .../form/host-catalog/azure/index.hbs | 39 +------------------ .../components/form/host-catalog/index.hbs | 1 - .../form/host-catalog/static/index.hbs | 38 ++++++++++++++++-- 4 files changed, 36 insertions(+), 81 deletions(-) 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 5c8278a97..d4a50149c 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -1,38 +1 @@ - -AWASSS! - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if (can 'save model' @model)}} - - {{/if}} - \ No newline at end of file +AWS Form \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 3bfff4bd0..2c7cb5293 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -1,38 +1 @@ - -AZURE!! - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if (can 'save model' @model)}} - - {{/if}} - \ No newline at end of file +Azure Form \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index 2177276d7..975d98f62 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -4,7 +4,6 @@ model=@model submit=@submit cancel=@cancel - changeType=@changeType }} {{/if}} diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index ab96e4e79..b77d02fa5 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -2,11 +2,8 @@ @onSubmit={{@submit}} @cancel={{@cancel}} @disabled={{@model.isSaving}} - {{!-- @error={{@model.errors.base}} - @showEditToggle={{if @model.isNew false true}} --}} as |form| > -STATIC!! - + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + + + {{#if (can 'save model' @model)}} Date: Wed, 26 Jan 2022 16:36:11 -0800 Subject: [PATCH 007/148] further updates --- addons/core/translations/resources/en-us.yaml | 1 + .../form/host-catalog/static/index.hbs | 38 +++++++++++-------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 4ac6c4023..308161cb1 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -78,6 +78,7 @@ host-catalog: title: Host Catalog title_plural: Host Catalogs description: A host catalog is a collection of hosts and host sets. + type: Type messages: welcome: title: Welcome to Host Catalogs diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index b77d02fa5..1c88faefc 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -42,21 +42,25 @@ {{/if}} - - - - - + + <:title>{{t 'resources.host-catalog.type'}} + <:body> + + + + + + {{#if (can 'save model' @model)}} {{/if}} - \ No newline at end of file + + +{{{log @model.compositeType 'compostite type'}}} \ No newline at end of file From c1d71e51663889d2dec2818497db7df181b12abf Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Wed, 26 Jan 2022 10:38:04 -0500 Subject: [PATCH 008/148] feat: Add type param support to creation form of host catalog --- .../components/form/host-catalog/index.hbs | 66 ++++++++++++++++++- .../form/host-catalog/static/index.hbs | 2 +- .../routes/scopes/scope/host-catalogs/new.js | 15 ++++- 3 files changed, 79 insertions(+), 4 deletions(-) diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index 975d98f62..fc04f322d 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -7,4 +7,68 @@ }} {{/if}} -{{{log @model 'modede'}}} \ No newline at end of file +<<<<<<< HEAD +{{{log @model 'modede'}}} +======= + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + +

Place Radio Button Group Here

+ + {{#if @model.isNew}} + {{#if @model.type}} + {{component + (concat 'form/host-catalog/' @model.type) + model=@model + submit=@submit + cancel=@cancel + }} + {{/if}} + {{/if}} + + {{#if (can 'save model' @model)}} + + {{/if}} + +>>>>>>> 6a8bbcad (feat: Add type param support to creation form of host catalog) diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index 1c88faefc..42c75e421 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -71,4 +71,4 @@ {{/if}} -{{{log @model.compositeType 'compostite type'}}} \ No newline at end of file +{{{log @model.compositeType 'compostite type'}}} diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 9af8baaef..5105e168a 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -1,16 +1,27 @@ import Route from '@ember/routing/route'; export default class ScopesScopeHostCatalogsNewRoute extends Route { + // =attributes + + queryParams = { + type: { + refreshModel: true, + }, + }; + // =methods /** * Creates a new unsaved host catalog belonging to the current scope. * @return {HostCatalogModel} */ - model() { + model(params) { const scopeModel = this.modelFor('scopes.scope'); + // TODO Use model provider type method + // to set params.type to 'static' if type is not provided + params.type = 'static'; return this.store.createRecord('host-catalog', { - type: 'static', + type: params.type, scopeModel, }); } From cc56fb9636c99667e668f183570e505fcc81bab0 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Wed, 26 Jan 2022 10:49:28 -0500 Subject: [PATCH 009/148] feat: Trigger update to host catalog type --- ui/admin/app/routes/scopes/scope/host-catalogs/new.js | 10 ++++++++++ .../app/templates/scopes/scope/host-catalogs/new.hbs | 1 + 2 files changed, 11 insertions(+) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 5105e168a..b8f6a396d 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -1,4 +1,5 @@ import Route from '@ember/routing/route'; +import { action } from '@ember/object'; export default class ScopesScopeHostCatalogsNewRoute extends Route { // =attributes @@ -25,4 +26,13 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { scopeModel, }); } + + /** + * Update type of host catalog + * @param {string} type + */ + @action + async changeType(type) { + await this.router.replaceWith({ type }); + } } diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs index fb936598e..983c1e86f 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs @@ -18,6 +18,7 @@ @model={{@model}} @submit={{route-action 'save' @model}} @cancel={{route-action 'cancel' @model}} + @changeType={{route-action 'changeType' @model.type}} /> From 46b6c51f5de0cdbf3ceaadcc8ea3be78fd298601 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Wed, 26 Jan 2022 10:56:38 -0500 Subject: [PATCH 010/148] feat: Question on default host catalog type value --- ui/admin/app/routes/scopes/scope/host-catalogs/new.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index b8f6a396d..c95aea7b4 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -18,8 +18,7 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { */ model(params) { const scopeModel = this.modelFor('scopes.scope'); - // TODO Use model provider type method - // to set params.type to 'static' if type is not provided + // FIXME Should default static type be specified when type is undefined? params.type = 'static'; return this.store.createRecord('host-catalog', { type: params.type, From 2de2a79e7c8ec4b259aa12af596afea8c6513672 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 27 Jan 2022 10:07:50 -0500 Subject: [PATCH 011/148] fix: Protect catalog type selectors in edit mode --- .../components/form/host-catalog/index.hbs | 6 +---- .../form/host-catalog/static/index.hbs | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index fc04f322d..28a7711d1 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -7,9 +7,6 @@ }} {{/if}} -<<<<<<< HEAD -{{{log @model 'modede'}}} -======= {{/if}} - ->>>>>>> 6a8bbcad (feat: Add type param support to creation form of host catalog) + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index 42c75e421..e39512155 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -42,6 +42,7 @@ {{/if}} +<<<<<<< HEAD <:title>{{t 'resources.host-catalog.type'}} <:body> @@ -61,6 +62,32 @@ +======= + + {{#if @model.isNew}} + + <:title>{{t 'resources.host-catalog.type'}} + <:body> + + + + + + + {{/if}} + +>>>>>>> f3d3bdd7 (fix: Protect catalog type selectors in edit mode) {{#if (can 'save model' @model)}} Date: Thu, 27 Jan 2022 10:11:12 -0500 Subject: [PATCH 012/148] feat: Add missing queryParam to hostcatalog create controller --- .../controllers/scopes/scope/host-catalogs/new.js | 7 +++++++ .../app/routes/scopes/scope/host-catalogs/new.js | 5 +++++ .../scopes/scope/host-catalogs/new-test.js | 14 ++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 ui/admin/app/controllers/scopes/scope/host-catalogs/new.js create mode 100644 ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/new-test.js diff --git a/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js b/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js new file mode 100644 index 000000000..182b9c423 --- /dev/null +++ b/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js @@ -0,0 +1,7 @@ +import Controller from '@ember/controller'; + +export default class ScopesScopeHostCatalogsNewController extends Controller { + // =attributes + + queryParams = ['type']; +} diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index c95aea7b4..43c4a025e 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -1,7 +1,12 @@ import Route from '@ember/routing/route'; import { action } from '@ember/object'; +import { inject as service } from '@ember/service'; export default class ScopesScopeHostCatalogsNewRoute extends Route { + // =services + + @service router; + // =attributes queryParams = { diff --git a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/new-test.js b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/new-test.js new file mode 100644 index 000000000..c872fa28a --- /dev/null +++ b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/new-test.js @@ -0,0 +1,14 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Controller | scopes/scope/host-catalogs/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/new' + ); + assert.ok(controller); + }); +}); From 67c4440a9091c0ecc29502ad0a233b8471fad387 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 27 Jan 2022 10:43:22 -0500 Subject: [PATCH 013/148] fix: Reflect catalog type in creation url --- ui/admin/app/routes/scopes/scope/host-catalogs/new.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 43c4a025e..e8bf1cef8 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -23,20 +23,24 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { */ model(params) { const scopeModel = this.modelFor('scopes.scope'); - // FIXME Should default static type be specified when type is undefined? - params.type = 'static'; + if (!params.type) params.type = 'static'; return this.store.createRecord('host-catalog', { type: params.type, scopeModel, }); } + afterModel(model) { + this.router.replaceWith({ queryParams: { type: model.compositeType } }); + } + /** * Update type of host catalog * @param {string} type */ @action async changeType(type) { - await this.router.replaceWith({ type }); + console.log(type, 'GET TYPE HERE'); + await this.router.replaceWith({ queryParams: { type } }); } } From 0577cdec76f7bc9b1337140e677a4823731816f0 Mon Sep 17 00:00:00 2001 From: dharini Date: Fri, 28 Jan 2022 00:01:17 -0800 Subject: [PATCH 014/148] more updates --- .../components/form/host-catalog/index.hbs | 70 ++----------------- .../form/host-catalog/plugin/index.hbs | 2 + .../form/host-catalog/static/index.hbs | 30 +------- .../routes/scopes/scope/host-catalogs/new.js | 3 +- 4 files changed, 13 insertions(+), 92 deletions(-) create mode 100644 ui/admin/app/components/form/host-catalog/plugin/index.hbs diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index 28a7711d1..1b1dbf68d 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -1,70 +1,14 @@ -{{#if @model.compositeType}} +COMES JERE +{{{log 'BLLL' @model.compositeType}}} +{{{log 'NNFRM' @model.isNew}}} + +{{#if @model.isNew}} +{{!-- {{#if @model.compositeType}} --}} {{component (concat 'form/host-catalog/' @model.compositeType) model=@model submit=@submit cancel=@cancel }} +{{!-- {{/if}} --}} {{/if}} - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - -

Place Radio Button Group Here

- - {{#if @model.isNew}} - {{#if @model.type}} - {{component - (concat 'form/host-catalog/' @model.type) - model=@model - submit=@submit - cancel=@cancel - }} - {{/if}} - {{/if}} - - {{#if (can 'save model' @model)}} - - {{/if}} - \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/plugin/index.hbs b/ui/admin/app/components/form/host-catalog/plugin/index.hbs new file mode 100644 index 000000000..0191a0174 --- /dev/null +++ b/ui/admin/app/components/form/host-catalog/plugin/index.hbs @@ -0,0 +1,2 @@ +THIS IS DYNAINC +{{{log @model 'NAMEEEE'}}} diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index e39512155..bad64bf24 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -1,3 +1,4 @@ +STATIC {{{log 'STATTTTTIC' @model}}} {{/if}} -
+
--}} {{/if}} -<<<<<<< HEAD <:title>{{t 'resources.host-catalog.type'}} <:body> @@ -62,32 +62,6 @@ -======= - - {{#if @model.isNew}} - - <:title>{{t 'resources.host-catalog.type'}} - <:body> - - - - - - - {{/if}} - ->>>>>>> f3d3bdd7 (fix: Protect catalog type selectors in edit mode) {{#if (can 'save model' @model)}} Date: Fri, 28 Jan 2022 08:53:16 -0800 Subject: [PATCH 015/148] unknown type --- addons/api/addon/models/host-catalog.js | 14 +++++++++++++- .../app/components/form/host-catalog/index.hbs | 4 ++-- .../app/routes/scopes/scope/host-catalogs/new.js | 2 ++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/addons/api/addon/models/host-catalog.js b/addons/api/addon/models/host-catalog.js index ec34b50e3..33fce7bc7 100644 --- a/addons/api/addon/models/host-catalog.js +++ b/addons/api/addon/models/host-catalog.js @@ -26,7 +26,15 @@ export default class HostCatalogModel extends GeneratedHostCatalogModel { * @type {boolean} */ get isUnknown() { - return this.isPlugin && !types.includes(this.plugin.name); + console.log(this.isPlugin, 'IS IT PLUGIN', this.plugin, types); + // if(this.plugin === undefined) { + // console.log('in USEFNNFNF') + // return false; + // } else { + // console.log('in ELSE EE') + + return this.isPlugin && !types.includes(this.plugin.name); + // } } /** @@ -51,6 +59,8 @@ export default class HostCatalogModel extends GeneratedHostCatalogModel { * @type {string} */ get compositeType() { + console.log(this, this.isPlugin, 'WHAT IS PLUGNI'); + // if(this.plugin === undefined) return 'static'; if (this.isUnknown) return 'unknown'; if (this.isPlugin) return this.plugin.name; return 'static'; @@ -65,7 +75,9 @@ export default class HostCatalogModel extends GeneratedHostCatalogModel { this.type = 'static'; } else { this.type = 'plugin'; + this.plugin = { name: type }; + console.log('COMPOSITI' , this.plugin, type) } } } diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index 1b1dbf68d..1740712ef 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -2,8 +2,8 @@ COMES JERE {{{log 'BLLL' @model.compositeType}}} {{{log 'NNFRM' @model.isNew}}} -{{#if @model.isNew}} -{{!-- {{#if @model.compositeType}} --}} +{{!-- {{#if @model.isNew}} --}} +{{#if @model.compositeType}} {{component (concat 'form/host-catalog/' @model.compositeType) model=@model diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index cf9f74624..c93bdbce6 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -25,8 +25,10 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { model(params) { const scopeModel = this.modelFor('scopes.scope'); if (!params.type) params.type = 'plugin'; + params.name = 'Avon'; return this.store.createRecord('host-catalog', { type: params.type, + name: params.name, scopeModel, }); } From 19f48b2ca308a1102eca57d910d66a20a965735b Mon Sep 17 00:00:00 2001 From: dharini Date: Fri, 28 Jan 2022 17:27:59 -0800 Subject: [PATCH 016/148] show provider info when dynamic is selected --- .../form/host-catalog/plugin/index.hbs | 2 -- .../form/host-catalog/static/index.hbs | 3 +-- .../form/host-catalog/static/index.js | 26 +++++++++++++++++++ .../routes/scopes/scope/host-catalogs/new.js | 7 ++--- 4 files changed, 29 insertions(+), 9 deletions(-) delete mode 100644 ui/admin/app/components/form/host-catalog/plugin/index.hbs create mode 100644 ui/admin/app/components/form/host-catalog/static/index.js diff --git a/ui/admin/app/components/form/host-catalog/plugin/index.hbs b/ui/admin/app/components/form/host-catalog/plugin/index.hbs deleted file mode 100644 index 0191a0174..000000000 --- a/ui/admin/app/components/form/host-catalog/plugin/index.hbs +++ /dev/null @@ -1,2 +0,0 @@ -THIS IS DYNAINC -{{{log @model 'NAMEEEE'}}} diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index bad64bf24..42c75e421 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -1,4 +1,3 @@ -STATIC {{{log 'STATTTTTIC' @model}}} {{/if}} -
--}} +
Date: Tue, 25 Jan 2022 19:12:18 -0800 Subject: [PATCH 017/148] typed host catalog init --- ui/admin/app/components/form/host-catalog/aws/index.hbs | 2 +- ui/admin/app/components/form/host-catalog/azure/index.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 d4a50149c..b9990fda4 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -1 +1 @@ -AWS Form \ No newline at end of file +AWS Form diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 2c7cb5293..0dea00f73 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -1 +1 @@ -Azure Form \ No newline at end of file +Azure Form From 043b760cd67397c42cc668b4fb2edf3f5431f485 Mon Sep 17 00:00:00 2001 From: dharini Date: Fri, 28 Jan 2022 00:01:17 -0800 Subject: [PATCH 018/148] more updates --- ui/admin/app/components/form/host-catalog/plugin/index.hbs | 2 ++ ui/admin/app/components/form/host-catalog/static/index.hbs | 3 ++- ui/admin/app/routes/scopes/scope/host-catalogs/new.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 ui/admin/app/components/form/host-catalog/plugin/index.hbs diff --git a/ui/admin/app/components/form/host-catalog/plugin/index.hbs b/ui/admin/app/components/form/host-catalog/plugin/index.hbs new file mode 100644 index 000000000..0191a0174 --- /dev/null +++ b/ui/admin/app/components/form/host-catalog/plugin/index.hbs @@ -0,0 +1,2 @@ +THIS IS DYNAINC +{{{log @model 'NAMEEEE'}}} diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index 42c75e421..bad64bf24 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -1,3 +1,4 @@ +STATIC {{{log 'STATTTTTIC' @model}}} {{/if}} -
+ --}} Date: Fri, 28 Jan 2022 08:53:16 -0800 Subject: [PATCH 019/148] unknown type --- ui/admin/app/routes/scopes/scope/host-catalogs/new.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 62ed87dfc..f299f980c 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -25,6 +25,7 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { model(params) { const scopeModel = this.modelFor('scopes.scope'); if (!params.type) params.type = 'plugin'; + params.name = 'Avon'; return this.store.createRecord('host-catalog', { compositeType: params.type, //static or aws or azure scopeModel, From 73566b0583f3475271fd2c31909fb763071f826d Mon Sep 17 00:00:00 2001 From: dharini Date: Fri, 28 Jan 2022 17:27:59 -0800 Subject: [PATCH 020/148] show provider info when dynamic is selected --- ui/admin/app/components/form/host-catalog/plugin/index.hbs | 2 -- ui/admin/app/components/form/host-catalog/static/index.hbs | 3 +-- ui/admin/app/routes/scopes/scope/host-catalogs/new.js | 3 +-- 3 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 ui/admin/app/components/form/host-catalog/plugin/index.hbs diff --git a/ui/admin/app/components/form/host-catalog/plugin/index.hbs b/ui/admin/app/components/form/host-catalog/plugin/index.hbs deleted file mode 100644 index 0191a0174..000000000 --- a/ui/admin/app/components/form/host-catalog/plugin/index.hbs +++ /dev/null @@ -1,2 +0,0 @@ -THIS IS DYNAINC -{{{log @model 'NAMEEEE'}}} diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index bad64bf24..42c75e421 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -1,4 +1,3 @@ -STATIC {{{log 'STATTTTTIC' @model}}} {{/if}} - --}} + Date: Mon, 31 Jan 2022 13:16:03 -0800 Subject: [PATCH 021/148] rebase main --- addons/api/addon/models/host-catalog.js | 14 +------------- ui/admin/app/components/form/auth-method/index.hbs | 4 +--- .../app/components/form/host-catalog/index.hbs | 8 ++------ 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/addons/api/addon/models/host-catalog.js b/addons/api/addon/models/host-catalog.js index 33fce7bc7..ec34b50e3 100644 --- a/addons/api/addon/models/host-catalog.js +++ b/addons/api/addon/models/host-catalog.js @@ -26,15 +26,7 @@ export default class HostCatalogModel extends GeneratedHostCatalogModel { * @type {boolean} */ get isUnknown() { - console.log(this.isPlugin, 'IS IT PLUGIN', this.plugin, types); - // if(this.plugin === undefined) { - // console.log('in USEFNNFNF') - // return false; - // } else { - // console.log('in ELSE EE') - - return this.isPlugin && !types.includes(this.plugin.name); - // } + return this.isPlugin && !types.includes(this.plugin.name); } /** @@ -59,8 +51,6 @@ export default class HostCatalogModel extends GeneratedHostCatalogModel { * @type {string} */ get compositeType() { - console.log(this, this.isPlugin, 'WHAT IS PLUGNI'); - // if(this.plugin === undefined) return 'static'; if (this.isUnknown) return 'unknown'; if (this.isPlugin) return this.plugin.name; return 'static'; @@ -75,9 +65,7 @@ export default class HostCatalogModel extends GeneratedHostCatalogModel { this.type = 'static'; } else { this.type = 'plugin'; - this.plugin = { name: type }; - console.log('COMPOSITI' , this.plugin, type) } } } diff --git a/ui/admin/app/components/form/auth-method/index.hbs b/ui/admin/app/components/form/auth-method/index.hbs index 224c8006f..77cf37d4d 100644 --- a/ui/admin/app/components/form/auth-method/index.hbs +++ b/ui/admin/app/components/form/auth-method/index.hbs @@ -8,6 +8,4 @@ addStringItem=@addStringItem addAccountClaimMapItem=@addAccountClaimMapItem }} -{{/if}} - -{{{log @model 'mdelll'}}} \ No newline at end of file +{{/if}} \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index 1740712ef..35a4a94bd 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -1,8 +1,4 @@ -COMES JERE -{{{log 'BLLL' @model.compositeType}}} -{{{log 'NNFRM' @model.isNew}}} - -{{!-- {{#if @model.isNew}} --}} +{{#if @model.isNew}} {{#if @model.compositeType}} {{component (concat 'form/host-catalog/' @model.compositeType) @@ -10,5 +6,5 @@ COMES JERE submit=@submit cancel=@cancel }} -{{!-- {{/if}} --}} +{{/if}} {{/if}} From 55acdc76b6abf595209f55781014dd7fcd075873 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 1 Feb 2022 11:12:33 -0800 Subject: [PATCH 022/148] move up component logic --- addons/core/translations/resources/en-us.yaml | 8 ++ .../form/host-catalog/aws/index.hbs | 130 +++++++++++++++++- .../form/host-catalog/azure/index.hbs | 130 +++++++++++++++++- .../components/form/host-catalog/index.hbs | 32 +++-- .../app/components/form/host-catalog/index.js | 29 ++++ .../form/host-catalog/static/index.hbs | 40 +++++- .../form/host-catalog/static/index.js | 26 ---- .../scopes/scope/host-catalogs/new.js | 16 +++ .../routes/scopes/scope/host-catalogs/new.js | 3 +- 9 files changed, 370 insertions(+), 44 deletions(-) create mode 100644 ui/admin/app/components/form/host-catalog/index.js delete mode 100644 ui/admin/app/components/form/host-catalog/static/index.js diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 308161cb1..d7a3a1db3 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -89,6 +89,14 @@ host-catalog: unknown: Unknown aws: AWS azure: Azure + dynamic: Dynamic + form: + provider-details: Provider Details + types: + static: + help: Provide a list of hosts and host sets with static addresses + dynamic: + help: Automate discovery of target hosts and services on Azure or AWS 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 b9990fda4..208468752 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -1 +1,129 @@ -AWS Form + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + <:title>{{t 'form.type.label'}} + <:body> + + + + + + + + {{#if @showDynamicPlugins}} + + <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:body> + + + + + + + {{/if}} + + + + + + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 0dea00f73..208468752 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -1 +1,129 @@ -Azure Form + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + <:title>{{t 'form.type.label'}} + <:body> + + + + + + + + {{#if @showDynamicPlugins}} + + <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:body> + + + + + + + {{/if}} + + + + + + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index 35a4a94bd..d41b3749b 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -1,10 +1,24 @@ {{#if @model.isNew}} -{{#if @model.compositeType}} - {{component - (concat 'form/host-catalog/' @model.compositeType) - model=@model - submit=@submit - cancel=@cancel - }} -{{/if}} -{{/if}} +
{{@model.type}} {{@model.compositeType}}
+ {{#if @model.isStatic}} + {{component + (concat 'form/host-catalog/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel + toggleType=this.toggleType + showDynamicPlugins=this.showDynamicPlugins + }} + {{/if}} + + {{#if this.showDynamicPlugins}} + {{component + (concat 'form/host-catalog/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel + toggleType=this.toggleType + showDynamicPlugins=this.showDynamicPlugins + }} + {{/if}} +{{/if}} \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/index.js b/ui/admin/app/components/form/host-catalog/index.js new file mode 100644 index 000000000..ed49133db --- /dev/null +++ b/ui/admin/app/components/form/host-catalog/index.js @@ -0,0 +1,29 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { tracked } from '@glimmer/tracking'; + +export default class FormHostCatalogIndexComponent extends Component { + // =properties + /** + /** + */ + @tracked showDynamicPlugins = false; + // =actions + + @action + toggleType(type) { + this.renderDynamicPlugins(type); + } + //show dynamic type radio cards -> aws and azure if the type is dynamic + //call route action to update the query and rerender the model if static is selected + renderDynamicPlugins(type) { + if (type === 'dynamic') { + this.showDynamicPlugins = true; + } else { + this.showDynamicPlugins = false; + //CHECK:how to call the action to update query param + this.args.model.type = 'static'; + this.args.changeType(); + } + } +} diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index 42c75e421..c3201cb81 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -43,9 +43,14 @@ {{/if}}
- <:title>{{t 'resources.host-catalog.type'}} + <:title>{{t 'form.type.label'}} <:body> - + + + {{#if @showDynamicPlugins}} + + <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:body> + + + + + + + {{/if}} + {{#if (can 'save model' @model)}} {{/if}} -
- -{{{log @model.compositeType 'compostite type'}}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/static/index.js b/ui/admin/app/components/form/host-catalog/static/index.js deleted file mode 100644 index 8b55cf8b8..000000000 --- a/ui/admin/app/components/form/host-catalog/static/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import Component from '@glimmer/component'; -import { options } from 'api/models/credential-library'; -import { computed, action } from '@ember/object'; -import { tracked } from '@glimmer/tracking'; - -export default class FormHostCatalogIndexComponent extends Component { - // =properties - /** - /** - */ - @tracked showDynamicPlugins = false; - // =actions - - @action - toggleType(type) { - this.renderDynamicPlugins(type); - } - renderDynamicPlugins(type) { - if(type === 'dynamic') { - this.showDynamicPlugins = true; - } else { - this.showDynamicPlugins = false; - } - } - -} diff --git a/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js b/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js index 182b9c423..3b0c5b729 100644 --- a/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js @@ -1,7 +1,23 @@ import Controller from '@ember/controller'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; export default class ScopesScopeHostCatalogsNewController extends Controller { // =attributes queryParams = ['type']; + @tracked showDynamicPlugins = false; + + @action + async toggleType(type) { + this.renderDynamicPlugins(type); + } + + renderDynamicPlugins(type) { + if (type !== 'static') { + this.showDynamicPlugins = true; + } else { + this.showDynamicPlugins = false; + } + } } diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 49a4a69da..53a2fea97 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -6,13 +6,12 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { // =services @service router; - // =attributes queryParams = { type: { refreshModel: true, - replace: true + replace: true, }, }; From f7a2dd14e33636d5ad70d991d05347ce845415cf Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Tue, 1 Feb 2022 22:35:00 -0500 Subject: [PATCH 023/148] chore: Integrate compositetypes into route --- addons/api/addon/models/host-catalog.js | 2 +- .../form/host-catalog/aws/index.hbs | 74 +++++++++++------- .../form/host-catalog/azure/index.hbs | 75 ++++++++++++------- .../components/form/host-catalog/index.hbs | 58 ++++++++------ .../app/components/form/host-catalog/index.js | 44 +++++------ .../form/host-catalog/static/index.hbs | 72 ++++++++++-------- .../scopes/scope/host-catalogs/new.js | 16 ---- .../routes/scopes/scope/host-catalogs/new.js | 18 ++--- .../scopes/scope/host-catalogs/new.hbs | 2 +- 9 files changed, 205 insertions(+), 156 deletions(-) diff --git a/addons/api/addon/models/host-catalog.js b/addons/api/addon/models/host-catalog.js index ec34b50e3..08e1a7d82 100644 --- a/addons/api/addon/models/host-catalog.js +++ b/addons/api/addon/models/host-catalog.js @@ -26,7 +26,7 @@ export default class HostCatalogModel extends GeneratedHostCatalogModel { * @type {boolean} */ get isUnknown() { - return this.isPlugin && !types.includes(this.plugin.name); + return this.isPlugin && !types.includes(this.plugin?.name); } /** 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 208468752..ca157a9f0 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -2,6 +2,8 @@ @onSubmit={{@submit}} @cancel={{@cancel}} @disabled={{@model.isSaving}} + @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > {{/if}}
- - <:title>{{t 'form.type.label'}} - <:body> - - - - - - + + {{#if @model.isNew}} + + <:title>{{t 'form.type.label'}} + <:body> + + + + + + - {{#if @showDynamicPlugins}} <:title>{{t 'resources.host-catalog.form.provider-details'}} <:body> @@ -92,13 +95,32 @@ + {{else}} + + <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:body> + + + + + {{/if}} diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 208468752..80b9f9275 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -2,6 +2,9 @@ @onSubmit={{@submit}} @cancel={{@cancel}} @disabled={{@model.isSaving}} + @disabled={{@model.isSaving}} + @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > {{/if}} - - <:title>{{t 'form.type.label'}} - <:body> - - - - - - + + {{#if @model.isNew}} + + <:title>{{t 'form.type.label'}} + <:body> + + + + + + - {{#if @showDynamicPlugins}} <:title>{{t 'resources.host-catalog.form.provider-details'}} <:body> @@ -92,13 +96,32 @@ + {{else}} + + <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:body> + + + + + {{/if}} diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index d41b3749b..39a9d270c 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -1,24 +1,38 @@ -{{#if @model.isNew}} -
{{@model.type}} {{@model.compositeType}}
- {{#if @model.isStatic}} - {{component - (concat 'form/host-catalog/' @model.compositeType) - model=@model - submit=@submit - cancel=@cancel - toggleType=this.toggleType - showDynamicPlugins=this.showDynamicPlugins - }} - {{/if}} +{{component + (concat 'form/host-catalog/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel + changeType=@changeType + }} - {{#if this.showDynamicPlugins}} - {{component - (concat 'form/host-catalog/' @model.compositeType) - model=@model - submit=@submit - cancel=@cancel - toggleType=this.toggleType - showDynamicPlugins=this.showDynamicPlugins - }} +{{!-- {{#if @model.isStatic}} + {{component + (concat 'form/host-catalog/' @model.type) + model=@model + submit=@submit + cancel=@cancel + form=form + toggleType=this.toggleType + showDynamicPlugins=this.showDynamicPlugins + }} +{{else if @model.isPlugin}} + Model is plugin + {{#if @model.isAWS}} + Model is Aws + {{else if @model.isAzure}} + Model is Azure {{/if}} -{{/if}} \ No newline at end of file +{{/if}} --}} + +{{!-- {{#if @model.type}} + {{component + (concat 'form/auth-method/' @model.type) + model=@model + submit=@submit + cancel=@cancel + removeItemByIndex=@removeItemByIndex + addStringItem=@addStringItem + addAccountClaimMapItem=@addAccountClaimMapItem + }} +{{/if}} --}} \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/index.js b/ui/admin/app/components/form/host-catalog/index.js index ed49133db..f6ac0ba23 100644 --- a/ui/admin/app/components/form/host-catalog/index.js +++ b/ui/admin/app/components/form/host-catalog/index.js @@ -3,27 +3,27 @@ import { action } from '@ember/object'; import { tracked } from '@glimmer/tracking'; export default class FormHostCatalogIndexComponent extends Component { - // =properties - /** - /** - */ - @tracked showDynamicPlugins = false; - // =actions + // // =properties + // /** + // /** + // */ + // @tracked showDynamicPlugins = false; + // // =actions - @action - toggleType(type) { - this.renderDynamicPlugins(type); - } - //show dynamic type radio cards -> aws and azure if the type is dynamic - //call route action to update the query and rerender the model if static is selected - renderDynamicPlugins(type) { - if (type === 'dynamic') { - this.showDynamicPlugins = true; - } else { - this.showDynamicPlugins = false; - //CHECK:how to call the action to update query param - this.args.model.type = 'static'; - this.args.changeType(); - } - } + // @action + // toggleType(type) { + // this.renderDynamicPlugins(type); + // } + // //show dynamic type radio cards -> aws and azure if the type is dynamic + // //call route action to update the query and rerender the model if static is selected + // renderDynamicPlugins(type) { + // if (type === 'dynamic') { + // this.showDynamicPlugins = true; + // } else { + // this.showDynamicPlugins = false; + // //CHECK:how to call the action to update query param + // // this.args.model.type = 'static'; + // // this.args.changeType(); + // } + // } } diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index 960ed5e2b..b0b607602 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -2,6 +2,8 @@ @onSubmit={{@submit}} @cancel={{@cancel}} @disabled={{@model.isSaving}} + @error={{@model.errors.base}} + @showEditToggle={{if @model.isNew false true}} as |form| > {{/if}} - - <:title>{{t 'form.type.label'}} - <:body> - - - - - - - {{#if @showDynamicPlugins}} + {{#if @model.isNew}} - <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:title>{{t 'form.type.label'}} <:body> + + {{#if @model.isPlugin}} + + <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:body> + + + + + + + {{/if}} {{/if}} {{#if (can 'save model' @model)}} diff --git a/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js b/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js index 3b0c5b729..182b9c423 100644 --- a/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/controllers/scopes/scope/host-catalogs/new.js @@ -1,23 +1,7 @@ import Controller from '@ember/controller'; -import { tracked } from '@glimmer/tracking'; -import { action } from '@ember/object'; export default class ScopesScopeHostCatalogsNewController extends Controller { // =attributes queryParams = ['type']; - @tracked showDynamicPlugins = false; - - @action - async toggleType(type) { - this.renderDynamicPlugins(type); - } - - renderDynamicPlugins(type) { - if (type !== 'static') { - this.showDynamicPlugins = true; - } else { - this.showDynamicPlugins = false; - } - } } diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 53a2fea97..fef70cf13 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -6,12 +6,12 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { // =services @service router; + // =attributes queryParams = { type: { refreshModel: true, - replace: true, }, }; @@ -21,17 +21,13 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { * Creates a new unsaved host catalog belonging to the current scope. * @return {HostCatalogModel} */ - model(params) { + model() { const scopeModel = this.modelFor('scopes.scope'); - if (!params.type) params.type = 'static'; - return this.store.createRecord('host-catalog', { - compositeType: params.type, //static or aws or azure - scopeModel, - }); + return this.store.createRecord('host-catalog', { scopeModel }); } - afterModel(model) { - this.router.replaceWith({ queryParams: { type: model.compositeType } }); + afterModel(model, transition) { + this.changeType(transition.to.queryParams?.type); } /** @@ -40,6 +36,10 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { */ @action async changeType(type) { + const model = this.modelFor('scopes.scope.host-catalogs.new'); + if(!type) type = 'static'; // Unknown host catalog type defaults to 'static' + if (model.isUnknown) type = 'aws'; //Is this the default case for plugin type? + model.compositeType = type; await this.router.replaceWith({ queryParams: { type } }); } } diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs index 983c1e86f..210eec22c 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs @@ -18,7 +18,7 @@ @model={{@model}} @submit={{route-action 'save' @model}} @cancel={{route-action 'cancel' @model}} - @changeType={{route-action 'changeType' @model.type}} + @changeType={{route-action 'changeType' @model}} /> From 096b7ea1424f890d1b7d7d043ec390b13e1e709d Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 2 Feb 2022 11:05:48 -0800 Subject: [PATCH 024/148] remove unused file, lint --- .../form/host-catalog/aws/index.hbs | 2 +- .../form/host-catalog/azure/index.hbs | 3 +- .../components/form/host-catalog/index.hbs | 12 ++++---- .../app/components/form/host-catalog/index.js | 29 ------------------- .../form/host-catalog/static/index.hbs | 2 +- .../routes/scopes/scope/host-catalogs/new.js | 2 +- 6 files changed, 10 insertions(+), 40 deletions(-) delete mode 100644 ui/admin/app/components/form/host-catalog/index.js 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 ca157a9f0..537e2589d 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -44,7 +44,7 @@ {{/if}} - + {{#if @model.isNew}} <:title>{{t 'form.type.label'}} diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 80b9f9275..de9e492aa 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -2,7 +2,6 @@ @onSubmit={{@submit}} @cancel={{@cancel}} @disabled={{@model.isSaving}} - @disabled={{@model.isSaving}} @error={{@model.errors.base}} @showEditToggle={{if @model.isNew false true}} as |form| @@ -45,7 +44,7 @@ {{/if}} - + {{#if @model.isNew}} <:title>{{t 'form.type.label'}} diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index 39a9d270c..def897e50 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -1,10 +1,10 @@ {{component - (concat 'form/host-catalog/' @model.compositeType) - model=@model - submit=@submit - cancel=@cancel - changeType=@changeType - }} + (concat 'form/host-catalog/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel + changeType=@changeType +}} {{!-- {{#if @model.isStatic}} {{component diff --git a/ui/admin/app/components/form/host-catalog/index.js b/ui/admin/app/components/form/host-catalog/index.js deleted file mode 100644 index f6ac0ba23..000000000 --- a/ui/admin/app/components/form/host-catalog/index.js +++ /dev/null @@ -1,29 +0,0 @@ -import Component from '@glimmer/component'; -import { action } from '@ember/object'; -import { tracked } from '@glimmer/tracking'; - -export default class FormHostCatalogIndexComponent extends Component { - // // =properties - // /** - // /** - // */ - // @tracked showDynamicPlugins = false; - // // =actions - - // @action - // toggleType(type) { - // this.renderDynamicPlugins(type); - // } - // //show dynamic type radio cards -> aws and azure if the type is dynamic - // //call route action to update the query and rerender the model if static is selected - // renderDynamicPlugins(type) { - // if (type === 'dynamic') { - // this.showDynamicPlugins = true; - // } else { - // this.showDynamicPlugins = false; - // //CHECK:how to call the action to update query param - // // this.args.model.type = 'static'; - // // this.args.changeType(); - // } - // } -} diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index b0b607602..50adcf87f 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -107,4 +107,4 @@ @cancelText={{t 'actions.cancel'}} /> {{/if}} - + \ No newline at end of file diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index fef70cf13..40cf6f01a 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -37,7 +37,7 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { @action async changeType(type) { const model = this.modelFor('scopes.scope.host-catalogs.new'); - if(!type) type = 'static'; // Unknown host catalog type defaults to 'static' + if (!type) type = 'static'; // Unknown host catalog type defaults to 'static' if (model.isUnknown) type = 'aws'; //Is this the default case for plugin type? model.compositeType = type; await this.router.replaceWith({ queryParams: { type } }); From bd5a7c0aa91d6991e69cf425355da2d4c5407870 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 2 Feb 2022 12:09:13 -0800 Subject: [PATCH 025/148] pull from int branch --- .../app/components/form/host-catalog/aws/index.hbs | 4 ++-- .../app/components/form/host-catalog/azure/index.hbs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) 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 537e2589d..d00fa198b 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -124,7 +124,7 @@ readonly={{false}} /> - + /> --}} {{#if (can 'save model' @model)}} - + /> --}} {{#if (can 'save model' @model)}} Date: Wed, 2 Feb 2022 14:39:08 -0800 Subject: [PATCH 026/148] add translations --- addons/core/translations/form/en-us.yaml | 10 ++++++ .../form/host-catalog/aws/index.hbs | 30 +++++------------ .../form/host-catalog/azure/index.hbs | 31 ++++++----------- .../components/form/host-catalog/index.hbs | 33 +------------------ .../form/host-catalog/static/index.hbs | 5 +-- 5 files changed, 33 insertions(+), 76 deletions(-) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 05105fbac..87beceb23 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -118,3 +118,13 @@ callback_url: filter: label: Filter help: A boolean expression defining a filter run against the provided information. +tenant_id: + label: Tenant ID +subscription_id: + label: Subscription ID +access_key_id: + label: Access Key ID +secret_access_key: + label: Secret Access Key +region: + label: Region \ No newline at end of file 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 d00fa198b..f9f02515f 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -13,6 +13,7 @@ @label={{t 'form.name.label'}} @helperText={{t 'form.name.help'}} @error={{@model.errors.name}} + disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -81,16 +82,18 @@ as |radioGroup| > @@ -106,10 +109,11 @@ as |radioGroup| > @@ -119,27 +123,11 @@ - {{!-- - - --}} - {{#if (can 'save model' @model)}} @@ -81,16 +82,18 @@ as |radioGroup| > @@ -106,10 +109,11 @@ as |radioGroup| > @@ -119,27 +123,11 @@ - {{!-- - - --}} - {{#if (can 'save model' @model)}} {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index def897e50..90cebebc9 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -4,35 +4,4 @@ submit=@submit cancel=@cancel changeType=@changeType -}} - -{{!-- {{#if @model.isStatic}} - {{component - (concat 'form/host-catalog/' @model.type) - model=@model - submit=@submit - cancel=@cancel - form=form - toggleType=this.toggleType - showDynamicPlugins=this.showDynamicPlugins - }} -{{else if @model.isPlugin}} - Model is plugin - {{#if @model.isAWS}} - Model is Aws - {{else if @model.isAzure}} - Model is Azure - {{/if}} -{{/if}} --}} - -{{!-- {{#if @model.type}} - {{component - (concat 'form/auth-method/' @model.type) - model=@model - submit=@submit - cancel=@cancel - removeItemByIndex=@removeItemByIndex - addStringItem=@addStringItem - addAccountClaimMapItem=@addAccountClaimMapItem - }} -{{/if}} --}} \ No newline at end of file +}} \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index 50adcf87f..caac65a1d 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -13,6 +13,7 @@ @label={{t 'form.name.label'}} @helperText={{t 'form.name.help'}} @error={{@model.errors.name}} + disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -82,13 +83,13 @@ as |radioGroup| > Date: Wed, 2 Feb 2022 17:39:22 -0800 Subject: [PATCH 027/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20host=20catalog=20?= =?UTF-8?q?creation=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../acceptance/host-catalogs/create-test.js | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/ui/admin/tests/acceptance/host-catalogs/create-test.js b/ui/admin/tests/acceptance/host-catalogs/create-test.js index b47b3b4ea..1cfafabe7 100644 --- a/ui/admin/tests/acceptance/host-catalogs/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/create-test.js @@ -31,6 +31,8 @@ module('Acceptance | host-catalogs | create', function (hooks) { hostCatalogs: null, hostCatalog: null, newHostCatalog: null, + newStaticHostCatalog: null, + newDynamicHostCatalog: null, }; hooks.beforeEach(function () { @@ -64,6 +66,8 @@ module('Acceptance | host-catalogs | create', function (hooks) { urls.hostCatalog = `${urls.hostCatalogs}/${instances.hostCatalog.id}`; urls.newHostCatalog = `${urls.hostCatalogs}/new`; + urls.newStaticHostCatalog = `${urls.newHostCatalog}?type=static`; + urls.newDynamicHostCatalog = `${urls.newHostCatalog}?type=aws`; // Generate resource couner gethostCatalogCount = () => this.server.schema.hostCatalogs.all().models.length; @@ -71,11 +75,29 @@ module('Acceptance | host-catalogs | create', function (hooks) { authenticateSession({}); }); - test('Users can create new host catalogs', async function (assert) { + test('Users can create new static host catalogs', async function (assert) { assert.expect(1); const count = gethostCatalogCount(); - await visit(urls.newHostCatalog); + await visit(urls.newStaticHostCatalog); + console.log( + urls.newStaticHostCatalog, + 'NEW HOST CATALOGG', + gethostCatalogCount() + ); await fillIn('[name="name"]', 'random string'); + await fillIn('[name="description"]', 'random string'); + await fillIn('[name="types"]', 'static'); + await click('[type="submit"]'); + assert.equal(gethostCatalogCount(), count + 1); + }); + + test('Users can create new dynamic host catalogs', async function (assert) { + assert.expect(1); + const count = gethostCatalogCount(); + await visit(urls.newDynamicHostCatalog); + await fillIn('[name="name"]', 'random string'); + await fillIn('[name="description"]', 'random string'); + await fillIn('[name="types"]', 'aws'); await click('[type="submit"]'); assert.equal(gethostCatalogCount(), count + 1); }); @@ -83,7 +105,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { test('Users can cancel create new host catalogs', async function (assert) { assert.expect(2); const count = gethostCatalogCount(); - await visit(urls.newHostCatalog); + await visit(urls.newStaticHostCatalog); await fillIn('[name="name"]', 'random string'); await click('.rose-form-actions [type="button"]'); assert.equal(currentURL(), urls.hostCatalogs); @@ -111,7 +133,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { 'host-catalogs' ].includes('create') ); - assert.notOk(find(`[href="${urls.newHostCatalog}"]`)); + assert.notOk(find(`[href="${urls.newStaticHostCatalog}"]`)); }); test('saving a new host catalog with invalid fields displays error messages', async function (assert) { @@ -135,7 +157,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { } ); }); - await visit(urls.newHostCatalog); + await visit(urls.newStaticHostCatalog); await click('[type="submit"]'); assert.ok( find('[role="alert"]').textContent.trim(), From b3bde173bab2bca2a707d16aaaaca77d83720f48 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 2 Feb 2022 18:11:01 -0800 Subject: [PATCH 028/148] add missing translations --- ui/admin/app/components/form/host-catalog/aws/index.hbs | 6 +++--- ui/admin/app/components/form/host-catalog/azure/index.hbs | 6 +++--- ui/admin/app/components/form/host-catalog/static/index.hbs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) 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 f9f02515f..8a12ed1df 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -82,14 +82,14 @@ as |radioGroup| > Date: Wed, 2 Feb 2022 18:14:02 -0800 Subject: [PATCH 029/148] names --- ui/admin/app/components/form/host-catalog/azure/index.hbs | 2 +- ui/admin/app/components/form/host-catalog/static/index.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index bba300785..b3e0bfbd6 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -51,7 +51,7 @@ <:title>{{t 'form.type.label'}} <:body> {{t 'form.type.label'}} <:body> Date: Thu, 3 Feb 2022 10:38:10 -0800 Subject: [PATCH 030/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20remove=20helper?= =?UTF-8?q?=20text,=20fix=20=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/components/form/host-catalog/aws/index.hbs | 9 ++++----- .../app/components/form/host-catalog/azure/index.hbs | 11 ++++------- .../app/components/form/host-catalog/static/index.hbs | 7 +++---- .../tests/acceptance/host-catalogs/create-test.js | 2 +- 4 files changed, 12 insertions(+), 17 deletions(-) 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 8a12ed1df..7b294e368 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -72,11 +72,13 @@ + + <:title>{{t 'resources.host-catalog.form.provider-details'}} <:body> @@ -103,7 +103,7 @@ <:title>{{t 'resources.host-catalog.form.provider-details'}} <:body> diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index b3e0bfbd6..bdf8e15c0 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -51,7 +51,7 @@ <:title>{{t 'form.type.label'}} <:body> - + <:title>{{t 'resources.host-catalog.form.provider-details'}} <:body> @@ -103,7 +101,7 @@ <:title>{{t 'resources.host-catalog.form.provider-details'}} <:body> diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index be34effa8..232b63797 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -51,7 +51,7 @@ <:title>{{t 'form.type.label'}} <:body> {{#if @model.isPlugin}} + <:title>{{t 'resources.host-catalog.form.provider-details'}} <:body> diff --git a/ui/admin/tests/acceptance/host-catalogs/create-test.js b/ui/admin/tests/acceptance/host-catalogs/create-test.js index 1cfafabe7..68cfd6599 100644 --- a/ui/admin/tests/acceptance/host-catalogs/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/create-test.js @@ -86,7 +86,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { ); await fillIn('[name="name"]', 'random string'); await fillIn('[name="description"]', 'random string'); - await fillIn('[name="types"]', 'static'); + await fillIn('[name="static_types"]', 'static'); await click('[type="submit"]'); assert.equal(gethostCatalogCount(), count + 1); }); From d62a8afd3bccd5b37d1c01810a976277eff328c3 Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Thu, 3 Feb 2022 13:48:29 -0800 Subject: [PATCH 031/148] Update create-test.js --- ui/admin/tests/acceptance/host-catalogs/create-test.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ui/admin/tests/acceptance/host-catalogs/create-test.js b/ui/admin/tests/acceptance/host-catalogs/create-test.js index 68cfd6599..1f6fce2ff 100644 --- a/ui/admin/tests/acceptance/host-catalogs/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/create-test.js @@ -79,11 +79,6 @@ module('Acceptance | host-catalogs | create', function (hooks) { assert.expect(1); const count = gethostCatalogCount(); await visit(urls.newStaticHostCatalog); - console.log( - urls.newStaticHostCatalog, - 'NEW HOST CATALOGG', - gethostCatalogCount() - ); await fillIn('[name="name"]', 'random string'); await fillIn('[name="description"]', 'random string'); await fillIn('[name="static_types"]', 'static'); From a1ac704649f4059a1fb276b526d1eda8bc46d280 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 7 Feb 2022 10:32:13 -0800 Subject: [PATCH 032/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20update=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-catalog/aws/index.hbs | 2 +- ui/admin/app/components/form/host-catalog/azure/index.hbs | 4 ++-- ui/admin/app/components/form/host-catalog/static/index.hbs | 4 ++-- ui/admin/tests/acceptance/host-catalogs/create-test.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) 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 7b294e368..8361e2e5b 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -78,7 +78,7 @@ <:title>{{t 'resources.host-catalog.form.provider-details'}} <:body> {{t 'form.type.label'}} <:body> {{t 'resources.host-catalog.form.provider-details'}} <:body> {{t 'form.type.label'}} <:body> {{t 'resources.host-catalog.form.provider-details'}} <:body> Date: Mon, 7 Feb 2022 12:48:32 -0800 Subject: [PATCH 033/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20move=20out=20rout?= =?UTF-8?q?e-action=20from=20the=20components?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-catalog/aws/index.hbs | 4 ++-- ui/admin/app/components/form/host-catalog/azure/index.hbs | 4 ++-- ui/admin/app/components/form/host-catalog/static/index.hbs | 4 ++-- ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) 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 8361e2e5b..a50c29492 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -53,7 +53,7 @@ From ab95378f6e6f4fdf3531f01a52721e451cf9924c Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 7 Feb 2022 14:04:03 -0800 Subject: [PATCH 034/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20radioGroup=20name?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-catalog/aws/index.hbs | 4 ++-- ui/admin/app/components/form/host-catalog/azure/index.hbs | 6 +++--- ui/admin/app/components/form/host-catalog/static/index.hbs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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 a50c29492..dbe615370 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -78,7 +78,7 @@ <:title>{{t 'resources.host-catalog.form.provider-details'}} <:body> {{t 'resources.host-catalog.form.provider-details'}} <:body> {{t 'form.type.label'}} <:body> {{t 'resources.host-catalog.form.provider-details'}} <:body> {{t 'resources.host-catalog.form.provider-details'}} <:body> {{t 'resources.host-catalog.form.provider-details'}} <:body> Date: Mon, 7 Feb 2022 14:10:12 -0800 Subject: [PATCH 035/148] translation label fix --- addons/core/translations/resources/en-us.yaml | 3 ++- ui/admin/app/components/form/host-catalog/aws/index.hbs | 4 ++-- ui/admin/app/components/form/host-catalog/azure/index.hbs | 4 ++-- ui/admin/app/components/form/host-catalog/static/index.hbs | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index d7a3a1db3..5cee71441 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -91,7 +91,8 @@ host-catalog: azure: Azure dynamic: Dynamic form: - provider-details: Provider Details + provider-details: + label: Provider Details types: static: help: Provide a list of hosts and host sets with static addresses 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 dbe615370..683ea2569 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -75,7 +75,7 @@ - <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:title>{{t 'resources.host-catalog.form.provider-details.label'}} <:body> {{else}} - <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:title>{{t 'resources.host-catalog.form.provider-details.label'}} <:body> - <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:title>{{t 'resources.host-catalog.form.provider-details.label'}} <:body> {{else}} - <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:title>{{t 'resources.host-catalog.form.provider-details.label'}} <:body> - <:title>{{t 'resources.host-catalog.form.provider-details'}} + <:title>{{t 'resources.host-catalog.form.provider-details.label'}} <:body> Date: Mon, 7 Feb 2022 14:21:52 -0800 Subject: [PATCH 036/148] lint fic --- ui/admin/app/components/form/host-catalog/aws/index.hbs | 8 ++++++-- ui/admin/app/components/form/host-catalog/azure/index.hbs | 8 ++++++-- .../app/components/form/host-catalog/static/index.hbs | 4 +++- 3 files changed, 15 insertions(+), 5 deletions(-) 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 683ea2569..c94fe1f24 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -75,7 +75,9 @@ - <:title>{{t 'resources.host-catalog.form.provider-details.label'}} + <:title>{{t + 'resources.host-catalog.form.provider-details.label' + }} <:body> {{else}} - <:title>{{t 'resources.host-catalog.form.provider-details.label'}} + <:title>{{t + 'resources.host-catalog.form.provider-details.label' + }} <:body> - <:title>{{t 'resources.host-catalog.form.provider-details.label'}} + <:title>{{t + 'resources.host-catalog.form.provider-details.label' + }} <:body> {{else}} - <:title>{{t 'resources.host-catalog.form.provider-details.label'}} + <:title>{{t + 'resources.host-catalog.form.provider-details.label' + }} <:body> - <:title>{{t 'resources.host-catalog.form.provider-details.label'}} + <:title>{{t + 'resources.host-catalog.form.provider-details.label' + }} <:body> Date: Mon, 7 Feb 2022 20:59:27 -0800 Subject: [PATCH 037/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20translation=20ord?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 24 ++++++++++--------- .../form/host-catalog/aws/index.hbs | 18 +++++++------- .../form/host-catalog/azure/index.hbs | 18 +++++++------- .../form/host-catalog/static/index.hbs | 14 +++++------ .../scopes/scope/host-catalogs/index.hbs | 3 +++ 5 files changed, 41 insertions(+), 36 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 5cee71441..35e000970 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -85,19 +85,21 @@ host-catalog: actions: delete: Delete Host Catalog types: - static: Static - unknown: Unknown - aws: AWS - azure: Azure - dynamic: Dynamic + static: + label: Static + help: Provide a list of hosts and host sets with static addresses + unknown: + label: Unknown + aws: + label: AWS + azure: + label: Azure + dynamic: + label: Dynamic + help: Automate discovery of target hosts and services on Azure or AWS form: - provider-details: + provider_details: label: Provider Details - types: - static: - help: Provide a list of hosts and host sets with static addresses - dynamic: - help: Automate discovery of target hosts and services on Azure or AWS 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 c94fe1f24..77dfc8a52 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| > @@ -76,7 +76,7 @@ <:title>{{t - 'resources.host-catalog.form.provider-details.label' + 'resources.host-catalog.form.provider_details.label' }} <:body> <:title>{{t - 'resources.host-catalog.form.provider-details.label' + 'resources.host-catalog.form.provider_details.label' }} <:body> @@ -74,7 +74,7 @@ <:title>{{t - 'resources.host-catalog.form.provider-details.label' + 'resources.host-catalog.form.provider_details.label' }} <:body> <:title>{{t - 'resources.host-catalog.form.provider-details.label' + 'resources.host-catalog.form.provider_details.label' }} <:body> @@ -76,7 +76,7 @@ <:title>{{t - 'resources.host-catalog.form.provider-details.label' + 'resources.host-catalog.form.provider_details.label' }} <:body> diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/index.hbs index f7def8b62..79e33a11c 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/index.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/index.hbs @@ -62,6 +62,7 @@ (concat 'resources.host-catalog.types.' hostCatalog.compositeType + '.label' ) }} @@ -71,6 +72,7 @@ (concat 'resources.host-catalog.types.' hostCatalog.compositeType + '.label' ) }} @@ -86,6 +88,7 @@ (concat 'resources.host-catalog.types.' hostCatalog.compositeType + '.label' ) }} From d0f8da1f816d6379f35b52a680da4101ab1429ed Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 7 Feb 2022 21:27:38 -0800 Subject: [PATCH 038/148] add rest of the AWS and azure fields --- addons/core/translations/form/en-us.yaml | 8 +++++++ .../form/host-catalog/aws/index.hbs | 20 +++++++++++++++++ .../form/host-catalog/azure/index.hbs | 22 +++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 87beceb23..1f56d9d22 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -120,11 +120,19 @@ filter: help: A boolean expression defining a filter run against the provided information. tenant_id: label: Tenant ID + help: The tenant (directory) ID for your Azure Active Directory application. + link-text: Learn more subscription_id: label: Subscription ID + help: The subscription ID for the subscription with read access. + link-text: Learn more access_key_id: label: Access Key ID + help: The access key ID found on the Security Credentials page in AWS. + link-text: Learn more secret_access_key: label: Secret Access Key + help: The subscription ID for the subscription with read access. + link-text: Learn more region: label: Region \ No newline at end of file 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 77dfc8a52..cb453a2f4 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -131,6 +131,26 @@ readonly={{false}} /> + + + {{#if (can 'save model' @model)}} + + + + From 4559c1b650d82f6116fadd215ba1e7088e93e857 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 7 Feb 2022 22:31:58 -0800 Subject: [PATCH 039/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20label=20and=20pad?= =?UTF-8?q?ding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 6 ++++- .../rose/components/form/_radio-card.scss | 2 +- .../form/host-catalog/aws/index.hbs | 16 +++++++++--- .../form/host-catalog/azure/index.hbs | 25 +++++++++++++++---- .../form/host-catalog/static/index.hbs | 12 +++++++-- .../acceptance/host-catalogs/create-test.js | 2 +- 6 files changed, 49 insertions(+), 14 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 35e000970..27e3497c0 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -98,8 +98,12 @@ host-catalog: label: Dynamic help: Automate discovery of target hosts and services on Azure or AWS form: - provider_details: + provider: label: Provider Details + description: This is the provider for this host catalog. The format of the host set filters are specific to each provider. + choose_a_provider: + label: Choose a provider + description: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin. host-set: title: Host Set title_plural: Host Sets diff --git a/addons/rose/addon/styles/rose/components/form/_radio-card.scss b/addons/rose/addon/styles/rose/components/form/_radio-card.scss index 5e8018b40..d8b69c896 100644 --- a/addons/rose/addon/styles/rose/components/form/_radio-card.scss +++ b/addons/rose/addon/styles/rose/components/form/_radio-card.scss @@ -61,7 +61,7 @@ $radio-svg: ( display: inline-flex; align-items: center; justify-content: center; - margin: $size-m $size-xs $size-xl 0; + margin: $size-m $size-xs $size-m 0; .radio-card-overlay { position: absolute; 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 77dfc8a52..d343e3cdd 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -73,11 +73,18 @@ + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:title>{{t - 'resources.host-catalog.form.provider_details.label' + 'resources.host-catalog.form.provider.choose_a_provider.label' }} + <:description>{{t + 'resources.host-catalog.form.provider.choose_a_provider.description' + }} + <:body> {{else}} - <:title>{{t - 'resources.host-catalog.form.provider_details.label' - }} + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} <:body> {{#if @model.isNew}} + {{!-- {{t + 'resources.host-catalog.form.provider.label' + }} --}} + <:title>{{t 'form.type.label'}} <:body> + + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:title>{{t - 'resources.host-catalog.form.provider_details.label' + 'resources.host-catalog.form.provider.choose_a_provider.label' }} + <:description>{{t + 'resources.host-catalog.form.provider.choose_a_provider.description' + }} + <:body> {{else}} + - <:title>{{t - 'resources.host-catalog.form.provider_details.label' - }} + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} + <:body> {{t 'form.type.label'}} <:body> + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + + <:title>{{t - 'resources.host-catalog.form.provider_details.label' + 'resources.host-catalog.form.provider.choose_a_provider.label' }} + <:description>{{t + 'resources.host-catalog.form.provider.choose_a_provider.description' + }} + <:body> Date: Mon, 7 Feb 2022 23:10:36 -0800 Subject: [PATCH 040/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/form/en-us.yaml | 6 +++++- ui/admin/app/components/form/host-catalog/aws/index.hbs | 5 +++-- ui/admin/app/components/form/host-catalog/azure/index.hbs | 7 +++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 1f56d9d22..227029c9b 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -135,4 +135,8 @@ secret_access_key: help: The subscription ID for the subscription with read access. link-text: Learn more region: - label: Region \ No newline at end of file + label: Region +provider_client_id: + label: Client ID + link-text : Learn more + help: The client ID for the client you want Boundary to use. \ No newline at end of file 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 5523c7d8c..d0ab94807 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -139,7 +139,7 @@ readonly={{false}} /> - - From 1b70f9acfb6de933fcf6b7a98159ead8ccff833f Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 7 Feb 2022 23:37:40 -0800 Subject: [PATCH 041/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20field=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-catalog/aws/index.hbs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 d0ab94807..0470f3515 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -132,7 +132,7 @@ {{/if}} From 92d7380f832c16ed8962626993f374661a991b78 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 8 Feb 2022 13:11:08 -0500 Subject: [PATCH 042/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20clean=20up=20un?= =?UTF-8?q?used=20new=20instances?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/routes/scopes/scope/host-catalogs/new.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 40cf6f01a..588ecac90 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -17,6 +17,14 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { // =methods + /** + * Rollback/destroy any new, unsaved instances from this route before + * creating another. + */ + beforeModel() { + if (this.currentModel?.isNew) this.currentModel.rollbackAttributes(); + } + /** * Creates a new unsaved host catalog belonging to the current scope. * @return {HostCatalogModel} From 353a7f94ad40ffbc91e7423a7058a50e9c31990b Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 10:30:11 -0800 Subject: [PATCH 043/148] =?UTF-8?q?test:=20=F0=9F=92=8D=20update=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../acceptance/host-catalogs/create-test.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ui/admin/tests/acceptance/host-catalogs/create-test.js b/ui/admin/tests/acceptance/host-catalogs/create-test.js index f07467f8e..19fc1dd3d 100644 --- a/ui/admin/tests/acceptance/host-catalogs/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/create-test.js @@ -97,7 +97,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { assert.equal(gethostCatalogCount(), count + 1); }); - test('Users can cancel create new host catalogs', async function (assert) { + test('Users can cancel creation of new static host catalogs', async function (assert) { assert.expect(2); const count = gethostCatalogCount(); await visit(urls.newStaticHostCatalog); @@ -107,7 +107,17 @@ module('Acceptance | host-catalogs | create', function (hooks) { assert.equal(gethostCatalogCount(), count); }); - test('Users can navigate to new host catalogs route with proper authorization', async function (assert) { + test('Users can cancel creation of new dynamic host catalogs', async function (assert) { + assert.expect(2); + const count = gethostCatalogCount(); + await visit(urls.newDynamicHostCatalog); + await fillIn('[name="name"]', 'random string'); + await click('.rose-form-actions [type="button"]'); + assert.equal(currentURL(), urls.hostCatalogs); + assert.equal(gethostCatalogCount(), count); + }); + + test('Users can navigate to new static host catalogs route with proper authorization', async function (assert) { assert.expect(2); await visit(urls.hostCatalogs); assert.ok( @@ -118,7 +128,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { assert.ok(find(`[href="${urls.newHostCatalog}"]`)); }); - test('Users cannot navigate to new host catalogs route without proper authorization', async function (assert) { + test('Users cannot navigate to new static host catalogs route without proper authorization', async function (assert) { assert.expect(2); instances.scopes.project.authorized_collection_actions['host-catalogs'] = []; @@ -131,7 +141,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { assert.notOk(find(`[href="${urls.newStaticHostCatalog}"]`)); }); - test('saving a new host catalog with invalid fields displays error messages', async function (assert) { + test('saving a new static host catalog with invalid fields displays error messages', async function (assert) { assert.expect(2); this.server.post('/host-catalogs', () => { return new Response( From d108baccfc08ec9eb17ce224e6c3940fd23645e4 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 12:30:14 -0800 Subject: [PATCH 044/148] split host-set into static, aws and azure --- addons/core/translations/form/en-us.yaml | 6 +- .../components/form/host-set/aws/index.hbs | 109 +++++++++++++++++ .../components/form/host-set/azure/index.hbs | 110 ++++++++++++++++++ .../app/components/form/host-set/index.hbs | 67 +---------- .../components/form/host-set/static/index.hbs | 57 +++++++++ 5 files changed, 287 insertions(+), 62 deletions(-) create mode 100644 ui/admin/app/components/form/host-set/aws/index.hbs create mode 100644 ui/admin/app/components/form/host-set/azure/index.hbs create mode 100644 ui/admin/app/components/form/host-set/static/index.hbs diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 227029c9b..489145681 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -139,4 +139,8 @@ region: provider_client_id: label: Client ID link-text : Learn more - help: The client ID for the client you want Boundary to use. \ No newline at end of file + help: The client ID for the client you want Boundary to use. +provider_filter: + label: Filter + help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider. + link-text: Learn more about using filters for Azure resources. \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/aws/index.hbs b/ui/admin/app/components/form/host-set/aws/index.hbs new file mode 100644 index 000000000..f4157e973 --- /dev/null +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -0,0 +1,109 @@ +{{@model.type}} {{@model.compositeType}} + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} + + <:body> + + + + + + + + {{#if @model.errors.filters}} + + {{#each @model.errors.filters as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs new file mode 100644 index 000000000..332c58f04 --- /dev/null +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -0,0 +1,110 @@ +{{@model.type}} {{@model.compositeType}} + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} + + <:body> + + + + + + + + {{#if @model.errors.filter}} + + {{#each @model.errors.filter as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{#if (can 'save model' @model)}} + + {{/if}} + diff --git a/ui/admin/app/components/form/host-set/index.hbs b/ui/admin/app/components/form/host-set/index.hbs index 01864acc5..da084d1fe 100644 --- a/ui/admin/app/components/form/host-set/index.hbs +++ b/ui/admin/app/components/form/host-set/index.hbs @@ -1,63 +1,8 @@ - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - {{#if (can 'save model' @model)}} - - {{/if}} - \ No newline at end of file +{{component + (concat 'form/host-set/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel +}} \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/static/index.hbs b/ui/admin/app/components/form/host-set/static/index.hbs new file mode 100644 index 000000000..397b80a95 --- /dev/null +++ b/ui/admin/app/components/form/host-set/static/index.hbs @@ -0,0 +1,57 @@ + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{#if (can 'save model' @model)}} + + {{/if}} + From dad3918d446fc5e31a5dd0dd8175073d772c6cae Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 14:51:59 -0800 Subject: [PATCH 045/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20host-set:=20upda?= =?UTF-8?q?tes=20to=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/host-set/aws/index.hbs | 46 +++++++++--------- .../components/form/host-set/azure/index.hbs | 47 +++++++++---------- .../app/components/form/host-set/index.hbs | 2 - .../components/form/host-set/static/index.hbs | 2 +- 4 files changed, 47 insertions(+), 50 deletions(-) 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 f4157e973..155592a57 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -1,4 +1,3 @@ -{{@model.type}} {{@model.compositeType}} - - - <:title>{{t 'resources.host-catalog.form.provider.label'}} - <:description>{{t - 'resources.host-catalog.form.provider.description' - }} + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} - <:body> - - - - - + <:body> + + + + + - - - <:title>{{t 'resources.host-catalog.form.provider.label'}} - <:description>{{t - 'resources.host-catalog.form.provider.description' - }} + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} - <:body> - - - - - + <:body> + + + + + {{/if}} - + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/index.hbs b/ui/admin/app/components/form/host-set/index.hbs index da084d1fe..5c3bd3f0c 100644 --- a/ui/admin/app/components/form/host-set/index.hbs +++ b/ui/admin/app/components/form/host-set/index.hbs @@ -1,5 +1,3 @@ - - {{component (concat 'form/host-set/' @model.compositeType) model=@model diff --git a/ui/admin/app/components/form/host-set/static/index.hbs b/ui/admin/app/components/form/host-set/static/index.hbs index 397b80a95..7ed797846 100644 --- a/ui/admin/app/components/form/host-set/static/index.hbs +++ b/ui/admin/app/components/form/host-set/static/index.hbs @@ -54,4 +54,4 @@ @cancelText={{t 'actions.cancel'}} /> {{/if}} - + \ No newline at end of file From ee06a9c8252bb98d2a7f4f297b6e5f6f2aeb5483 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 8 Feb 2022 14:44:15 -0800 Subject: [PATCH 046/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Refactor=20mira?= =?UTF-8?q?ge=20for=20GET=20host-catalog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactor mirage data for GET host-catalog method. --- addons/api/mirage/factories/host-catalog.js | 23 +++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/addons/api/mirage/factories/host-catalog.js b/addons/api/mirage/factories/host-catalog.js index 776d8cdfa..0cf046228 100644 --- a/addons/api/mirage/factories/host-catalog.js +++ b/addons/api/mirage/factories/host-catalog.js @@ -47,19 +47,30 @@ export default factory.extend({ case 'aws': return { disable_credential_rotation: datatype.boolean(), - tenant_id: datatype.hexaDecimal(6), - client_id: datatype.hexaDecimal(6), - subscription_id: datatype.hexaDecimal(8), - secret_id: datatype.hexaDecimal(6), - secret_value: datatype.string(12), + region: address.state(), }; case 'azure': return { disable_credential_rotation: datatype.boolean(), - region: address.state(), + tenant_id: datatype.hexaDecimal(6), + client_id: datatype.hexaDecimal(6), + subscription_id: datatype.hexaDecimal(8), + }; + } + }, + + secrets() { + switch (this.plugin?.name) { + case 'aws': + return { access_key_id: datatype.hexaDecimal(8), secret_access_key: datatype.string(12), }; + case 'azure': + return { + secret_id: datatype.hexaDecimal(6), + secret_value: datatype.string(12), + }; } }, withChildren: trait({ From 52d6d1c4bf4162d086214c8dcffd6c455a83c573 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 17:26:43 -0800 Subject: [PATCH 047/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20remove=20links=20?= =?UTF-8?q?for=20now?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-set/aws/index.hbs | 1 - ui/admin/app/components/form/host-set/azure/index.hbs | 1 - 2 files changed, 2 deletions(-) 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 155592a57..1fe12c0a2 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -83,7 +83,6 @@ @label={{t 'form.provider_filter.label'}} @helperText={{t 'form.provider_filter.help'}} @linkText={{t 'form.provider_filter.link-text'}} - @link='https://docs.aws.amazon.com/ARG/latest/APIReference/API_ListGroupResources.html' @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index df2a3aa40..7d32a3b97 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -83,7 +83,6 @@ @label={{t 'form.provider_filter.label'}} @helperText={{t 'form.provider_filter.help'}} @linkText={{t 'form.provider_filter.link-text'}} - @link='https://docs.microsoft.com/en-us/rest/api/resources/Resources/List#uri-parameters' @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} From 203a4b3a555f2eeb0ddd68694f792fb772be478c Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 19:37:21 -0800 Subject: [PATCH 048/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20host=20typed=20f?= =?UTF-8?q?orms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 3 + ui/admin/app/components/form/host/index.hbs | 64 +++++++++++++------ 2 files changed, 49 insertions(+), 18 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 27e3497c0..c9186a3f9 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -155,6 +155,9 @@ host: unknown: Unknown aws: AWS azure: Azure + form: + provider: + label: Provider Details session: title: Session title_plural: Sessions diff --git a/ui/admin/app/components/form/host/index.hbs b/ui/admin/app/components/form/host/index.hbs index 9b39cdb26..0045a8362 100644 --- a/ui/admin/app/components/form/host/index.hbs +++ b/ui/admin/app/components/form/host/index.hbs @@ -53,24 +53,52 @@ {{/if}} - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - + {{#if @model.isPlugin}} + + <:title>{{t 'resources.host.form.provider.label'}} + <:body> + + + + + + + {{else}} + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{/if}} {{#if (can 'save model' @model)}} Date: Mon, 7 Feb 2022 09:48:51 -0800 Subject: [PATCH 049/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Add=20new=20fiel?= =?UTF-8?q?ds=20to=20host?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add new fields to host and refactor field address to use no more fragment-host-attribute-model --- addons/api/addon/generated/models/host.js | 18 +++++++ .../addon/models/fragment-host-attributes.js | 9 ---- addons/api/addon/models/host.js | 21 +++++--- .../app/models/fragment-host-attributes.js | 1 - .../api/tests/unit/serializers/host-test.js | 51 +++++++++++++++---- 5 files changed, 73 insertions(+), 27 deletions(-) delete mode 100644 addons/api/addon/models/fragment-host-attributes.js delete mode 100644 addons/api/app/models/fragment-host-attributes.js diff --git a/addons/api/addon/generated/models/host.js b/addons/api/addon/generated/models/host.js index 08efa6397..3873070f2 100644 --- a/addons/api/addon/generated/models/host.js +++ b/addons/api/addon/generated/models/host.js @@ -44,9 +44,27 @@ export default class GeneratedHostModel extends BaseModel { }) version; + @attr({ + description: 'Attributes specific to the host type', + }) + attributes; + + @attr('string', { + description: 'The address (DNS or IP name) used to reach the host', + isNestedAttribute: true, + }) + address; + @attr({ description: 'Plugin information for this resource.', readOnly: true, }) plugin; + + @attr('string', { + description: '', + readOnly: true, + isNestedAttribute: true, + }) + external_id; } diff --git a/addons/api/addon/models/fragment-host-attributes.js b/addons/api/addon/models/fragment-host-attributes.js deleted file mode 100644 index 3f0ac9073..000000000 --- a/addons/api/addon/models/fragment-host-attributes.js +++ /dev/null @@ -1,9 +0,0 @@ -import Fragment from 'ember-data-model-fragments/fragment'; -import { attr } from '@ember-data/model'; - -export default class FragmentHostAttributesModel extends Fragment { - @attr('string', { - description: 'The address (DNS or IP name) used to reach the host', - }) - address; -} diff --git a/addons/api/addon/models/host.js b/addons/api/addon/models/host.js index 14acc4d27..133464027 100644 --- a/addons/api/addon/models/host.js +++ b/addons/api/addon/models/host.js @@ -1,12 +1,21 @@ import GeneratedHostModel from '../generated/models/host'; -import { fragment } from 'ember-data-model-fragments/attributes'; +import { fragmentArray } from 'ember-data-model-fragments/attributes'; export default class HostModel extends GeneratedHostModel { - /** - * Attributes of this resource, if any, represented as a JSON fragment. - * @type {FragmentHostAttributesModel} - */ - @fragment('fragment-host-attributes', { defaultValue: {} }) attributes; + @fragmentArray('fragment-string', { + readOnly: true, + emptyArrayIfMissing: true, + isNestedAttribute: true, + }) + ip_addresses; + + // Aws specific + @fragmentArray('fragment-string', { + readOnly: true, + emptyArrayIfMissing: true, + isNestedAttribute: true, + }) + dns_names; /** * True if the host is static. diff --git a/addons/api/app/models/fragment-host-attributes.js b/addons/api/app/models/fragment-host-attributes.js deleted file mode 100644 index 201efcb7a..000000000 --- a/addons/api/app/models/fragment-host-attributes.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from 'api/models/fragment-host-attributes'; diff --git a/addons/api/tests/unit/serializers/host-test.js b/addons/api/tests/unit/serializers/host-test.js index 4c531ca82..e6361984c 100644 --- a/addons/api/tests/unit/serializers/host-test.js +++ b/addons/api/tests/unit/serializers/host-test.js @@ -4,19 +4,48 @@ import { setupTest } from 'ember-qunit'; module('Unit | Serializer | host', function (hooks) { setupTest(hooks); - test('it exists', function (assert) { - let store = this.owner.lookup('service:store'); - let serializer = store.serializerFor('host'); - - assert.ok(serializer); + test('it serializes host with type static as expected', function (assert) { + assert.expect(1); + const store = this.owner.lookup('service:store'); + const record = store.createRecord('host', { + name: 'Host 1', + compositeType: 'static', + description: 'Description', + host_catalog_id: '123', + version: 1, + address: '188e:68a9:b342:c05c:2595:2f46:499c:759f', + }); + assert.deepEqual(record.serialize(), { + name: 'Host 1', + description: 'Description', + type: 'static', + host_catalog_id: '123', + version: 1, + attributes: { + address: '188e:68a9:b342:c05c:2595:2f46:499c:759f', + }, + }); }); - test('it serializes records', function (assert) { - let store = this.owner.lookup('service:store'); - let record = store.createRecord('host', {}); + test('it serializes host with type plugin as expected', function (assert) { + assert.expect(1); + const store = this.owner.lookup('service:store'); + const recordAws = store.createRecord('host', { + name: 'Host 2', + description: 'Description', + host_catalog_id: '123', + compositeType: 'aws', + address: '188e:68a9:b342:c05c:2595:2f46:499c:759f', + }); - let serializedRecord = record.serialize(); - - assert.ok(serializedRecord); + assert.deepEqual(recordAws.serialize(), { + name: 'Host 2', + description: 'Description', + host_catalog_id: '123', + type: 'plugin', + attributes: { + address: '188e:68a9:b342:c05c:2595:2f46:499c:759f', + }, + }); }); }); From 12277c5557be871d5f42c503290be563bec59e08 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 8 Feb 2022 08:24:39 -0800 Subject: [PATCH 050/148] Move new fields attributes from host generated model to plain host model. Add normalization tests --- addons/api/addon/generated/models/host.js | 18 ------ addons/api/addon/models/host.js | 15 +++++ .../api/tests/unit/serializers/host-test.js | 60 +++++++++++++++++++ 3 files changed, 75 insertions(+), 18 deletions(-) diff --git a/addons/api/addon/generated/models/host.js b/addons/api/addon/generated/models/host.js index 3873070f2..08efa6397 100644 --- a/addons/api/addon/generated/models/host.js +++ b/addons/api/addon/generated/models/host.js @@ -44,27 +44,9 @@ export default class GeneratedHostModel extends BaseModel { }) version; - @attr({ - description: 'Attributes specific to the host type', - }) - attributes; - - @attr('string', { - description: 'The address (DNS or IP name) used to reach the host', - isNestedAttribute: true, - }) - address; - @attr({ description: 'Plugin information for this resource.', readOnly: true, }) plugin; - - @attr('string', { - description: '', - readOnly: true, - isNestedAttribute: true, - }) - external_id; } diff --git a/addons/api/addon/models/host.js b/addons/api/addon/models/host.js index 133464027..6ff2022e4 100644 --- a/addons/api/addon/models/host.js +++ b/addons/api/addon/models/host.js @@ -1,7 +1,9 @@ import GeneratedHostModel from '../generated/models/host'; +import { attr } from '@ember-data/model'; import { fragmentArray } from 'ember-data-model-fragments/attributes'; export default class HostModel extends GeneratedHostModel { + // =attributes (nested under attributes) @fragmentArray('fragment-string', { readOnly: true, emptyArrayIfMissing: true, @@ -9,6 +11,19 @@ export default class HostModel extends GeneratedHostModel { }) ip_addresses; + @attr('string', { + description: 'The address (DNS or IP name) used to reach the host', + isNestedAttribute: true, + }) + address; + + @attr('string', { + description: '', + readOnly: true, + isNestedAttribute: true, + }) + external_id; + // Aws specific @fragmentArray('fragment-string', { readOnly: true, diff --git a/addons/api/tests/unit/serializers/host-test.js b/addons/api/tests/unit/serializers/host-test.js index e6361984c..366ca62ad 100644 --- a/addons/api/tests/unit/serializers/host-test.js +++ b/addons/api/tests/unit/serializers/host-test.js @@ -48,4 +48,64 @@ module('Unit | Serializer | host', function (hooks) { }, }); }); + + test('it normalizes type static record', function (assert) { + assert.expect(1); + const store = this.owner.lookup('service:store'); + const serializer = store.serializerFor('host'); + const host = store.createRecord('host').constructor; + const payload = { + id: '1', + name: 'host test', + type: 'static', + }; + const normalized = serializer.normalizeSingleResponse(store, host, payload); + assert.deepEqual(normalized, { + included: [], + data: { + id: '1', + type: 'host', + attributes: { + name: 'host test', + type: 'static', + authorized_actions: [], + dns_names: [], + ip_addresses: [], + }, + relationships: {}, + }, + }); + }); + + test('it normalizes type plugin (aws) record', function (assert) { + assert.expect(1); + const store = this.owner.lookup('service:store'); + const serializer = store.serializerFor('host'); + const host = store.createRecord('host').constructor; + const payload = { + id: '1', + name: 'host test', + type: 'plugin', + plugin: { + name: 'aws', + }, + }; + const normalized = serializer.normalizeSingleResponse(store, host, payload); + assert.deepEqual(normalized, { + included: [], + data: { + id: '1', + type: 'host', + attributes: { + name: 'host test', + type: 'plugin', + authorized_actions: [], + dns_names: [], + ip_addresses: [], + plugin: { name: 'aws' }, + }, + relationships: {}, + }, + }); + }); }); From 75f75878a1bb8131f235f80c5ed5b7affe4ababf Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 8 Feb 2022 15:17:01 -0800 Subject: [PATCH 051/148] Add real payload and real expectations on host normalisation unit test --- .../api/tests/unit/serializers/host-test.js | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/addons/api/tests/unit/serializers/host-test.js b/addons/api/tests/unit/serializers/host-test.js index 366ca62ad..7252ebc9c 100644 --- a/addons/api/tests/unit/serializers/host-test.js +++ b/addons/api/tests/unit/serializers/host-test.js @@ -58,6 +58,9 @@ module('Unit | Serializer | host', function (hooks) { id: '1', name: 'host test', type: 'static', + ip_addresses: ['10.0.0.1', '10.0.0.2', '10.0.0.3'], + authorized_actions: ['no-op', 'read'], + dns_names: ['test.example.internal', 'test.example.external'], }; const normalized = serializer.normalizeSingleResponse(store, host, payload); assert.deepEqual(normalized, { @@ -68,9 +71,16 @@ module('Unit | Serializer | host', function (hooks) { attributes: { name: 'host test', type: 'static', - authorized_actions: [], - dns_names: [], - ip_addresses: [], + authorized_actions: ['no-op', 'read'], + dns_names: [ + { value: 'test.example.internal' }, + { value: 'test.example.external' }, + ], + ip_addresses: [ + { value: '10.0.0.1' }, + { value: '10.0.0.2' }, + { value: '10.0.0.3' }, + ], }, relationships: {}, }, @@ -89,6 +99,9 @@ module('Unit | Serializer | host', function (hooks) { plugin: { name: 'aws', }, + ip_addresses: ['10.0.0.1', '10.0.0.2', '10.0.0.3'], + authorized_actions: ['no-op', 'read'], + dns_names: ['test.example.internal', 'test.example.external'], }; const normalized = serializer.normalizeSingleResponse(store, host, payload); assert.deepEqual(normalized, { @@ -99,9 +112,16 @@ module('Unit | Serializer | host', function (hooks) { attributes: { name: 'host test', type: 'plugin', - authorized_actions: [], - dns_names: [], - ip_addresses: [], + authorized_actions: ['no-op', 'read'], + dns_names: [ + { value: 'test.example.internal' }, + { value: 'test.example.external' }, + ], + ip_addresses: [ + { value: '10.0.0.1' }, + { value: '10.0.0.2' }, + { value: '10.0.0.3' }, + ], plugin: { name: 'aws' }, }, relationships: {}, From 46246441aaa44285212bb073ce33046fbc23f32c Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Wed, 9 Feb 2022 08:54:32 -0800 Subject: [PATCH 052/148] Refactor some readOnly attributes to have no type. Stop nesting plugin type fields. Refactor serializer/normalizer tests --- addons/api/addon/models/host.js | 21 ++++---- .../api/tests/unit/serializers/host-test.js | 54 ++++--------------- 2 files changed, 19 insertions(+), 56 deletions(-) diff --git a/addons/api/addon/models/host.js b/addons/api/addon/models/host.js index 6ff2022e4..035db1cd9 100644 --- a/addons/api/addon/models/host.js +++ b/addons/api/addon/models/host.js @@ -1,34 +1,33 @@ import GeneratedHostModel from '../generated/models/host'; import { attr } from '@ember-data/model'; -import { fragmentArray } from 'ember-data-model-fragments/attributes'; export default class HostModel extends GeneratedHostModel { - // =attributes (nested under attributes) - @fragmentArray('fragment-string', { - readOnly: true, - emptyArrayIfMissing: true, - isNestedAttribute: true, - }) - ip_addresses; + // =attributes + // Static specific fields @attr('string', { description: 'The address (DNS or IP name) used to reach the host', isNestedAttribute: true, }) address; + // Plugin specific fields + @attr({ + readOnly: true, + emptyArrayIfMissing: true, + }) + ip_addresses; + @attr('string', { description: '', readOnly: true, - isNestedAttribute: true, }) external_id; // Aws specific - @fragmentArray('fragment-string', { + @attr({ readOnly: true, emptyArrayIfMissing: true, - isNestedAttribute: true, }) dns_names; diff --git a/addons/api/tests/unit/serializers/host-test.js b/addons/api/tests/unit/serializers/host-test.js index 7252ebc9c..42d3aede0 100644 --- a/addons/api/tests/unit/serializers/host-test.js +++ b/addons/api/tests/unit/serializers/host-test.js @@ -27,29 +27,7 @@ module('Unit | Serializer | host', function (hooks) { }); }); - test('it serializes host with type plugin as expected', function (assert) { - assert.expect(1); - const store = this.owner.lookup('service:store'); - const recordAws = store.createRecord('host', { - name: 'Host 2', - description: 'Description', - host_catalog_id: '123', - compositeType: 'aws', - address: '188e:68a9:b342:c05c:2595:2f46:499c:759f', - }); - - assert.deepEqual(recordAws.serialize(), { - name: 'Host 2', - description: 'Description', - host_catalog_id: '123', - type: 'plugin', - attributes: { - address: '188e:68a9:b342:c05c:2595:2f46:499c:759f', - }, - }); - }); - - test('it normalizes type static record', function (assert) { + test('it normalizes type static record as expected', function (assert) { assert.expect(1); const store = this.owner.lookup('service:store'); const serializer = store.serializerFor('host'); @@ -58,9 +36,8 @@ module('Unit | Serializer | host', function (hooks) { id: '1', name: 'host test', type: 'static', - ip_addresses: ['10.0.0.1', '10.0.0.2', '10.0.0.3'], authorized_actions: ['no-op', 'read'], - dns_names: ['test.example.internal', 'test.example.external'], + address: '10.0.0.1', }; const normalized = serializer.normalizeSingleResponse(store, host, payload); assert.deepEqual(normalized, { @@ -72,22 +49,16 @@ module('Unit | Serializer | host', function (hooks) { name: 'host test', type: 'static', authorized_actions: ['no-op', 'read'], - dns_names: [ - { value: 'test.example.internal' }, - { value: 'test.example.external' }, - ], - ip_addresses: [ - { value: '10.0.0.1' }, - { value: '10.0.0.2' }, - { value: '10.0.0.3' }, - ], + address: '10.0.0.1', + dns_names: [], + ip_addresses: [], }, relationships: {}, }, }); }); - test('it normalizes type plugin (aws) record', function (assert) { + test('it normalizes type plugin (aws) record as expected', function (assert) { assert.expect(1); const store = this.owner.lookup('service:store'); const serializer = store.serializerFor('host'); @@ -99,8 +70,8 @@ module('Unit | Serializer | host', function (hooks) { plugin: { name: 'aws', }, - ip_addresses: ['10.0.0.1', '10.0.0.2', '10.0.0.3'], authorized_actions: ['no-op', 'read'], + ip_addresses: ['10.0.0.1', '10.0.0.2', '10.0.0.3'], dns_names: ['test.example.internal', 'test.example.external'], }; const normalized = serializer.normalizeSingleResponse(store, host, payload); @@ -113,15 +84,8 @@ module('Unit | Serializer | host', function (hooks) { name: 'host test', type: 'plugin', authorized_actions: ['no-op', 'read'], - dns_names: [ - { value: 'test.example.internal' }, - { value: 'test.example.external' }, - ], - ip_addresses: [ - { value: '10.0.0.1' }, - { value: '10.0.0.2' }, - { value: '10.0.0.3' }, - ], + ip_addresses: ['10.0.0.1', '10.0.0.2', '10.0.0.3'], + dns_names: ['test.example.internal', 'test.example.external'], plugin: { name: 'aws' }, }, relationships: {}, From 0d8752fbea6f4bf6cfacd9a124a957ea3cc7896c Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 9 Feb 2022 09:59:44 -0800 Subject: [PATCH 053/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20show=20latest=20a?= =?UTF-8?q?ddress=20in=20azure=20and=20aws?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host/index.hbs | 40 ++++++++++----------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/ui/admin/app/components/form/host/index.hbs b/ui/admin/app/components/form/host/index.hbs index 0045a8362..842fff694 100644 --- a/ui/admin/app/components/form/host/index.hbs +++ b/ui/admin/app/components/form/host/index.hbs @@ -76,29 +76,25 @@ - - {{else}} - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - {{/if}} + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + {{#if (can 'save model' @model)}} Date: Wed, 9 Feb 2022 13:51:38 -0500 Subject: [PATCH 054/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20reuse=20name/de?= =?UTF-8?q?scription=20when=20changing=20instance=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routes/scopes/scope/host-catalogs/new.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 588ecac90..1e4932280 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -17,21 +17,24 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { // =methods - /** - * Rollback/destroy any new, unsaved instances from this route before - * creating another. - */ - beforeModel() { - if (this.currentModel?.isNew) this.currentModel.rollbackAttributes(); - } - /** * Creates a new unsaved host catalog belonging to the current scope. + * Also rollback/destroy any new, unsaved instances from this route before + * creating another, but reuse name/description if available. * @return {HostCatalogModel} */ model() { const scopeModel = this.modelFor('scopes.scope'); - return this.store.createRecord('host-catalog', { scopeModel }); + let name, description; + if (this.currentModel?.isNew) { + ({ name, description } = this.currentModel); + this.currentModel.rollbackAttributes(); + } + return this.store.createRecord('host-catalog', { + scopeModel, + name, + description, + }); } afterModel(model, transition) { From 1188c7567c784341ad0fa5bdca4f7ba146bd4a88 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 9 Feb 2022 14:03:54 -0800 Subject: [PATCH 055/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20placeholder=20f?= =?UTF-8?q?or=20filters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/host-set/aws/index.hbs | 25 ++++--------------- .../components/form/host-set/azure/index.hbs | 2 +- 2 files changed, 6 insertions(+), 21 deletions(-) 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 1fe12c0a2..0e65d1aed 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -76,26 +76,11 @@ - - {{#if @model.errors.filters}} - - {{#each @model.errors.filters as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - + {{! placeholder for filter, update me when the model is ready }} + + <:title>{{t 'form.provider_filter.label'}} + <:description>{{t 'form.provider_filter.help'}} + {{#if (can 'save model' @model)}} + {{! placeholder for filter, update me when the model is ready }} Date: Wed, 9 Feb 2022 14:52:22 -0800 Subject: [PATCH 056/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 13 +++++++++---- ui/admin/app/components/form/host-set/aws/index.hbs | 2 +- .../app/components/form/host-set/azure/index.hbs | 2 +- .../host-catalogs/host-catalog/host-sets/index.hbs | 12 ++++++++++-- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 27e3497c0..29bd6c7a3 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -129,10 +129,15 @@ host-set: title: No Hosts Available description: No hosts available for selection. types: - static: Static - unknown: Unknown - aws: AWS - azure: Azure + 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 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 0e65d1aed..d5cb69c13 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -67,7 +67,7 @@ as |radioGroup| > {{#if hostSet.isStatic}} - {{t (concat 'resources.host-set.types.' hostSet.compositeType)}} + {{t + (concat + 'resources.host-set.types.' hostSet.compositeType '.label' + ) + }} {{else}} - {{t (concat 'resources.host-set.types.' hostSet.compositeType)}} + {{t + (concat + 'resources.host-set.types.' hostSet.compositeType '.label' + ) + }} {{/if}} From 9623806206634eb6791b5f47120d9d8f46f83e6b Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 9 Feb 2022 16:55:27 -0800 Subject: [PATCH 057/148] fix translations, split into three components --- addons/core/translations/resources/en-us.yaml | 13 +- .../app/components/form/host/aws/index.hbs | 83 +++++++++++++ .../app/components/form/host/azure/index.hbs | 83 +++++++++++++ ui/admin/app/components/form/host/index.hbs | 112 +----------------- .../app/components/form/host/static/index.hbs | 82 +++++++++++++ .../host-catalog/hosts/index.hbs | 8 +- 6 files changed, 269 insertions(+), 112 deletions(-) create mode 100644 ui/admin/app/components/form/host/aws/index.hbs create mode 100644 ui/admin/app/components/form/host/azure/index.hbs create mode 100644 ui/admin/app/components/form/host/static/index.hbs diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index c9186a3f9..161e6ef86 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -151,10 +151,15 @@ host: create: New Host delete: Delete Host types: - static: Static - unknown: Unknown - aws: AWS - azure: Azure + static: + label: Static + help: Provide a list of hosts and host sets with static addresses + unknown: + label: Unknown + aws: + label: AWS + azure: + label: Azure form: provider: label: Provider Details diff --git a/ui/admin/app/components/form/host/aws/index.hbs b/ui/admin/app/components/form/host/aws/index.hbs new file mode 100644 index 000000000..d3536d065 --- /dev/null +++ b/ui/admin/app/components/form/host/aws/index.hbs @@ -0,0 +1,83 @@ + + + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + <:title>{{t 'resources.host.form.provider.label'}} + <:body> + + + + + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host/azure/index.hbs b/ui/admin/app/components/form/host/azure/index.hbs new file mode 100644 index 000000000..caaed3d99 --- /dev/null +++ b/ui/admin/app/components/form/host/azure/index.hbs @@ -0,0 +1,83 @@ + + + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + <:title>{{t 'resources.host.form.provider.label'}} + <:body> + + + + + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host/index.hbs b/ui/admin/app/components/form/host/index.hbs index 842fff694..088f5a33c 100644 --- a/ui/admin/app/components/form/host/index.hbs +++ b/ui/admin/app/components/form/host/index.hbs @@ -1,106 +1,6 @@ - - - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - {{#if @model.isPlugin}} - - <:title>{{t 'resources.host.form.provider.label'}} - <:body> - - - - - - {{/if}} - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - {{#if (can 'save model' @model)}} - - {{/if}} - \ No newline at end of file +{{component + (concat 'form/host/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel +}} \ No newline at end of file diff --git a/ui/admin/app/components/form/host/static/index.hbs b/ui/admin/app/components/form/host/static/index.hbs new file mode 100644 index 000000000..9b39cdb26 --- /dev/null +++ b/ui/admin/app/components/form/host/static/index.hbs @@ -0,0 +1,82 @@ + + + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file 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 e6bc38f72..ee8f060cd 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 @@ -29,7 +29,9 @@ {{#if host.isStatic}} - {{t (concat 'resources.host.types.' host.compositeType)}} + {{t + (concat 'resources.host.types.' host.compositeType '.label') + }} {{else}} - {{t (concat 'resources.host.types.' host.compositeType)}} + {{t + (concat 'resources.host.types.' host.compositeType '.label') + }} {{/if}} From 42e754ab26e9beac0e20d73217820a1b3c66a0c3 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 9 Feb 2022 18:44:43 -0800 Subject: [PATCH 058/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20allow=20host=20s?= =?UTF-8?q?et=20typed=20creation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../host-catalog/host-sets/new.js | 22 ++++++++++++++++--- .../host-catalog/host-sets/new.hbs | 1 + 2 files changed, 20 insertions(+), 3 deletions(-) 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 3980cf51b..952e5d195 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 @@ -1,18 +1,26 @@ import Route from '@ember/routing/route'; +import { action } from '@ember/object'; +import { inject as service } from '@ember/service'; export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends Route { - // =methods + // =services + @service router; + // =methods /** * Creates a new unsaved host set in current host catalog scope. * @return {HostSetModel} */ model() { - const { id: host_catalog_id } = this.modelFor( + const { id: host_catalog_id, compositeType } = this.modelFor( 'scopes.scope.host-catalogs.host-catalog' ); + if (this.currentModel?.isNew) { + this.currentModel.rollbackAttributes(); + } + console.log('typedwed', compositeType); return this.store.createRecord('host-set', { - type: 'static', + compositeType, host_catalog_id, }); } @@ -47,4 +55,12 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends model: model, }); } + /** + * Update type of host set + * @param {string} type + */ + @action + async changeType(type) { + await this.router.replaceWith({ queryParams: { type } }); + } } diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs index 9f68f1549..941f3e819 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs @@ -4,4 +4,5 @@ @model={{@model}} @submit={{route-action 'save' @model}} @cancel={{route-action 'cancel' @model}} + @changeType={{route-action 'changeType' @model.type}} /> \ No newline at end of file From 4c32cee46697ecf5feee70157c32d88ec4a9a9ef Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 12:30:14 -0800 Subject: [PATCH 059/148] split host-set into static, aws and azure --- addons/core/translations/form/en-us.yaml | 6 +- .../components/form/host-set/aws/index.hbs | 109 +++++++++++++++++ .../components/form/host-set/azure/index.hbs | 110 ++++++++++++++++++ .../app/components/form/host-set/index.hbs | 67 +---------- .../components/form/host-set/static/index.hbs | 57 +++++++++ 5 files changed, 287 insertions(+), 62 deletions(-) create mode 100644 ui/admin/app/components/form/host-set/aws/index.hbs create mode 100644 ui/admin/app/components/form/host-set/azure/index.hbs create mode 100644 ui/admin/app/components/form/host-set/static/index.hbs diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 227029c9b..489145681 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -139,4 +139,8 @@ region: provider_client_id: label: Client ID link-text : Learn more - help: The client ID for the client you want Boundary to use. \ No newline at end of file + help: The client ID for the client you want Boundary to use. +provider_filter: + label: Filter + help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider. + link-text: Learn more about using filters for Azure resources. \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/aws/index.hbs b/ui/admin/app/components/form/host-set/aws/index.hbs new file mode 100644 index 000000000..f4157e973 --- /dev/null +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -0,0 +1,109 @@ +{{@model.type}} {{@model.compositeType}} + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} + + <:body> + + + + + + + + {{#if @model.errors.filters}} + + {{#each @model.errors.filters as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs new file mode 100644 index 000000000..332c58f04 --- /dev/null +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -0,0 +1,110 @@ +{{@model.type}} {{@model.compositeType}} + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} + + <:body> + + + + + + + + {{#if @model.errors.filter}} + + {{#each @model.errors.filter as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{#if (can 'save model' @model)}} + + {{/if}} + diff --git a/ui/admin/app/components/form/host-set/index.hbs b/ui/admin/app/components/form/host-set/index.hbs index 01864acc5..da084d1fe 100644 --- a/ui/admin/app/components/form/host-set/index.hbs +++ b/ui/admin/app/components/form/host-set/index.hbs @@ -1,63 +1,8 @@ - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - {{#if (can 'save model' @model)}} - - {{/if}} - \ No newline at end of file +{{component + (concat 'form/host-set/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel +}} \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/static/index.hbs b/ui/admin/app/components/form/host-set/static/index.hbs new file mode 100644 index 000000000..397b80a95 --- /dev/null +++ b/ui/admin/app/components/form/host-set/static/index.hbs @@ -0,0 +1,57 @@ + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{#if (can 'save model' @model)}} + + {{/if}} + From 460c77994fa2efbc0efea6d67e4b0af3087a2587 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 14:51:59 -0800 Subject: [PATCH 060/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20host-set:=20upda?= =?UTF-8?q?tes=20to=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/host-set/aws/index.hbs | 46 +++++++++--------- .../components/form/host-set/azure/index.hbs | 47 +++++++++---------- .../app/components/form/host-set/index.hbs | 2 - .../components/form/host-set/static/index.hbs | 2 +- 4 files changed, 47 insertions(+), 50 deletions(-) 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 f4157e973..155592a57 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -1,4 +1,3 @@ -{{@model.type}} {{@model.compositeType}} - - - <:title>{{t 'resources.host-catalog.form.provider.label'}} - <:description>{{t - 'resources.host-catalog.form.provider.description' - }} + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} - <:body> - - - - - + <:body> + + + + + - - - <:title>{{t 'resources.host-catalog.form.provider.label'}} - <:description>{{t - 'resources.host-catalog.form.provider.description' - }} + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} - <:body> - - - - - + <:body> + + + + + {{/if}} - + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/index.hbs b/ui/admin/app/components/form/host-set/index.hbs index da084d1fe..5c3bd3f0c 100644 --- a/ui/admin/app/components/form/host-set/index.hbs +++ b/ui/admin/app/components/form/host-set/index.hbs @@ -1,5 +1,3 @@ - - {{component (concat 'form/host-set/' @model.compositeType) model=@model diff --git a/ui/admin/app/components/form/host-set/static/index.hbs b/ui/admin/app/components/form/host-set/static/index.hbs index 397b80a95..7ed797846 100644 --- a/ui/admin/app/components/form/host-set/static/index.hbs +++ b/ui/admin/app/components/form/host-set/static/index.hbs @@ -54,4 +54,4 @@ @cancelText={{t 'actions.cancel'}} /> {{/if}} - + \ No newline at end of file From 791a6e9d55f6a28381f00a9d2eff6f462f694456 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 17:26:43 -0800 Subject: [PATCH 061/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20remove=20links=20?= =?UTF-8?q?for=20now?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-set/aws/index.hbs | 1 - ui/admin/app/components/form/host-set/azure/index.hbs | 1 - 2 files changed, 2 deletions(-) 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 155592a57..1fe12c0a2 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -83,7 +83,6 @@ @label={{t 'form.provider_filter.label'}} @helperText={{t 'form.provider_filter.help'}} @linkText={{t 'form.provider_filter.link-text'}} - @link='https://docs.aws.amazon.com/ARG/latest/APIReference/API_ListGroupResources.html' @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index df2a3aa40..7d32a3b97 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -83,7 +83,6 @@ @label={{t 'form.provider_filter.label'}} @helperText={{t 'form.provider_filter.help'}} @linkText={{t 'form.provider_filter.link-text'}} - @link='https://docs.microsoft.com/en-us/rest/api/resources/Resources/List#uri-parameters' @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} From d205f0f3453a8ac026f5d88a33c0f6b48228679b Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 9 Feb 2022 14:03:54 -0800 Subject: [PATCH 062/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20placeholder=20f?= =?UTF-8?q?or=20filters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/host-set/aws/index.hbs | 25 ++++--------------- .../components/form/host-set/azure/index.hbs | 2 +- 2 files changed, 6 insertions(+), 21 deletions(-) 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 1fe12c0a2..0e65d1aed 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -76,26 +76,11 @@ - - {{#if @model.errors.filters}} - - {{#each @model.errors.filters as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - + {{! placeholder for filter, update me when the model is ready }} + + <:title>{{t 'form.provider_filter.label'}} + <:description>{{t 'form.provider_filter.help'}} + {{#if (can 'save model' @model)}} + {{! placeholder for filter, update me when the model is ready }} Date: Wed, 9 Feb 2022 14:52:22 -0800 Subject: [PATCH 063/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 13 +++++++++---- ui/admin/app/components/form/host-set/aws/index.hbs | 2 +- .../app/components/form/host-set/azure/index.hbs | 2 +- .../host-catalogs/host-catalog/host-sets/index.hbs | 12 ++++++++++-- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 27e3497c0..29bd6c7a3 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -129,10 +129,15 @@ host-set: title: No Hosts Available description: No hosts available for selection. types: - static: Static - unknown: Unknown - aws: AWS - azure: Azure + 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 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 0e65d1aed..d5cb69c13 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -67,7 +67,7 @@ as |radioGroup| > {{#if hostSet.isStatic}} - {{t (concat 'resources.host-set.types.' hostSet.compositeType)}} + {{t + (concat + 'resources.host-set.types.' hostSet.compositeType '.label' + ) + }} {{else}} - {{t (concat 'resources.host-set.types.' hostSet.compositeType)}} + {{t + (concat + 'resources.host-set.types.' hostSet.compositeType '.label' + ) + }} {{/if}} From 8ad078622fcea782370e8838a35c4b13f4a9abc2 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 12:30:14 -0800 Subject: [PATCH 064/148] split host-set into static, aws and azure --- addons/core/translations/form/en-us.yaml | 6 +- .../components/form/host-set/aws/index.hbs | 109 +++++++++++++++++ .../components/form/host-set/azure/index.hbs | 110 ++++++++++++++++++ .../app/components/form/host-set/index.hbs | 67 +---------- .../components/form/host-set/static/index.hbs | 57 +++++++++ 5 files changed, 287 insertions(+), 62 deletions(-) create mode 100644 ui/admin/app/components/form/host-set/aws/index.hbs create mode 100644 ui/admin/app/components/form/host-set/azure/index.hbs create mode 100644 ui/admin/app/components/form/host-set/static/index.hbs diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 227029c9b..489145681 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -139,4 +139,8 @@ region: provider_client_id: label: Client ID link-text : Learn more - help: The client ID for the client you want Boundary to use. \ No newline at end of file + help: The client ID for the client you want Boundary to use. +provider_filter: + label: Filter + help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider. + link-text: Learn more about using filters for Azure resources. \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/aws/index.hbs b/ui/admin/app/components/form/host-set/aws/index.hbs new file mode 100644 index 000000000..f4157e973 --- /dev/null +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -0,0 +1,109 @@ +{{@model.type}} {{@model.compositeType}} + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} + + <:body> + + + + + + + + {{#if @model.errors.filters}} + + {{#each @model.errors.filters as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{#if (can 'save model' @model)}} + + {{/if}} + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs new file mode 100644 index 000000000..332c58f04 --- /dev/null +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -0,0 +1,110 @@ +{{@model.type}} {{@model.compositeType}} + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} + + <:body> + + + + + + + + {{#if @model.errors.filter}} + + {{#each @model.errors.filter as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{#if (can 'save model' @model)}} + + {{/if}} + diff --git a/ui/admin/app/components/form/host-set/index.hbs b/ui/admin/app/components/form/host-set/index.hbs index 01864acc5..da084d1fe 100644 --- a/ui/admin/app/components/form/host-set/index.hbs +++ b/ui/admin/app/components/form/host-set/index.hbs @@ -1,63 +1,8 @@ - - - - {{#if @model.errors.name}} - - {{#each @model.errors.name as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - - - {{#if @model.errors.description}} - - {{#each @model.errors.description as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - - {{#if (can 'save model' @model)}} - - {{/if}} - \ No newline at end of file +{{component + (concat 'form/host-set/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel +}} \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/static/index.hbs b/ui/admin/app/components/form/host-set/static/index.hbs new file mode 100644 index 000000000..397b80a95 --- /dev/null +++ b/ui/admin/app/components/form/host-set/static/index.hbs @@ -0,0 +1,57 @@ + + + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{#if @model.errors.description}} + + {{#each @model.errors.description as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{#if (can 'save model' @model)}} + + {{/if}} + From 98e9d8ef242d97aab47d0ff9c8fd0429480c2eef Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 14:51:59 -0800 Subject: [PATCH 065/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20host-set:=20upda?= =?UTF-8?q?tes=20to=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/host-set/aws/index.hbs | 46 +++++++++--------- .../components/form/host-set/azure/index.hbs | 47 +++++++++---------- .../app/components/form/host-set/index.hbs | 2 - .../components/form/host-set/static/index.hbs | 2 +- 4 files changed, 47 insertions(+), 50 deletions(-) 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 f4157e973..155592a57 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -1,4 +1,3 @@ -{{@model.type}} {{@model.compositeType}} - - - <:title>{{t 'resources.host-catalog.form.provider.label'}} - <:description>{{t - 'resources.host-catalog.form.provider.description' - }} + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} - <:body> - - - - - + <:body> + + + + + - - - <:title>{{t 'resources.host-catalog.form.provider.label'}} - <:description>{{t - 'resources.host-catalog.form.provider.description' - }} + + <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:description>{{t + 'resources.host-catalog.form.provider.description' + }} - <:body> - - - - - + <:body> + + + + + {{/if}} - + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/index.hbs b/ui/admin/app/components/form/host-set/index.hbs index da084d1fe..5c3bd3f0c 100644 --- a/ui/admin/app/components/form/host-set/index.hbs +++ b/ui/admin/app/components/form/host-set/index.hbs @@ -1,5 +1,3 @@ - - {{component (concat 'form/host-set/' @model.compositeType) model=@model diff --git a/ui/admin/app/components/form/host-set/static/index.hbs b/ui/admin/app/components/form/host-set/static/index.hbs index 397b80a95..7ed797846 100644 --- a/ui/admin/app/components/form/host-set/static/index.hbs +++ b/ui/admin/app/components/form/host-set/static/index.hbs @@ -54,4 +54,4 @@ @cancelText={{t 'actions.cancel'}} /> {{/if}} - + \ No newline at end of file From 5e837fd2d5f3b07b937c93848aaa8050ad06dd11 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 17:26:43 -0800 Subject: [PATCH 066/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20remove=20links=20?= =?UTF-8?q?for=20now?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-set/aws/index.hbs | 1 - ui/admin/app/components/form/host-set/azure/index.hbs | 1 - 2 files changed, 2 deletions(-) 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 155592a57..1fe12c0a2 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -83,7 +83,6 @@ @label={{t 'form.provider_filter.label'}} @helperText={{t 'form.provider_filter.help'}} @linkText={{t 'form.provider_filter.link-text'}} - @link='https://docs.aws.amazon.com/ARG/latest/APIReference/API_ListGroupResources.html' @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index df2a3aa40..7d32a3b97 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -83,7 +83,6 @@ @label={{t 'form.provider_filter.label'}} @helperText={{t 'form.provider_filter.help'}} @linkText={{t 'form.provider_filter.link-text'}} - @link='https://docs.microsoft.com/en-us/rest/api/resources/Resources/List#uri-parameters' @error={{@model.errors.description}} disabled={{@model.isSaving}} readonly={{false}} From cdf83c7de64da872c4dcb716e75b138334bd84ad Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 9 Feb 2022 14:03:54 -0800 Subject: [PATCH 067/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20placeholder=20f?= =?UTF-8?q?or=20filters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/host-set/aws/index.hbs | 25 ++++--------------- .../components/form/host-set/azure/index.hbs | 2 +- 2 files changed, 6 insertions(+), 21 deletions(-) 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 1fe12c0a2..0e65d1aed 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -76,26 +76,11 @@ - - {{#if @model.errors.filters}} - - {{#each @model.errors.filters as |error|}} - {{error.message}} - {{/each}} - - {{/if}} - + {{! placeholder for filter, update me when the model is ready }} + + <:title>{{t 'form.provider_filter.label'}} + <:description>{{t 'form.provider_filter.help'}} + {{#if (can 'save model' @model)}} + {{! placeholder for filter, update me when the model is ready }} Date: Wed, 9 Feb 2022 14:52:22 -0800 Subject: [PATCH 068/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 13 +++++++++---- ui/admin/app/components/form/host-set/aws/index.hbs | 2 +- .../app/components/form/host-set/azure/index.hbs | 2 +- .../host-catalogs/host-catalog/host-sets/index.hbs | 12 ++++++++++-- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 27e3497c0..29bd6c7a3 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -129,10 +129,15 @@ host-set: title: No Hosts Available description: No hosts available for selection. types: - static: Static - unknown: Unknown - aws: AWS - azure: Azure + 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 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 0e65d1aed..d5cb69c13 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -67,7 +67,7 @@ as |radioGroup| > {{#if hostSet.isStatic}} - {{t (concat 'resources.host-set.types.' hostSet.compositeType)}} + {{t + (concat + 'resources.host-set.types.' hostSet.compositeType '.label' + ) + }} {{else}} - {{t (concat 'resources.host-set.types.' hostSet.compositeType)}} + {{t + (concat + 'resources.host-set.types.' hostSet.compositeType '.label' + ) + }} {{/if}} From a93bf5d4aa831299e50ffc5b52190b9d767cd83c Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 9 Feb 2022 18:44:43 -0800 Subject: [PATCH 069/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20allow=20host=20s?= =?UTF-8?q?et=20typed=20creation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../host-catalog/host-sets/new.js | 22 ++++++++++++++++--- .../host-catalog/host-sets/new.hbs | 1 + 2 files changed, 20 insertions(+), 3 deletions(-) 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 3980cf51b..952e5d195 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 @@ -1,18 +1,26 @@ import Route from '@ember/routing/route'; +import { action } from '@ember/object'; +import { inject as service } from '@ember/service'; export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends Route { - // =methods + // =services + @service router; + // =methods /** * Creates a new unsaved host set in current host catalog scope. * @return {HostSetModel} */ model() { - const { id: host_catalog_id } = this.modelFor( + const { id: host_catalog_id, compositeType } = this.modelFor( 'scopes.scope.host-catalogs.host-catalog' ); + if (this.currentModel?.isNew) { + this.currentModel.rollbackAttributes(); + } + console.log('typedwed', compositeType); return this.store.createRecord('host-set', { - type: 'static', + compositeType, host_catalog_id, }); } @@ -47,4 +55,12 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends model: model, }); } + /** + * Update type of host set + * @param {string} type + */ + @action + async changeType(type) { + await this.router.replaceWith({ queryParams: { type } }); + } } diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs index 9f68f1549..941f3e819 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs @@ -4,4 +4,5 @@ @model={{@model}} @submit={{route-action 'save' @model}} @cancel={{route-action 'cancel' @model}} + @changeType={{route-action 'changeType' @model.type}} /> \ No newline at end of file From b00055a38f2923c8592d276cd7ba9f2dee109c23 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 12:30:14 -0800 Subject: [PATCH 070/148] split host-set into static, aws and azure --- ui/admin/app/components/form/host-set/azure/index.hbs | 2 +- ui/admin/app/components/form/host-set/static/index.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index 9679cc6c4..e4db78dc2 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -105,4 +105,4 @@ @cancelText={{t 'actions.cancel'}} /> {{/if}} - \ No newline at end of file + diff --git a/ui/admin/app/components/form/host-set/static/index.hbs b/ui/admin/app/components/form/host-set/static/index.hbs index 7ed797846..397b80a95 100644 --- a/ui/admin/app/components/form/host-set/static/index.hbs +++ b/ui/admin/app/components/form/host-set/static/index.hbs @@ -54,4 +54,4 @@ @cancelText={{t 'actions.cancel'}} /> {{/if}} - \ No newline at end of file + From b5ea82caaa4e440ad2b610cafc4a2fcbb0fca53b Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 14:51:59 -0800 Subject: [PATCH 071/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20host-set:=20upda?= =?UTF-8?q?tes=20to=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-set/azure/index.hbs | 2 +- ui/admin/app/components/form/host-set/static/index.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index e4db78dc2..9679cc6c4 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -105,4 +105,4 @@ @cancelText={{t 'actions.cancel'}} /> {{/if}} - + \ No newline at end of file diff --git a/ui/admin/app/components/form/host-set/static/index.hbs b/ui/admin/app/components/form/host-set/static/index.hbs index 397b80a95..7ed797846 100644 --- a/ui/admin/app/components/form/host-set/static/index.hbs +++ b/ui/admin/app/components/form/host-set/static/index.hbs @@ -54,4 +54,4 @@ @cancelText={{t 'actions.cancel'}} /> {{/if}} - + \ No newline at end of file From b33a4d0b1d4c295b08b84c968ada6c4a52e57856 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Thu, 10 Feb 2022 11:43:30 -0800 Subject: [PATCH 072/148] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Refactor=20a?= =?UTF-8?q?pp=20normalize=20and=20host=20catalog=20normalize?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactor app normalize to deal with nestedAttributes and nestedSecrets as expected, before it was not working as expected. Refactor the host catalog normalize method. Add normalize test on host catalog to validate changes on normalize methods. --- addons/api/addon/serializers/application.js | 12 +- addons/api/addon/serializers/host-catalog.js | 8 + .../unit/serializers/host-catalog-test.js | 163 +++++++++++++++++- 3 files changed, 173 insertions(+), 10 deletions(-) diff --git a/addons/api/addon/serializers/application.js b/addons/api/addon/serializers/application.js index 29f3fa1b4..6882bd190 100644 --- a/addons/api/addon/serializers/application.js +++ b/addons/api/addon/serializers/application.js @@ -236,7 +236,7 @@ export default class ApplicationSerializer extends RESTSerializer { typeClass.attributes.forEach((attribute) => { const { isNestedAttribute } = attribute.options; const attributeValue = hash.attributes?.[attribute.name]; - if (isNestedAttribute && attributeValue) { + if (isNestedAttribute && typeof attributeValue != 'undefined') { hash[attribute.name] = attributeValue; } }); @@ -261,7 +261,15 @@ export default class ApplicationSerializer extends RESTSerializer { name, options: { isNestedSecret }, } = attribute; - if (isNestedSecret) hash[name] = null; + const attributeValue = hash.secrets?.[name]; + + // FIXME: This could be improved + if (isNestedSecret) { + hash[name] = null; + if (attributeValue) { + hash[name] = attributeValue; + } + } }); return hash; } diff --git a/addons/api/addon/serializers/host-catalog.js b/addons/api/addon/serializers/host-catalog.js index 77c78c680..f5d1cd983 100644 --- a/addons/api/addon/serializers/host-catalog.js +++ b/addons/api/addon/serializers/host-catalog.js @@ -1,4 +1,5 @@ import ApplicationSerializer from './application'; +import { copy } from 'ember-copy'; const fieldsByType = { aws: [ @@ -56,4 +57,11 @@ export default class HostCatalogSerializer extends ApplicationSerializer { delete serialized.secrets; return serialized; } + + normalize(typeClass, hash, ...rest) { + let normalizedHash = copy(hash, true); + const normalized = super.normalize(typeClass, normalizedHash, ...rest); + delete normalized.data.attributes.attributes; + return normalized; + } } diff --git a/addons/api/tests/unit/serializers/host-catalog-test.js b/addons/api/tests/unit/serializers/host-catalog-test.js index d82869348..2811dea39 100644 --- a/addons/api/tests/unit/serializers/host-catalog-test.js +++ b/addons/api/tests/unit/serializers/host-catalog-test.js @@ -4,14 +4,6 @@ import { setupTest } from 'ember-qunit'; module('Unit | Serializer | host catalog', function (hooks) { setupTest(hooks); - // Replace this with your real tests. - test('it exists', function (assert) { - const store = this.owner.lookup('service:store'); - const serializer = store.serializerFor('host-catalog'); - - assert.ok(serializer); - }); - test('it serializes records', function (assert) { const store = this.owner.lookup('service:store'); const record = store.createRecord('host-catalog', {}); @@ -171,4 +163,159 @@ module('Unit | Serializer | host catalog', function (hooks) { }; assert.deepEqual(record.serialize(), expectedResult); }); + + test('it normalizes an static host catalog as expected', function (assert) { + assert.expect(1); + const store = this.owner.lookup('service:store'); + const serializer = store.serializerFor('host-catalog'); + const hostCatalog = store.createRecord('host-catalog').constructor; + const payload = { + id: '1', + name: 'Host catalog test', + description: 'Test description', + authorized_actions: ['no-op'], + type: 'static', + }; + const normalized = serializer.normalizeSingleResponse( + store, + hostCatalog, + payload + ); + assert.deepEqual(normalized, { + data: { + id: '1', + type: 'host-catalog', + attributes: { + name: 'Host catalog test', + description: 'Test description', + authorized_actions: ['no-op'], + type: 'static', + access_key_id: null, + secret_access_key: null, + secret_id: null, + secret_value: null, + }, + relationships: {}, + }, + included: [], + }); + }); + + test('it normalizes an aws plugin type host catalog as expected', function (assert) { + assert.expect(1); + const store = this.owner.lookup('service:store'); + const serializer = store.serializerFor('host-catalog'); + const hostCatalog = store.createRecord('host-catalog').constructor; + const payload = { + id: '1', + name: 'Host catalog test', + description: 'Test description', + authorized_actions: ['no-op'], + type: 'plugin', + plugin: { + id: 'plugin-id-5', + name: 'aws', + description: 'aws host catalog', + }, + attributes: { + disable_credential_rotation: false, + region: 'Illinois', + }, + secrets: { + access_key_id: '0xF3B0a6f8', + secret_access_key: 'zq{2:IVc8@W^', + }, + }; + const normalized = serializer.normalizeSingleResponse( + store, + hostCatalog, + payload + ); + assert.deepEqual(normalized, { + data: { + id: '1', + type: 'host-catalog', + attributes: { + name: 'Host catalog test', + type: 'plugin', + description: 'Test description', + authorized_actions: ['no-op'], + plugin: { + id: 'plugin-id-5', + name: 'aws', + description: 'aws host catalog', + }, + disable_credential_rotation: false, + region: 'Illinois', + access_key_id: '0xF3B0a6f8', + secret_access_key: 'zq{2:IVc8@W^', + secret_id: null, + secret_value: null, + }, + relationships: {}, + }, + included: [], + }); + }); + + test('it normalizes an azure plugin type host catalog as expected', function (assert) { + assert.expect(1); + const store = this.owner.lookup('service:store'); + const serializer = store.serializerFor('host-catalog'); + const hostCatalog = store.createRecord('host-catalog').constructor; + const payload = { + id: '1', + name: 'Host catalog test', + description: 'Test description', + authorized_actions: ['no-op', 'read', 'update', 'delete'], + type: 'plugin', + plugin: { + id: 'plugin-id-6', + name: 'azure', + description: 'azure host catalog', + }, + attributes: { + disable_credential_rotation: true, + tenant_id: 'tenant', + client_id: 'client', + subscription_id: 'subscription', + }, + secrets: { + secret_id: '0xF3B0a6f8', + secret_value: 'zq{2:IVc8@W^', + }, + }; + const normalized = serializer.normalizeSingleResponse( + store, + hostCatalog, + payload + ); + assert.deepEqual(normalized, { + data: { + id: '1', + type: 'host-catalog', + attributes: { + name: 'Host catalog test', + type: 'plugin', + description: 'Test description', + authorized_actions: ['no-op', 'read', 'update', 'delete'], + plugin: { + id: 'plugin-id-6', + name: 'azure', + description: 'azure host catalog', + }, + disable_credential_rotation: true, + secret_id: '0xF3B0a6f8', + secret_value: 'zq{2:IVc8@W^', + client_id: 'client', + tenant_id: 'tenant', + subscription_id: 'subscription', + access_key_id: null, + secret_access_key: null, + }, + relationships: {}, + }, + included: [], + }); + }); }); From e1282bb870d4ad49352a1da9b33ea993e005309b Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Thu, 10 Feb 2022 11:47:30 -0800 Subject: [PATCH 073/148] Fix conditional to check for undefined --- addons/api/addon/serializers/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/api/addon/serializers/application.js b/addons/api/addon/serializers/application.js index 6882bd190..dcc33eff6 100644 --- a/addons/api/addon/serializers/application.js +++ b/addons/api/addon/serializers/application.js @@ -266,7 +266,7 @@ export default class ApplicationSerializer extends RESTSerializer { // FIXME: This could be improved if (isNestedSecret) { hash[name] = null; - if (attributeValue) { + if (typeof attributeValue != 'undefined') { hash[name] = attributeValue; } } From 7e731a8008c34f3bd5fb02de615582753f5ff1a2 Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 10 Feb 2022 17:57:19 -0800 Subject: [PATCH 074/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20render=20static?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host/index.hbs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/ui/admin/app/components/form/host/index.hbs b/ui/admin/app/components/form/host/index.hbs index 088f5a33c..a4544c976 100644 --- a/ui/admin/app/components/form/host/index.hbs +++ b/ui/admin/app/components/form/host/index.hbs @@ -1,6 +1,15 @@ -{{component - (concat 'form/host/' @model.compositeType) - model=@model - submit=@submit - cancel=@cancel -}} \ No newline at end of file +{{#if @model.compositeType}} + {{component + (concat 'form/host/' @model.compositeType) + model=@model + submit=@submit + cancel=@cancel + }} +{{else}} + {{component + (concat 'form/host/' 'static') + model=@model + submit=@submit + cancel=@cancel + }} +{{/if}} \ No newline at end of file From 445e98d45566d1ecf929632d7d749c854ab3469f Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 10 Feb 2022 18:07:52 -0800 Subject: [PATCH 075/148] updates --- ui/admin/app/components/form/host/index.hbs | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/admin/app/components/form/host/index.hbs b/ui/admin/app/components/form/host/index.hbs index a4544c976..114bf331b 100644 --- a/ui/admin/app/components/form/host/index.hbs +++ b/ui/admin/app/components/form/host/index.hbs @@ -6,6 +6,7 @@ cancel=@cancel }} {{else}} +{{{log @model}}} modellllll {{component (concat 'form/host/' 'static') model=@model From b6f8e001f07e709f340a6caa3e5fb7d65cb9e267 Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 10 Feb 2022 18:22:14 -0800 Subject: [PATCH 076/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20hide=20actions?= =?UTF-8?q?=20for=20plugin=20host?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../host-catalogs/host-catalog/host-sets/host-set/hosts.hbs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 80ba8a4f8..ae8b4183d 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 @@ -1,14 +1,15 @@ {{page-title (t 'resources.host.title_plural')}} {{#if @model.hosts}} - {{t 'form.name.label'}} {{t 'form.type.label'}} {{t 'form.id.label'}} - {{t 'titles.actions'}} + {{#if @model.isStatic}} + {{t 'titles.actions'}} + {{/if}} From 0776ec1af9f8a71d26c8e62be40a208ac1a0033f Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Thu, 10 Feb 2022 18:24:30 -0800 Subject: [PATCH 077/148] Update hosts.hbs --- .../host-catalogs/host-catalog/host-sets/host-set/hosts.hbs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ae8b4183d..d78229fe4 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 @@ -1,6 +1,7 @@ {{page-title (t 'resources.host.title_plural')}} {{#if @model.hosts}} + @@ -79,4 +80,4 @@ --}} -{{/unless}} \ No newline at end of file +{{/unless}} From 2459f97e4a794a8d60121ec48a967d0e521f6fdf Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 10 Feb 2022 18:33:51 -0800 Subject: [PATCH 078/148] consolidate provider translations --- addons/core/translations/form/en-us.yaml | 14 +++++++++---- .../form/host-catalog/aws/index.hbs | 10 +++++----- .../form/host-catalog/azure/index.hbs | 20 ++++++++----------- .../form/host-catalog/static/index.hbs | 6 +++--- .../host-catalogs/host-sets/hosts-test.js | 3 +++ 5 files changed, 29 insertions(+), 24 deletions(-) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 227029c9b..8f7563fd6 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -136,7 +136,13 @@ secret_access_key: link-text: Learn more region: label: Region -provider_client_id: - label: Client ID - link-text : Learn more - help: The client ID for the client you want Boundary to use. \ No newline at end of file +provider: + label: Provider Details + description: This is the provider for this host catalog. The format of the host set filters are specific to each provider. + client: + label: Client ID + help: The client ID for the client you want Boundary to use. + link-text : Learn more + choose_a_provider: + label: Choose a provider + description: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin. 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 0470f3515..110d1efd5 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -74,15 +74,15 @@ - <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:title>{{t 'form.provider.label'}} <:title>{{t - 'resources.host-catalog.form.provider.choose_a_provider.label' + 'form.provider.choose_a_provider.label' }} <:description>{{t - 'resources.host-catalog.form.provider.choose_a_provider.description' + 'form.provider.choose_a_provider.description' }} <:body> @@ -109,9 +109,9 @@ {{else}} - <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:title>{{t 'form.provider.label'}} <:description>{{t - 'resources.host-catalog.form.provider.description' + 'form.provider.description' }} <:body> {{#if @model.isNew}} - {{!-- {{t - 'resources.host-catalog.form.provider.label' - }} --}} - <:title>{{t 'form.type.label'}} <:body> @@ -78,14 +74,14 @@ - <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:title>{{t 'form.provider.label'}} <:title>{{t - 'resources.host-catalog.form.provider.choose_a_provider.label' + 'form.provider.choose_a_provider.label' }} <:description>{{t - 'resources.host-catalog.form.provider.choose_a_provider.description' + 'form.provider.choose_a_provider.description' }} <:body> @@ -113,9 +109,9 @@ {{else}} - <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:title>{{t 'form.provider.label'}} <:description>{{t - 'resources.host-catalog.form.provider.description' + 'form.provider.description' }} <:body> @@ -162,9 +158,9 @@ @name='client_id' @type='client_id' @value={{@model.client_id}} - @label={{t 'form.provider_client_id.label'}} - @helperText={{t 'form.provider_client_id.help'}} - @linkText={{t 'form.provider_client_id.link-text'}} + @label={{t 'form.provider.client.label'}} + @helperText={{t 'form.provider.client.help'}} + @linkText={{t 'form.provider.client.link-text'}} @link='https://learn.hashicorp.com/tutorials/boundary/cloud-host-catalogs#set-up-cloud-hosts' readonly={{false}} /> diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index bc0ac2421..5d637065c 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -75,15 +75,15 @@ {{#if @model.isPlugin}} - <:title>{{t 'resources.host-catalog.form.provider.label'}} + <:title>{{t 'form.provider.label'}} <:title>{{t - 'resources.host-catalog.form.provider.choose_a_provider.label' + 'form.provider.choose_a_provider.label' }} <:description>{{t - 'resources.host-catalog.form.provider.choose_a_provider.description' + 'form.provider.choose_a_provider.description' }} <:body> diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js index 2423c62ca..5461031ef 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js @@ -228,7 +228,10 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { test('create and cancel host add to host set', async function (assert) { assert.expect(1); await visit(urls.createAndAddHost); + console.log(urls.createAndAddHost, 'CREATE AND HST') await click('form [type="button"]'); + console.log( urls.hostSetHosts, '222CREATE AND HST') + assert.equal(currentURL(), urls.hostSetHosts); }); From 591f05d72f9e6e5640fa244a5f3460cacb5a55d2 Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 10 Feb 2022 18:34:41 -0800 Subject: [PATCH 079/148] consolidate provider translations --- .../tests/acceptance/host-catalogs/host-sets/hosts-test.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js index 5461031ef..2423c62ca 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js @@ -228,10 +228,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { test('create and cancel host add to host set', async function (assert) { assert.expect(1); await visit(urls.createAndAddHost); - console.log(urls.createAndAddHost, 'CREATE AND HST') await click('form [type="button"]'); - console.log( urls.hostSetHosts, '222CREATE AND HST') - assert.equal(currentURL(), urls.hostSetHosts); }); From 449181390e575474be93e66b1198f36dd0d2bede Mon Sep 17 00:00:00 2001 From: dharini Date: Thu, 10 Feb 2022 18:44:40 -0800 Subject: [PATCH 080/148] lint --- .../host-catalogs/host-catalog/host-sets/host-set/hosts.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d78229fe4..9bcbe0fd4 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 @@ -80,4 +80,4 @@ --}} -{{/unless}} +{{/unless}} \ No newline at end of file From 8546275249fa28419ce5225070992c1d35995b11 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Fri, 11 Feb 2022 08:51:22 -0800 Subject: [PATCH 081/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20filter=20fi?= =?UTF-8?q?eld=20for=20host-set=20in=20mirage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the filter field for host-set in mirage. It was returning an error rather than a string. --- addons/api/mirage/factories/host-set.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/api/mirage/factories/host-set.js b/addons/api/mirage/factories/host-set.js index 038bf6a7c..979d5c996 100644 --- a/addons/api/mirage/factories/host-set.js +++ b/addons/api/mirage/factories/host-set.js @@ -43,7 +43,7 @@ export default factory.extend({ // Azure specific filter() { if (this.plugin?.name === 'azure') { - return `${database.column}=${database.collation}`; + return `${database.column()}=${database.collation()}`; } }, }); From 44f81118ec412c4945bff0a8cdb7e275a72e7477 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Fri, 11 Feb 2022 10:16:23 -0800 Subject: [PATCH 082/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Add=20host=20fie?= =?UTF-8?q?lds=20to=20mirage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add host new fields to mirage. --- addons/api/mirage/factories/host.js | 39 +++++++++++++++++++ addons/api/mirage/generated/factories/host.js | 5 +-- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/addons/api/mirage/factories/host.js b/addons/api/mirage/factories/host.js index 9386fc15b..ea188f3c4 100644 --- a/addons/api/mirage/factories/host.js +++ b/addons/api/mirage/factories/host.js @@ -1,5 +1,32 @@ import factory from '../generated/factories/host'; import permissions from '../helpers/permissions'; +import { internet, datatype } from 'faker'; + +/** + * Returns an array of strings with IP addresses. + * @returns {array} + */ +const returnIpAddressesArray = () => { + const addressesAmount = Math.floor(Math.random() * 6) + 1; + let result = []; + for (let i = 0; i < addressesAmount; ++i) { + result.push(internet.ip()); + } + return result; +}; + +/** + * Returns an array of strings with DNS names. + * @param {string} hostType + */ +const returnDnsNames = () => { + const dnsNamesAmount = Math.floor(Math.random() * 6) + 1; + let result = []; + for (let i = 0; i < dnsNamesAmount; i++) { + result.push(internet.domainName()); + } + return result; +}; export default factory.extend({ id: (i) => `host-id-${i}`, @@ -18,4 +45,16 @@ export default factory.extend({ return this.hostCatalog.plugin; } }, + attributes() { + return { + address: internet.ipv6(), + ip_addresses: returnIpAddressesArray(), + external_id: datatype.uuid(), + // Only aws plugins have dns_names + dns_names: + this.type != 'static' && this.plugin?.name === 'aws' + ? returnDnsNames() + : undefined, + }; + }, }); diff --git a/addons/api/mirage/generated/factories/host.js b/addons/api/mirage/generated/factories/host.js index db9de3b56..658c334bf 100644 --- a/addons/api/mirage/generated/factories/host.js +++ b/addons/api/mirage/generated/factories/host.js @@ -1,5 +1,5 @@ import { Factory } from 'ember-cli-mirage'; -import { random, date, internet, datatype } from 'faker'; +import { random, date, datatype } from 'faker'; /** * GeneratedHostModelFactory @@ -11,7 +11,4 @@ export default Factory.extend({ created_time: () => date.recent(), updated_time: () => date.recent(), version: () => datatype.number(), - attributes: () => { - return { address: internet.ipv6() }; - }, }); From 3ff51b30f06ffcb113251af2e677f6c11cccb593 Mon Sep 17 00:00:00 2001 From: dharini Date: Fri, 11 Feb 2022 11:26:22 -0800 Subject: [PATCH 083/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20a=20comment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host/index.hbs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/admin/app/components/form/host/index.hbs b/ui/admin/app/components/form/host/index.hbs index 114bf331b..a3c879913 100644 --- a/ui/admin/app/components/form/host/index.hbs +++ b/ui/admin/app/components/form/host/index.hbs @@ -6,7 +6,9 @@ cancel=@cancel }} {{else}} -{{{log @model}}} modellllll + {{! create-and-add-host cancel route doesn't +have a model and this else part is required to prevent +erroring out here. This has been noted in the tech debt doc to further investigate }} {{component (concat 'form/host/' 'static') model=@model From 3693829e962f2a602588ec36b9062a36fa454c70 Mon Sep 17 00:00:00 2001 From: dharini Date: Fri, 11 Feb 2022 11:44:55 -0800 Subject: [PATCH 084/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20translation=20u?= =?UTF-8?q?pdat4e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host/aws/index.hbs | 2 +- ui/admin/app/components/form/host/azure/index.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/components/form/host/aws/index.hbs b/ui/admin/app/components/form/host/aws/index.hbs index d3536d065..9f6351ab7 100644 --- a/ui/admin/app/components/form/host/aws/index.hbs +++ b/ui/admin/app/components/form/host/aws/index.hbs @@ -54,7 +54,7 @@ - <:title>{{t 'resources.host.form.provider.label'}} + <:title>{{t 'form.provider.label'}} <:body> - <:title>{{t 'resources.host.form.provider.label'}} + <:title>{{t 'form.provider.label'}} <:body> Date: Fri, 11 Feb 2022 12:04:25 -0800 Subject: [PATCH 085/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20translations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 10 ---------- ui/admin/app/components/form/host-set/aws/index.hbs | 6 ++---- ui/admin/app/components/form/host-set/azure/index.hbs | 6 ++---- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 59bb25b2f..dacd49846 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -97,13 +97,6 @@ host-catalog: dynamic: label: Dynamic help: Automate discovery of target hosts and services on Azure or AWS - form: - provider: - label: Provider Details - description: This is the provider for this host catalog. The format of the host set filters are specific to each provider. - choose_a_provider: - label: Choose a provider - description: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin. host-set: title: Host Set title_plural: Host Sets @@ -165,9 +158,6 @@ host: label: AWS azure: label: Azure - form: - provider: - label: Provider Details 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 f800e9d53..6e2529a60 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -54,10 +54,8 @@ /> - <:title>{{t 'resources.host-catalog.form.provider.label'}} - <:description>{{t - 'resources.host-catalog.form.provider.description' - }} + <:title>{{t 'form.provider.label'}} + <:description>{{t 'form.provider.description'}} <:body> - <:title>{{t 'resources.host-catalog.form.provider.label'}} - <:description>{{t - 'resources.host-catalog.form.provider.description' - }} + <:title>{{t 'form.provider.label'}} + <:description>{{t 'form.provider.description'}} <:body> Date: Fri, 11 Feb 2022 13:18:19 -0800 Subject: [PATCH 086/148] Simplify conditional --- addons/api/mirage/factories/host.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/api/mirage/factories/host.js b/addons/api/mirage/factories/host.js index ea188f3c4..93323e965 100644 --- a/addons/api/mirage/factories/host.js +++ b/addons/api/mirage/factories/host.js @@ -51,10 +51,7 @@ export default factory.extend({ ip_addresses: returnIpAddressesArray(), external_id: datatype.uuid(), // Only aws plugins have dns_names - dns_names: - this.type != 'static' && this.plugin?.name === 'aws' - ? returnDnsNames() - : undefined, + dns_names: this.plugin?.name === 'aws' ? returnDnsNames() : undefined, }; }, }); From 361bdf02a4869f82f0eb0817df5d37e0f4ba7f55 Mon Sep 17 00:00:00 2001 From: dharini Date: Sun, 13 Feb 2022 22:42:34 -0800 Subject: [PATCH 087/148] updates to host-set plugin filters --- .../components/form/host-set/aws/index.hbs | 86 ++++++++++++++++++- .../components/form/host-set/azure/index.hbs | 1 + .../app/components/form/host-set/index.hbs | 2 + .../host-catalog/host-sets/host-set.js | 28 ++++++ .../host-catalog/host-sets/index.js | 1 + .../host-catalog/host-sets/new.js | 25 ++++++ .../host-catalog/host-sets/host-set/index.hbs | 2 + .../host-catalog/host-sets/new.hbs | 2 + 8 files changed, 146 insertions(+), 1 deletion(-) 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 f800e9d53..5f5b54838 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -6,7 +6,7 @@ @showEditToggle={{if @model.isNew false true}} as |form| > - + <:title>{{t 'form.provider.filter.label'}} <:description>{{t 'form.provider.filter.help'}} + <:body> + {{#if @model.errors.filters}} + + {{#each @model.errors.filters as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{t 'titles.value'}} + + + + + {{#each @model.filters as |filter i|}} + + + + FIELDD + + + + + + {{t 'actions.remove'}} + + + + {{/each}} + + + + + + + + {{t 'actions.add'}} + + + + + + {{#if (can 'save model' @model)}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index 340860893..cfa9f2591 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -80,6 +80,7 @@ \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs index 941f3e819..4047f364c 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs @@ -5,4 +5,6 @@ @submit={{route-action 'save' @model}} @cancel={{route-action 'cancel' @model}} @changeType={{route-action 'changeType' @model.type}} + @removeItemByIndex={{route-action 'removeItemByIndex' @model}} + @addStringItem={{route-action 'addStringItem' @model}} /> \ No newline at end of file From d53cfbcc3318e15ee36ee46515c6cb72446bfd8c Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 14 Feb 2022 11:14:52 -0500 Subject: [PATCH 088/148] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20simplify=20n?= =?UTF-8?q?ested=20fields=20normalization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/serializers/application.js | 23 ++++++++------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/addons/api/addon/serializers/application.js b/addons/api/addon/serializers/application.js index dcc33eff6..0b20dd128 100644 --- a/addons/api/addon/serializers/application.js +++ b/addons/api/addon/serializers/application.js @@ -234,11 +234,13 @@ export default class ApplicationSerializer extends RESTSerializer { */ normalizeNestedAttributes(typeClass, hash) { typeClass.attributes.forEach((attribute) => { - const { isNestedAttribute } = attribute.options; - const attributeValue = hash.attributes?.[attribute.name]; - if (isNestedAttribute && typeof attributeValue != 'undefined') { - hash[attribute.name] = attributeValue; - } + const { + name, + options: { isNestedAttribute }, + } = attribute; + const value = hash.attributes?.[name]; + const isUndefined = value === undefined; + if (isNestedAttribute && !isUndefined) hash[name] = value; }); return hash; } @@ -261,15 +263,8 @@ export default class ApplicationSerializer extends RESTSerializer { name, options: { isNestedSecret }, } = attribute; - const attributeValue = hash.secrets?.[name]; - - // FIXME: This could be improved - if (isNestedSecret) { - hash[name] = null; - if (typeof attributeValue != 'undefined') { - hash[name] = attributeValue; - } - } + const value = hash.secrets?.[name]; + if (isNestedSecret) hash[name] = value; }); return hash; } From ac215e200f32772050054e28496d2fca45dde9a6 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 14 Feb 2022 11:24:58 -0500 Subject: [PATCH 089/148] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20simplify=20h?= =?UTF-8?q?ost=20catalog=20modeling=20and=20normalization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/generated/models/host-catalog.js | 5 ----- addons/api/addon/serializers/host-catalog.js | 8 -------- addons/api/tests/unit/serializers/host-catalog-test.js | 8 -------- 3 files changed, 21 deletions(-) diff --git a/addons/api/addon/generated/models/host-catalog.js b/addons/api/addon/generated/models/host-catalog.js index 0591352e2..660711a70 100644 --- a/addons/api/addon/generated/models/host-catalog.js +++ b/addons/api/addon/generated/models/host-catalog.js @@ -39,11 +39,6 @@ export default class GeneratedHostCatalogModel extends BaseModel { }) disabled; - @attr({ - description: 'Attributes specific to the catalog type', - }) - attributes; - @attr('number', { description: 'Current version number of this resource.', }) diff --git a/addons/api/addon/serializers/host-catalog.js b/addons/api/addon/serializers/host-catalog.js index f5d1cd983..77c78c680 100644 --- a/addons/api/addon/serializers/host-catalog.js +++ b/addons/api/addon/serializers/host-catalog.js @@ -1,5 +1,4 @@ import ApplicationSerializer from './application'; -import { copy } from 'ember-copy'; const fieldsByType = { aws: [ @@ -57,11 +56,4 @@ export default class HostCatalogSerializer extends ApplicationSerializer { delete serialized.secrets; return serialized; } - - normalize(typeClass, hash, ...rest) { - let normalizedHash = copy(hash, true); - const normalized = super.normalize(typeClass, normalizedHash, ...rest); - delete normalized.data.attributes.attributes; - return normalized; - } } diff --git a/addons/api/tests/unit/serializers/host-catalog-test.js b/addons/api/tests/unit/serializers/host-catalog-test.js index 2811dea39..8b1af8c94 100644 --- a/addons/api/tests/unit/serializers/host-catalog-test.js +++ b/addons/api/tests/unit/serializers/host-catalog-test.js @@ -190,10 +190,6 @@ module('Unit | Serializer | host catalog', function (hooks) { description: 'Test description', authorized_actions: ['no-op'], type: 'static', - access_key_id: null, - secret_access_key: null, - secret_id: null, - secret_value: null, }, relationships: {}, }, @@ -249,8 +245,6 @@ module('Unit | Serializer | host catalog', function (hooks) { region: 'Illinois', access_key_id: '0xF3B0a6f8', secret_access_key: 'zq{2:IVc8@W^', - secret_id: null, - secret_value: null, }, relationships: {}, }, @@ -310,8 +304,6 @@ module('Unit | Serializer | host catalog', function (hooks) { client_id: 'client', tenant_id: 'tenant', subscription_id: 'subscription', - access_key_id: null, - secret_access_key: null, }, relationships: {}, }, From 93fd52954f2f4127ba749591e480772b618a068a Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 14 Feb 2022 11:50:39 -0500 Subject: [PATCH 090/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20explicitly=20se?= =?UTF-8?q?t=20secrets=20to=20null=20when=20missing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/serializers/application.js | 2 +- addons/api/tests/unit/serializers/host-catalog-test.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/api/addon/serializers/application.js b/addons/api/addon/serializers/application.js index 0b20dd128..8f519e8e2 100644 --- a/addons/api/addon/serializers/application.js +++ b/addons/api/addon/serializers/application.js @@ -264,7 +264,7 @@ export default class ApplicationSerializer extends RESTSerializer { options: { isNestedSecret }, } = attribute; const value = hash.secrets?.[name]; - if (isNestedSecret) hash[name] = value; + if (isNestedSecret) hash[name] = value || null; }); return hash; } diff --git a/addons/api/tests/unit/serializers/host-catalog-test.js b/addons/api/tests/unit/serializers/host-catalog-test.js index 8b1af8c94..2811dea39 100644 --- a/addons/api/tests/unit/serializers/host-catalog-test.js +++ b/addons/api/tests/unit/serializers/host-catalog-test.js @@ -190,6 +190,10 @@ module('Unit | Serializer | host catalog', function (hooks) { description: 'Test description', authorized_actions: ['no-op'], type: 'static', + access_key_id: null, + secret_access_key: null, + secret_id: null, + secret_value: null, }, relationships: {}, }, @@ -245,6 +249,8 @@ module('Unit | Serializer | host catalog', function (hooks) { region: 'Illinois', access_key_id: '0xF3B0a6f8', secret_access_key: 'zq{2:IVc8@W^', + secret_id: null, + secret_value: null, }, relationships: {}, }, @@ -304,6 +310,8 @@ module('Unit | Serializer | host catalog', function (hooks) { client_id: 'client', tenant_id: 'tenant', subscription_id: 'subscription', + access_key_id: null, + secret_access_key: null, }, relationships: {}, }, From 0e4f8718a284afd9cc76490b7519c366b7347b49 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 09:15:11 -0800 Subject: [PATCH 091/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20updates=20to=20?= =?UTF-8?q?labels?= 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 10:20:00 -0800 Subject: [PATCH 092/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/form/host-set/aws/index.hbs | 33 ++++++---------- .../host-catalog/host-sets/host-set.js | 38 +++++++++---------- .../host-catalog/host-sets/new.js | 36 +++++++++--------- 3 files changed, 48 insertions(+), 59 deletions(-) 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 9a594df91..9b2612f1a 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -6,7 +6,7 @@ @showEditToggle={{if @model.isNew false true}} as |form| > - + - {{#each @model.filters as |filter i|}} - - + {{#each @model.filters as |filter i|}} + + - FIELDD - + {{t 'actions.remove'}} - - - {{/each}} + + + {{/each}} @@ -142,18 +137,12 @@ {{t 'actions.add'}} diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set.js index 173dbcc6d..ca0a83061 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set.js @@ -58,23 +58,23 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetRoute exte * @param {string} property * @param {string} value */ - @action - async addStringItem(hostSet, property, value) { - const array = hostSet.get(property); - array.addObject({ value }); - } - - /** - * Removes an item from array `property` at `index` on the - * passed `authMethod`. This is used to manage entries in fragment array - * fields such as `signing_algorithms`. - * @param {hostSetModel} authMethod - * @param {string} property - * @param {number} index - */ - @action - async removeItemByIndex(hostSet, property, index) { - const array = hostSet.get(property); - array.removeAt(index); - } + @action + async addStringItem(hostSet, property, value) { + const array = hostSet.get(property); + array.addObject({ value }); + } + + /** + * Removes an item from array `property` at `index` on the + * passed `authMethod`. This is used to manage entries in fragment array + * fields such as `signing_algorithms`. + * @param {hostSetModel} authMethod + * @param {string} property + * @param {number} index + */ + @action + async removeItemByIndex(hostSet, property, index) { + const array = hostSet.get(property); + array.removeAt(index); + } } 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 527d80a71..d06e51619 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 @@ -70,22 +70,22 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends * @param {string} property * @param {string} value */ - @action - async addStringItem(hostSet, property, value) { - const array = hostSet.get(property); - array.addObject({ value }); - } - /** - * Removes an item from array `property` at `index` on the - * passed `authMethod`. This is used to manage entries in fragment array - * fields such as `signing_algorithms`. - * @param {hostSetModel} authMethod - * @param {string} property - * @param {number} index - */ - @action - async removeItemByIndex(hostSet, property, index) { - const array = hostSet.get(property); - array.removeAt(index); - } + @action + async addStringItem(hostSet, property, value) { + const array = hostSet.get(property); + array.addObject({ value }); + } + /** + * Removes an item from array `property` at `index` on the + * passed `authMethod`. This is used to manage entries in fragment array + * fields such as `signing_algorithms`. + * @param {hostSetModel} authMethod + * @param {string} property + * @param {number} index + */ + @action + async removeItemByIndex(hostSet, property, index) { + const array = hostSet.get(property); + array.removeAt(index); + } } From 5b245a3ce19c107416d33ec8b1da69f85937289b Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 10:37:58 -0800 Subject: [PATCH 093/148] lint --- .../scopes/scope/host-catalogs/host-catalog/host-sets/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index.js index 74afc4b4f..1f49ad3af 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/index.js @@ -1,5 +1,4 @@ import Route from '@ember/routing/route'; - export default class ScopesScopeHostCatalogsHostCatalogHostSetsIndexRoute extends Route { // =methods setupController(controller) { From 18dcd341c73f6dc383338d28bd8a50add0e3a9b2 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 11:21:14 -0800 Subject: [PATCH 094/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20remove=20duplicat?= =?UTF-8?q?e=20types=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 095/148] 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 021097ad44b529bc07cf4096dfa9893408050e27 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 14 Feb 2022 14:57:34 -0500 Subject: [PATCH 096/148] fix: append ?plugin_name to dynamic host catalog create requests --- addons/api/addon/adapters/host-catalog.js | 28 +++++++++++++++++++ addons/api/app/adapters/host-catalog.js | 1 + addons/api/mirage/config.js | 14 +++++++++- .../tests/unit/adapters/host-catalog-test.js | 12 ++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 addons/api/addon/adapters/host-catalog.js create mode 100644 addons/api/app/adapters/host-catalog.js create mode 100644 addons/api/tests/unit/adapters/host-catalog-test.js diff --git a/addons/api/addon/adapters/host-catalog.js b/addons/api/addon/adapters/host-catalog.js new file mode 100644 index 000000000..52d30fe6f --- /dev/null +++ b/addons/api/addon/adapters/host-catalog.js @@ -0,0 +1,28 @@ +import ApplicationAdapter from './application'; +import { serializeIntoHash } from '@ember-data/adapter/-private'; + +export default class HostCatalogAdapter extends ApplicationAdapter { + /** + Called by the store when a newly created record is + saved via the `save` method on a model record instance. + + The `createRecord` method serializes the record and makes an Ajax (HTTP POST) request + to a URL computed by `buildURL`. + + See `serialize` for information on how to customize the serialized form + of a record. + + @method createRecord + @param {Store} store + @param {Model} type + @param {Snapshot} snapshot + @return {Promise} promise + */ + createRecord(store, type, snapshot) { + let url = this.buildURL(type.modelName, null, snapshot, 'createRecord'); + const pluginName = snapshot.attr('plugin')?.name; + if (pluginName) url = `${url}?plugin_name=${pluginName}`; + const data = serializeIntoHash(store, type, snapshot); + return this.ajax(url, 'POST', { data }); + } +} diff --git a/addons/api/app/adapters/host-catalog.js b/addons/api/app/adapters/host-catalog.js new file mode 100644 index 000000000..00197a624 --- /dev/null +++ b/addons/api/app/adapters/host-catalog.js @@ -0,0 +1 @@ +export { default } from 'api/adapters/host-catalog'; diff --git a/addons/api/mirage/config.js b/addons/api/mirage/config.js index 759eb63c3..bb969a04c 100644 --- a/addons/api/mirage/config.js +++ b/addons/api/mirage/config.js @@ -270,7 +270,19 @@ export default function () { return hostCatalogs.where({ scopeId }); } ); - this.post('/host-catalogs'); + this.post( + '/host-catalogs', + function ({ hostCatalogs }, { queryParams: { plugin_name } }) { + const attrs = this.normalizedRequestAttrs(); + if (plugin_name) { + attrs.type = 'plugin'; + attrs.plugin = { + name: plugin_name, + }; + } + return hostCatalogs.create(attrs); + } + ); this.get('/host-catalogs/:id'); this.patch('/host-catalogs/:id'); this.del('/host-catalogs/:id'); diff --git a/addons/api/tests/unit/adapters/host-catalog-test.js b/addons/api/tests/unit/adapters/host-catalog-test.js new file mode 100644 index 000000000..5b1fee96f --- /dev/null +++ b/addons/api/tests/unit/adapters/host-catalog-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Adapter | host catalog', function (hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function (assert) { + let adapter = this.owner.lookup('adapter:host-catalog'); + assert.ok(adapter); + }); +}); From 83cf084ee683fcdf405cfe606ea195477928ba9d Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 12:34:05 -0800 Subject: [PATCH 097/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20address?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host/static/index.hbs | 2 +- .../scopes/scope/host-catalogs/host-catalog/hosts/index.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/components/form/host/static/index.hbs b/ui/admin/app/components/form/host/static/index.hbs index 9b39cdb26..352cf1089 100644 --- a/ui/admin/app/components/form/host/static/index.hbs +++ b/ui/admin/app/components/form/host/static/index.hbs @@ -56,7 +56,7 @@ - {{host.attributes.address}} + {{host.address}} {{/each}} From ea5ab02d7008f07214338ae24ad95236c80717d2 Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Mon, 14 Feb 2022 12:39:48 -0800 Subject: [PATCH 098/148] Update host-set.js --- .../scope/host-catalogs/host-catalog/host-sets/host-set.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set.js index ca0a83061..5ffb8cf76 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set.js @@ -66,9 +66,8 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetRoute exte /** * Removes an item from array `property` at `index` on the - * passed `authMethod`. This is used to manage entries in fragment array - * fields such as `signing_algorithms`. - * @param {hostSetModel} authMethod + * passed `hostSet`. + * @param {hostSetModel} hostSet * @param {string} property * @param {number} index */ From 21aef6a722224602514023db3a390cf61857ee3e Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Mon, 14 Feb 2022 12:40:32 -0800 Subject: [PATCH 099/148] Update new.js --- .../scopes/scope/host-catalogs/host-catalog/host-sets/new.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 d06e51619..7b2e64b72 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 @@ -77,9 +77,8 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends } /** * Removes an item from array `property` at `index` on the - * passed `authMethod`. This is used to manage entries in fragment array - * fields such as `signing_algorithms`. - * @param {hostSetModel} authMethod + * passed `hostSet`. + * @param {hostSetModel} hostSet * @param {string} property * @param {number} index */ From 0b44a649b785f119423b4f59f3be34fd8c8637f3 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 12:45:32 -0800 Subject: [PATCH 100/148] typo --- ui/admin/app/components/form/host-set/aws/index.hbs | 1 - 1 file changed, 1 deletion(-) 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 9b2612f1a..17cd29947 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -130,7 +130,6 @@ From b15c8b056f7a1ab8a2a0fff57c34620013e64571 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 12:55:07 -0800 Subject: [PATCH 101/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20error=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host/static/index.hbs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/admin/app/components/form/host/static/index.hbs b/ui/admin/app/components/form/host/static/index.hbs index 352cf1089..d86c04f1c 100644 --- a/ui/admin/app/components/form/host/static/index.hbs +++ b/ui/admin/app/components/form/host/static/index.hbs @@ -58,14 +58,14 @@ @type='text' @value={{@model.address}} @label={{t 'form.address.label'}} - @error={{@model.errors.name}} + @error={{@model.errors.address}} @helperText={{t 'form.address.help'}} readonly={{false}} as |field| > - {{#if @model.errors.name}} + {{#if @model.errors.address}} - {{#each @model.errors.name as |error|}} + {{#each @model.errors.address as |error|}} {{error.message}} {{/each}} From 616c7c73fbdc07418e8f8154a1d4f189f46bf8f7 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 13:37:30 -0800 Subject: [PATCH 102/148] =?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: Mon, 14 Feb 2022 13:55:34 -0800 Subject: [PATCH 103/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-set/aws/index.hbs | 5 +---- .../scopes/scope/host-catalogs/host-catalog/host-sets/new.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) 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 17cd29947..336972b1a 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -127,10 +127,7 @@ - + Date: Mon, 14 Feb 2022 17:10:54 -0500 Subject: [PATCH 104/148] =?UTF-8?q?test:=20=F0=9F=92=8D=20add=20missing=20?= =?UTF-8?q?adapter=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/adapters/host-catalog.js | 39 +++++++--------- .../tests/unit/adapters/host-catalog-test.js | 44 +++++++++++++++++-- 2 files changed, 57 insertions(+), 26 deletions(-) diff --git a/addons/api/addon/adapters/host-catalog.js b/addons/api/addon/adapters/host-catalog.js index 52d30fe6f..3f1fab706 100644 --- a/addons/api/addon/adapters/host-catalog.js +++ b/addons/api/addon/adapters/host-catalog.js @@ -1,28 +1,23 @@ import ApplicationAdapter from './application'; -import { serializeIntoHash } from '@ember-data/adapter/-private'; export default class HostCatalogAdapter extends ApplicationAdapter { /** - Called by the store when a newly created record is - saved via the `save` method on a model record instance. - - The `createRecord` method serializes the record and makes an Ajax (HTTP POST) request - to a URL computed by `buildURL`. - - See `serialize` for information on how to customize the serialized form - of a record. - - @method createRecord - @param {Store} store - @param {Model} type - @param {Snapshot} snapshot - @return {Promise} promise - */ - createRecord(store, type, snapshot) { - let url = this.buildURL(type.modelName, null, snapshot, 'createRecord'); - const pluginName = snapshot.attr('plugin')?.name; - if (pluginName) url = `${url}?plugin_name=${pluginName}`; - const data = serializeIntoHash(store, type, snapshot); - return this.ajax(url, 'POST', { data }); + * Overrides the default `buildURL` such that on _create_, URLs for records of + * type `plugin` get an extra query parameter `?plugin_name`. All other + * request types behave as normal. + * + * @override + * @param {string} modelName + * @param {string} id + * @return {string} url + * @return {string} requestType + */ + buildURL(modelName, id, snapshot, requestType) { + let url = super.buildURL(...arguments); + if (requestType === 'createRecord') { + const pluginName = snapshot.attr('plugin')?.name; + if (pluginName) url = `${url}?plugin_name=${pluginName}`; + } + return url; } } diff --git a/addons/api/tests/unit/adapters/host-catalog-test.js b/addons/api/tests/unit/adapters/host-catalog-test.js index 5b1fee96f..2df45a117 100644 --- a/addons/api/tests/unit/adapters/host-catalog-test.js +++ b/addons/api/tests/unit/adapters/host-catalog-test.js @@ -4,9 +4,45 @@ import { setupTest } from 'ember-qunit'; module('Unit | Adapter | host catalog', function (hooks) { setupTest(hooks); - // Replace this with your real tests. - test('it exists', function (assert) { - let adapter = this.owner.lookup('adapter:host-catalog'); - assert.ok(adapter); + test('it generates correct createRecord URLs for static host catalogs', function (assert) { + assert.expect(1); + const scopeID = 'o_1'; + const mockSnapshot = { + adapterOptions: { + scopeID, + }, + attr() { + return null; + }, + }; + const adapter = this.owner.lookup('adapter:host-catalog'); + const createRecordURL = adapter.buildURL( + 'host-catalog', + null, + mockSnapshot, + 'createRecord' + ); + assert.equal(createRecordURL, '/v1/host-catalogs'); + }); + + test('it generates correct createRecord URLs for dynamic host catalogs with extra query parameter ?plugin_name', function (assert) { + assert.expect(1); + const scopeID = 'o_1'; + const mockSnapshot = { + adapterOptions: { + scopeID, + }, + attr() { + return { name: 'aws' }; + }, + }; + const adapter = this.owner.lookup('adapter:host-catalog'); + const createRecordURL = adapter.buildURL( + 'host-catalog', + null, + mockSnapshot, + 'createRecord' + ); + assert.equal(createRecordURL, '/v1/host-catalogs?plugin_name=aws'); }); }); From ed248f583fe22be7f903007f1bd0d9b0defb9a67 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 14 Feb 2022 18:06:12 -0500 Subject: [PATCH 105/148] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20consolidate?= =?UTF-8?q?=20host=20catalog=20type=20badges=20to=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/models/host-set.js | 13 ++++++- addons/api/tests/unit/models/host-set-test.js | 10 +++-- .../host-catalog-type-badge/index.hbs | 15 ++++++++ .../host-catalog/host-sets/host-set/hosts.hbs | 2 +- .../host-catalog/host-sets/index.hbs | 24 +----------- .../scopes/scope/host-catalogs/index.hbs | 38 +------------------ .../scope/targets/target/host-sources.hbs | 4 +- 7 files changed, 38 insertions(+), 68 deletions(-) create mode 100644 ui/admin/app/components/host-catalog-type-badge/index.hbs diff --git a/addons/api/addon/models/host-set.js b/addons/api/addon/models/host-set.js index 98f7cd5e2..bd5f64f1a 100644 --- a/addons/api/addon/models/host-set.js +++ b/addons/api/addon/models/host-set.js @@ -1,5 +1,6 @@ import GeneratedHostSetModel from '../generated/models/host-set'; import { fragmentArray } from 'ember-data-model-fragments/attributes'; +import { types } from './host-catalog'; export default class HostSetModel extends GeneratedHostSetModel { // =attributes @@ -20,6 +21,14 @@ export default class HostSetModel extends GeneratedHostSetModel { return this.type === 'plugin'; } + /** + * True if the host set is an unknown type. + * @type {boolean} + */ + get isUnknown() { + return this.isPlugin && !types.includes(this.plugin?.name); + } + /** * Returns if a host-set plugin is AWS or not * @type {boolean} @@ -41,7 +50,9 @@ export default class HostSetModel extends GeneratedHostSetModel { * @type {string} */ get compositeType() { - return this.plugin ? this.plugin.name : this.type; + if (this.isUnknown) return 'unknown'; + if (this.isPlugin) return this.plugin.name; + return 'static'; } /** diff --git a/addons/api/tests/unit/models/host-set-test.js b/addons/api/tests/unit/models/host-set-test.js index 33189d3d4..f3dd6c020 100644 --- a/addons/api/tests/unit/models/host-set-test.js +++ b/addons/api/tests/unit/models/host-set-test.js @@ -183,15 +183,19 @@ module('Unit | Model | host set', function (hooks) { test('get compositeType return expected values', async function (assert) { assert.expect(3); const store = this.owner.lookup('service:store'); - const modelPlugin = store.createRecord('host-set', { + const modelPlugin1 = store.createRecord('host-set', { + type: 'plugin', + plugin: { name: 'aws' }, + }); + const modelPlugin2 = store.createRecord('host-set', { type: 'plugin', plugin: { name: 'Test name' }, }); const modelStatic = store.createRecord('host-set', { type: 'static', }); - assert.equal(typeof modelPlugin.compositeType, 'string'); - assert.equal(modelPlugin.compositeType, 'Test name'); + assert.equal(modelPlugin1.compositeType, 'aws'); + assert.equal(modelPlugin2.compositeType, 'unknown'); assert.equal(modelStatic.compositeType, 'static'); }); diff --git a/ui/admin/app/components/host-catalog-type-badge/index.hbs b/ui/admin/app/components/host-catalog-type-badge/index.hbs new file mode 100644 index 000000000..8ee191dea --- /dev/null +++ b/ui/admin/app/components/host-catalog-type-badge/index.hbs @@ -0,0 +1,15 @@ +{{#if @model.isStatic}} + + {{t (concat 'resources.host-catalog.types.' @model.compositeType '.label')}} + +{{else if @model.isUnknown}} + + {{t (concat 'resources.host-catalog.types.' @model.compositeType '.label')}} + +{{else}} + + {{t (concat 'resources.host-catalog.types.' @model.compositeType '.label')}} + +{{/if}} \ No newline at end of file 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..21d06fcb9 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,7 @@

{{host.description}}

- {{host.type}} + {{hostSet.description}}

- {{#if hostSet.isStatic}} - - {{t - (concat - 'resources.host-set.types.' hostSet.compositeType '.label' - ) - }} - - {{else}} - - {{t - (concat - 'resources.host-set.types.' hostSet.compositeType '.label' - ) - }} - - {{/if}} + {{hostCatalog.description}}

- {{#if hostCatalog.isStatic}} - - {{t - (concat - 'resources.host-catalog.types.' - hostCatalog.compositeType - '.label' - ) - }} - - {{else if hostCatalog.isUnknown}} - - {{t - (concat - 'resources.host-catalog.types.' - hostCatalog.compositeType - '.label' - ) - }} - - {{else}} - - {{t - (concat - 'resources.host-catalog.types.' - hostCatalog.compositeType - '.label' - ) - }} - - {{/if}} + {{hostSet.model.description}}

- {{t - (concat 'resources.host-set.types.' hostSet.model.type) - }} + Date: Mon, 14 Feb 2022 15:37:12 -0800 Subject: [PATCH 106/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20use=20hostcatal?= =?UTF-8?q?ogbadge=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/target/add-host-sets/index.hbs | 4 +--- 1 file changed, 1 insertion(+), 3 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 ca5c7a3e4..bd4c97765 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 @@ -34,9 +34,7 @@ {{hostSet.name}} - {{t - (concat 'resources.host-set.types.' hostSet.type) - }} + {{hostSet.host_catalog_id}} From 52dafcb672c609b4d0ad72c7e4a3c287320b6f8e Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 19:21:39 -0800 Subject: [PATCH 107/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20client=20se?= =?UTF-8?q?cret=20value=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/form/en-us.yaml | 6 +++++- .../app/components/form/host-catalog/azure/index.hbs | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index a13b995f2..322544be7 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -144,10 +144,14 @@ provider: label: Client ID help: The client ID for the client you want Boundary to use. link-text : Learn more + secret: + label: Client secret value + help: The client secret value for the client you want Boundary to use + link-text: Learn more choose_a_provider: label: Choose a provider description: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin. filter: label: Filter help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider. - link-text: Learn more about using filters for Azure resources. \ No newline at end of file + link-text: Learn more about using filters for Azure resources. diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index dc94e510d..9d8109f86 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -161,6 +161,16 @@ readonly={{false}} /> + + {{#if (can 'save model' @model)}} Date: Tue, 15 Feb 2022 08:39:08 -0800 Subject: [PATCH 108/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20use=20hostcatal?= =?UTF-8?q?ogtypebadge=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 109/148] =?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 110/148] 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, From 58731f14481e3b914ad21218b4e054d5d5c0f251 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 15 Feb 2022 14:36:54 -0500 Subject: [PATCH 111/148] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20simplify=20n?= =?UTF-8?q?ew=20host=20catalog=20creation=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../host-catalogs/host-catalog/host-sets/new.js | 15 ++------------- .../app/routes/scopes/scope/host-catalogs/new.js | 16 +++++----------- .../host-catalogs/host-catalog/host-sets/new.hbs | 1 - 3 files changed, 7 insertions(+), 25 deletions(-) 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..3c728dd1a 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 @@ -15,10 +15,6 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends const { id: host_catalog_id, compositeType } = this.modelFor( 'scopes.scope.host-catalogs.host-catalog' ); - if (this.currentModel?.isNew) { - this.currentModel.rollbackAttributes(); - } - console.log('typedwed', compositeType); return this.store.createRecord('host-set', { compositeType, host_catalog_id, @@ -55,17 +51,10 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsNewRoute extends model: model, }); } - /** - * Update type of host set - * @param {string} type - */ - @action - async changeType(type) { - await this.router.replaceWith({ queryParams: { type } }); - } + /** * Adds a string item to array `property` on the passed `filter`. - + * @param {hostSetModel} hostSet * @param {string} property * @param {string} value diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js index 1e4932280..c712630aa 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/new.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/new.js @@ -23,7 +23,7 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { * creating another, but reuse name/description if available. * @return {HostCatalogModel} */ - model() { + model({ type: compositeType = 'static' }) { const scopeModel = this.modelFor('scopes.scope'); let name, description; if (this.currentModel?.isNew) { @@ -32,25 +32,19 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route { } return this.store.createRecord('host-catalog', { scopeModel, + compositeType, name, description, }); } - afterModel(model, transition) { - this.changeType(transition.to.queryParams?.type); - } - /** * Update type of host catalog * @param {string} type */ @action - async changeType(type) { - const model = this.modelFor('scopes.scope.host-catalogs.new'); - if (!type) type = 'static'; // Unknown host catalog type defaults to 'static' - if (model.isUnknown) type = 'aws'; //Is this the default case for plugin type? - model.compositeType = type; - await this.router.replaceWith({ queryParams: { type } }); + changeType(type) { + if (type === 'plugin') type = 'aws'; + this.router.replaceWith({ queryParams: { type } }); } } diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs index 4047f364c..2aec7f029 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/new.hbs @@ -4,7 +4,6 @@ @model={{@model}} @submit={{route-action 'save' @model}} @cancel={{route-action 'cancel' @model}} - @changeType={{route-action 'changeType' @model.type}} @removeItemByIndex={{route-action 'removeItemByIndex' @model}} @addStringItem={{route-action 'addStringItem' @model}} /> \ No newline at end of file From e5e231f93a259d10e86da4d604da4e1b2354e058 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 15 Feb 2022 15:08:59 -0500 Subject: [PATCH 112/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20add=20disable=5F?= =?UTF-8?q?credential=5Frotation=20field=20to=20forms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/form/en-us.yaml | 18 ++++++++++-------- .../components/form/host-catalog/aws/index.hbs | 12 ++++++++++-- .../components/form/host-catalog/aws/index.js | 11 +++++++++++ .../form/host-catalog/azure/index.hbs | 11 +++++++++-- .../routes/scopes/scope/host-catalogs/new.js | 6 +++++- 5 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 ui/admin/app/components/form/host-catalog/aws/index.js diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index a13b995f2..8204dce5d 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -118,7 +118,7 @@ callback_url: filter: label: Filter help: A boolean expression defining a filter run against the provided information. -tenant_id: +tenant_id: label: Tenant ID help: The tenant (directory) ID for your Azure Active Directory application. link-text: Learn more @@ -134,20 +134,22 @@ secret_access_key: label: Secret Access Key help: The subscription ID for the subscription with read access. link-text: Learn more -region: +region: label: Region provider: label: Provider Details description: This is the provider for this host catalog. The format of the host set filters are specific to each provider. - help: - client: + help: + client: label: Client ID help: The client ID for the client you want Boundary to use. link-text : Learn more - choose_a_provider: - label: Choose a provider + choose_a_provider: + label: Choose a provider description: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin. - filter: + filter: label: Filter help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider. - link-text: Learn more about using filters for Azure resources. \ No newline at end of file + link-text: Learn more about using filters for Azure resources. +disable_credential_rotation: + label: Disable credential rotation 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..8422c5ddc 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -13,7 +13,6 @@ @label={{t 'form.name.label'}} @helperText={{t 'form.name.help'}} @error={{@model.errors.name}} - disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -33,7 +32,6 @@ @label={{t 'form.description.label'}} @helperText={{t 'form.description.help'}} @error={{@model.errors.description}} - disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -156,6 +154,16 @@ @link='https://learn.hashicorp.com/tutorials/boundary/cloud-host-catalogs#set-up-cloud-hosts' readonly={{false}} /> + + + +   + {{#if (can 'save model' @model)}} @@ -33,7 +32,6 @@ @label={{t 'form.description.label'}} @helperText={{t 'form.description.help'}} @error={{@model.errors.description}} - disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -161,6 +159,15 @@ readonly={{false}} /> + + +   + {{#if (can 'save model' @model)}} Date: Tue, 15 Feb 2022 12:23:17 -0800 Subject: [PATCH 113/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20refactor=20tran?= =?UTF-8?q?slations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/en-us.yaml | 9 ++++++ addons/core/translations/form/en-us.yaml | 26 ++------------- .../form/host-catalog/aws/index.hbs | 18 ++++------- .../form/host-catalog/azure/index.hbs | 32 ++++++++----------- .../form/host-catalog/static/index.hbs | 8 ++--- .../components/form/host-set/aws/index.hbs | 8 ++--- .../components/form/host-set/azure/index.hbs | 10 +++--- .../app/components/form/host/aws/index.hbs | 2 +- .../app/components/form/host/azure/index.hbs | 2 +- 9 files changed, 46 insertions(+), 69 deletions(-) diff --git a/addons/core/translations/en-us.yaml b/addons/core/translations/en-us.yaml index 73a720d62..1da3accf0 100644 --- a/addons/core/translations/en-us.yaml +++ b/addons/core/translations/en-us.yaml @@ -30,12 +30,21 @@ titles: label: Label value: Value no-results: No Results + learn-more: Learn more + choose-a-provider: Choose a provider + provider: Provider + filter: Filter + secret: Client secret value descriptions: empty-set: There are no items to display yet. You may be able to add items or try back later. origin-initialization: To get started, please enter your origin URL create-but-not-list: You do not have permission to list {resource}, but you can create new instances. neither-list-nor-create: You do not have permission to list or create {resource}. no-results: We found no matching records. + choose-a-provider: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin. + provider: This is the provider for this host catalog. The format of the host set filters are specific to each provider. + filter: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider + secret: The client secret value for the client you want Boundary to use questions: delete-confirm: Are you sure you want to delete this resource? remove-confirm: Are you sure you want to remove this association? diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 322544be7..8aef87403 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -121,37 +121,17 @@ filter: tenant_id: label: Tenant ID help: The tenant (directory) ID for your Azure Active Directory application. - link-text: Learn more subscription_id: label: Subscription ID help: The subscription ID for the subscription with read access. - link-text: Learn more access_key_id: label: Access Key ID help: The access key ID found on the Security Credentials page in AWS. - link-text: Learn more secret_access_key: label: Secret Access Key help: The subscription ID for the subscription with read access. - link-text: Learn more region: label: Region -provider: - label: Provider Details - description: This is the provider for this host catalog. The format of the host set filters are specific to each provider. - help: - client: - label: Client ID - help: The client ID for the client you want Boundary to use. - link-text : Learn more - secret: - label: Client secret value - help: The client secret value for the client you want Boundary to use - link-text: Learn more - choose_a_provider: - label: Choose a provider - description: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin. - filter: - label: Filter - help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider. - link-text: Learn more about using filters for Azure resources. +azure_client_id: + label: Client ID + help: The client ID for the client you want Boundary to use. 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..7a15bee5a 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -74,14 +74,12 @@ - <:title>{{t 'form.provider.label'}} + <:title>{{t 'titles.provider'}} - <:title>{{t 'form.provider.choose_a_provider.label'}} - <:description>{{t - 'form.provider.choose_a_provider.description' - }} + <:title>{{t 'titles.choose-a-provider'}} + <:description>{{t 'descriptions.choose-a-provider'}} <:body> {{else}} - <:title>{{t 'form.provider.label'}} - <:description>{{t 'form.provider.description'}} + <:title>{{t 'titles.provider'}} + <:description>{{t 'descriptions.provider'}} <:body> @@ -152,8 +149,7 @@ @value={{@model.secret_access_key}} @label={{t 'form.secret_access_key.label'}} @helperText={{t 'form.secret_access_key.help'}} - @linkText={{t 'form.secret_access_key.link-text'}} - @link='https://learn.hashicorp.com/tutorials/boundary/cloud-host-catalogs#set-up-cloud-hosts' + @linkText={{t 'titles.learn-more'}} readonly={{false}} /> {{#if (can 'save model' @model)}} diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 9d8109f86..007a83426 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -74,13 +74,11 @@ - <:title>{{t 'form.provider.label'}} + <:title>{{t 'titles.provider'}} - <:title>{{t 'form.provider.choose_a_provider.label'}} - <:description>{{t - 'form.provider.choose_a_provider.description' - }} + <:title>{{t 'titles.choose-a-provider'}} + <:description>{{t 'descriptions.choose-a-provider'}} <:body> - <:title>{{t 'form.provider.label'}} - <:description>{{t 'form.provider.description'}} + <:title>{{t 'titles.provider'}} + <:description>{{t 'descriptions.provider'}} <:body> @@ -145,8 +142,7 @@ @value={{@model.subscription_id}} @label={{t 'form.subscription_id.label'}} @helperText={{t 'form.subscription_id.help'}} - @linkText={{t 'form.subscription_id.link-text'}} - @link='https://learn.hashicorp.com/tutorials/boundary/cloud-host-catalogs#set-up-cloud-hosts' + @linkText={{t 'titles.learn-more'}} readonly={{false}} /> @@ -154,20 +150,18 @@ @name='client_id' @type='client_id' @value={{@model.client_id}} - @label={{t 'form.provider.client.label'}} - @helperText={{t 'form.provider.client.help'}} - @linkText={{t 'form.provider.client.link-text'}} - @link='https://learn.hashicorp.com/tutorials/boundary/cloud-host-catalogs#set-up-cloud-hosts' + @label={{t 'form.azure_client_id.label'}} + @helperText={{t 'form.azure_client_id.help'}} + @linkText={{t 'titles.learn-more'}} readonly={{false}} /> diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index f0d4c01d5..c16344732 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -75,14 +75,12 @@ {{#if @model.isPlugin}} - <:title>{{t 'form.provider.label'}} + <:title>{{t 'titles.provider'}} - <:title>{{t 'form.provider.choose_a_provider.label'}} - <:description>{{t - 'form.provider.choose_a_provider.description' - }} + <:title>{{t 'titles.choose-a-provider'}} + <:description>{{t 'descriptions.choose-a-provider'}} <:body> - <:title>{{t 'form.provider.label'}} - <:description>{{t 'form.provider.description'}} + <:title>{{t 'titles.provider'}} + <:description>{{t 'descriptions.provider'}} <:body> - <:title>{{t 'form.provider.filter.label'}} - <:description>{{t 'form.provider.filter.help'}} + <:title>{{t 'titles.filter'}} + <:description>{{t 'descriptions.filter'}} <:body> {{#if @model.errors.filters}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index 6dff36ff0..048b7b042 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -54,8 +54,8 @@ /> - <:title>{{t 'form.provider.label'}} - <:description>{{t 'form.provider.description'}} + <:title>{{t 'titles.provider'}} + <:description>{{t 'descriptions.provider'}} <:body> - <:title>{{t 'form.provider.label'}} + <:title>{{t 'titles.provider'}} <:body> - <:title>{{t 'form.provider.label'}} + <:title>{{t 'titles.provider'}} <:body> Date: Tue, 15 Feb 2022 12:55:40 -0800 Subject: [PATCH 114/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20move=20translatio?= =?UTF-8?q?ns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/actions/en-us.yaml | 1 + addons/core/translations/en-us.yaml | 5 ----- addons/core/translations/form/en-us.yaml | 6 ++++++ .../app/components/form/host-catalog/aws/index.hbs | 4 ++-- .../app/components/form/host-catalog/azure/index.hbs | 12 ++++++------ ui/admin/app/components/form/host-set/aws/index.hbs | 4 ++-- .../app/components/form/host-set/azure/index.hbs | 4 ++-- 7 files changed, 19 insertions(+), 17 deletions(-) diff --git a/addons/core/translations/actions/en-us.yaml b/addons/core/translations/actions/en-us.yaml index 118c5f601..9c97d54af 100644 --- a/addons/core/translations/actions/en-us.yaml +++ b/addons/core/translations/actions/en-us.yaml @@ -36,3 +36,4 @@ toggle-secret: Toggle secret visibility minimize: Minimize fullscreen: Fullscreen clear-all-filters: Clear all filters +learn-more: Learn more \ No newline at end of file diff --git a/addons/core/translations/en-us.yaml b/addons/core/translations/en-us.yaml index 1da3accf0..6dc0f659b 100644 --- a/addons/core/translations/en-us.yaml +++ b/addons/core/translations/en-us.yaml @@ -30,11 +30,8 @@ titles: label: Label value: Value no-results: No Results - learn-more: Learn more choose-a-provider: Choose a provider provider: Provider - filter: Filter - secret: Client secret value descriptions: empty-set: There are no items to display yet. You may be able to add items or try back later. origin-initialization: To get started, please enter your origin URL @@ -43,8 +40,6 @@ descriptions: no-results: We found no matching records. choose-a-provider: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin. provider: This is the provider for this host catalog. The format of the host set filters are specific to each provider. - filter: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider - secret: The client secret value for the client you want Boundary to use questions: delete-confirm: Are you sure you want to delete this resource? remove-confirm: Are you sure you want to remove this association? diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 8aef87403..db37a97b1 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -135,3 +135,9 @@ region: azure_client_id: label: Client ID help: The client ID for the client you want Boundary to use. +secret: + label: Client secret value + help: The client secret value for the client you want Boundary to use +host_set_filter: + label: Filter + help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider \ No newline at end of file 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 7a15bee5a..1cd589af5 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -139,7 +139,7 @@ @value={{@model.access_key_id}} @label={{t 'form.access_key_id.label'}} @helperText={{t 'form.access_key_id.help'}} - @linkText={{t 'titles.learn-more'}} + @linkText={{t 'actions.learn-more'}} readonly={{false}} /> @@ -149,7 +149,7 @@ @value={{@model.secret_access_key}} @label={{t 'form.secret_access_key.label'}} @helperText={{t 'form.secret_access_key.help'}} - @linkText={{t 'titles.learn-more'}} + @linkText={{t 'actions.learn-more'}} readonly={{false}} /> {{#if (can 'save model' @model)}} diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 007a83426..18d612db0 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -132,7 +132,7 @@ @value={{@model.tenant_id}} @label={{t 'form.tenant_id.label'}} @helperText={{t 'form.tenant_id.help'}} - @linkText={{t 'titles.learn-more'}} + @linkText={{t 'actions.learn-more'}} readonly={{false}} /> @@ -142,7 +142,7 @@ @value={{@model.subscription_id}} @label={{t 'form.subscription_id.label'}} @helperText={{t 'form.subscription_id.help'}} - @linkText={{t 'titles.learn-more'}} + @linkText={{t 'actions.learn-more'}} readonly={{false}} /> @@ -152,16 +152,16 @@ @value={{@model.client_id}} @label={{t 'form.azure_client_id.label'}} @helperText={{t 'form.azure_client_id.help'}} - @linkText={{t 'titles.learn-more'}} + @linkText={{t 'actions.learn-more'}} readonly={{false}} /> 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 9d00ff2a4..5f0d0e078 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -76,8 +76,8 @@ {{! placeholder for filter, update me when the model is ready }} - <:title>{{t 'titles.filter'}} - <:description>{{t 'descriptions.filter'}} + <:title>{{t 'form.host_set_filter.label'}} + <:description>{{t 'form.host_set_filter.help'}} <:body> {{#if @model.errors.filters}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index 048b7b042..da22bf67f 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -79,8 +79,8 @@ @name='filter' @type='filter' @value={{@model.filter}} - @label={{t 'titles.filter'}} - @helperText={{t 'descriptions.filter'}} + @label={{t 'form.host_set_filter.label'}} + @helperText={{t 'form.host_set_filter.help'}} @linkText={{t 'form. tiltes.learn-more'}} @error={{@model.errors.description}} disabled={{@model.isSaving}} From fb266d548c912af76916f3afc3413e9090cc638d Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 15 Feb 2022 15:58:31 -0500 Subject: [PATCH 115/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20use=20@checked?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-catalog/aws/index.hbs | 2 +- .../app/components/form/host-catalog/azure/index.hbs | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) 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 8422c5ddc..238ab99cd 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -157,7 +157,7 @@ diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index ae2c0e033..4152090d8 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -159,15 +159,6 @@ readonly={{false}} /> - - -   - {{#if (can 'save model' @model)}} Date: Tue, 15 Feb 2022 13:17:17 -0800 Subject: [PATCH 116/148] updates --- addons/core/translations/form/en-us.yaml | 8 +------- addons/core/translations/resources/en-us.yaml | 6 ++++++ ui/admin/app/components/form/host-catalog/azure/index.hbs | 4 ++-- ui/admin/app/components/form/host-set/aws/index.hbs | 5 ++--- ui/admin/app/components/form/host-set/azure/index.hbs | 5 ++--- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index db37a97b1..f433f247b 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -132,12 +132,6 @@ secret_access_key: help: The subscription ID for the subscription with read access. region: label: Region -azure_client_id: - label: Client ID - help: The client ID for the client you want Boundary to use. secret: label: Client secret value - help: The client secret value for the client you want Boundary to use -host_set_filter: - label: Filter - help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider \ No newline at end of file + help: The client secret value for the client you want Boundary to use \ No newline at end of file diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 5b5b02e45..3098c2f12 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -93,6 +93,9 @@ host-catalog: aws: AWS azure: Azure dynamic: Dynamic + azure_client_id: + label: Client ID + help: The client ID for the client you want Boundary to use. host-set: title: Host Set title_plural: Host Sets @@ -103,6 +106,9 @@ host-set: delete: Delete Host Set create-and-add-host: Create and Add Host add-hosts: Add Existing Host + filter: + label: Filter + help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider messages: welcome: title: Welcome to Host Sets diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 361cd090c..51281f299 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -150,8 +150,8 @@ @name='client_id' @type='client_id' @value={{@model.client_id}} - @label={{t 'form.azure_client_id.label'}} - @helperText={{t 'form.azure_client_id.help'}} + @label={{t 'resources.host-catalog.azure_client_id.label'}} + @helperText={{t 'resources.host-catalog.azure_client_id.help'}} @linkText={{t 'actions.learn-more'}} readonly={{false}} /> 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 616bf3e3c..aceead976 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -74,10 +74,9 @@ - {{! placeholder for filter, update me when the model is ready }} - <:title>{{t 'form.host_set_filter.label'}} - <:description>{{t 'form.host_set_filter.help'}} + <:title>{{t 'resources.host-set.filter.label'}} + <:description>{{t 'resources.host-set.filter.help'}} <:body> {{#if @model.errors.filters}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index 046c14c2f..d306b00f6 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -74,13 +74,12 @@ - {{! placeholder for filter, update me when the model is ready }} Date: Tue, 15 Feb 2022 14:05:59 -0800 Subject: [PATCH 117/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20show=20ip=5Fadd?= =?UTF-8?q?resses=20in=20host=20aws=20and=20azure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host/aws/index.hbs | 9 ++++++++- ui/admin/app/components/form/host/azure/index.hbs | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/components/form/host/aws/index.hbs b/ui/admin/app/components/form/host/aws/index.hbs index 9fda57479..a8bd48401 100644 --- a/ui/admin/app/components/form/host/aws/index.hbs +++ b/ui/admin/app/components/form/host/aws/index.hbs @@ -71,7 +71,14 @@ - + {{#each @model.ip_addresses as |address|}} + + {{/each}} {{#if (can 'save model' @model)}} - + {{#each @model.ip_addresses as |address|}} + + {{/each}} {{#if (can 'save model' @model)}} Date: Tue, 15 Feb 2022 14:48:08 -0800 Subject: [PATCH 118/148] update attr name --- ui/admin/app/components/form/host/aws/index.hbs | 4 ++-- ui/admin/app/components/form/host/azure/index.hbs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/admin/app/components/form/host/aws/index.hbs b/ui/admin/app/components/form/host/aws/index.hbs index a8bd48401..8e6a2cc08 100644 --- a/ui/admin/app/components/form/host/aws/index.hbs +++ b/ui/admin/app/components/form/host/aws/index.hbs @@ -71,9 +71,9 @@ - {{#each @model.ip_addresses as |address|}} + {{#each @model.ip_addresses as |ip_address|}} - {{#each @model.ip_addresses as |address|}} + {{#each @model.ip_addresses as |ip_address|}} Date: Tue, 15 Feb 2022 15:12:20 -0800 Subject: [PATCH 119/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fixt=20host=20moc?= =?UTF-8?q?k=20data=20attributes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactor ip_addresses, dns_names and external_id to not be nested under attributes: {} when generating mock data. --- addons/api/mirage/factories/host.js | 55 +++++++------------ addons/api/mirage/generated/factories/host.js | 5 +- 2 files changed, 25 insertions(+), 35 deletions(-) diff --git a/addons/api/mirage/factories/host.js b/addons/api/mirage/factories/host.js index 93323e965..3bf07f11a 100644 --- a/addons/api/mirage/factories/host.js +++ b/addons/api/mirage/factories/host.js @@ -2,32 +2,6 @@ import factory from '../generated/factories/host'; import permissions from '../helpers/permissions'; import { internet, datatype } from 'faker'; -/** - * Returns an array of strings with IP addresses. - * @returns {array} - */ -const returnIpAddressesArray = () => { - const addressesAmount = Math.floor(Math.random() * 6) + 1; - let result = []; - for (let i = 0; i < addressesAmount; ++i) { - result.push(internet.ip()); - } - return result; -}; - -/** - * Returns an array of strings with DNS names. - * @param {string} hostType - */ -const returnDnsNames = () => { - const dnsNamesAmount = Math.floor(Math.random() * 6) + 1; - let result = []; - for (let i = 0; i < dnsNamesAmount; i++) { - result.push(internet.domainName()); - } - return result; -}; - export default factory.extend({ id: (i) => `host-id-${i}`, type() { @@ -45,13 +19,26 @@ export default factory.extend({ return this.hostCatalog.plugin; } }, - attributes() { - return { - address: internet.ipv6(), - ip_addresses: returnIpAddressesArray(), - external_id: datatype.uuid(), - // Only aws plugins have dns_names - dns_names: this.plugin?.name === 'aws' ? returnDnsNames() : undefined, - }; + ip_addresses() { + const addressesAmount = Math.floor(Math.random() * 6) + 1; + let result = []; + for (let i = 0; i < addressesAmount; ++i) { + result.push(internet.ip()); + } + return result; + }, + external_id() { + return datatype.uuid(); + }, + // Only aws plugins have dns_names + dns_names() { + if (this.plugin?.name === 'aws') { + const dnsNamesAmount = Math.floor(Math.random() * 6) + 1; + let result = []; + for (let i = 0; i < dnsNamesAmount; i++) { + result.push(internet.domainName()); + } + return result; + } }, }); diff --git a/addons/api/mirage/generated/factories/host.js b/addons/api/mirage/generated/factories/host.js index 658c334bf..6b26bab0b 100644 --- a/addons/api/mirage/generated/factories/host.js +++ b/addons/api/mirage/generated/factories/host.js @@ -1,5 +1,5 @@ import { Factory } from 'ember-cli-mirage'; -import { random, date, datatype } from 'faker'; +import { random, date, datatype, internet } from 'faker'; /** * GeneratedHostModelFactory @@ -11,4 +11,7 @@ export default Factory.extend({ created_time: () => date.recent(), updated_time: () => date.recent(), version: () => datatype.number(), + attributes: () => { + return { address: internet.ipv6() }; + }, }); From 790d047692f8025d697fe729deb251d719917a3e Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 15 Feb 2022 18:23:25 -0500 Subject: [PATCH 120/148] chore: move form fields --- addons/core/translations/resources/en-us.yaml | 16 +++++++++------- .../components/form/host-catalog/azure/index.hbs | 4 ++-- .../app/components/form/host-set/aws/index.hbs | 4 ++-- .../app/components/form/host-set/azure/index.hbs | 4 ++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 3098c2f12..1341dcc76 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -84,7 +84,7 @@ host-catalog: title: Welcome to Host Catalogs actions: delete: Delete Host Catalog - help: + 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: @@ -93,9 +93,10 @@ host-catalog: aws: AWS azure: Azure dynamic: Dynamic - azure_client_id: - label: Client ID - help: The client ID for the client you want Boundary to use. + form: + azure_client_id: + label: Client ID + help: The client ID for the client you want Boundary to use. host-set: title: Host Set title_plural: Host Sets @@ -106,9 +107,10 @@ host-set: delete: Delete Host Set create-and-add-host: Create and Add Host add-hosts: Add Existing Host - filter: - label: Filter - help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider + form: + filter: + label: Filter + help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider messages: welcome: title: Welcome to Host Sets diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index a822b0c84..d19cb2dd3 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -148,8 +148,8 @@ @name='client_id' @type='client_id' @value={{@model.client_id}} - @label={{t 'resources.host-catalog.azure_client_id.label'}} - @helperText={{t 'resources.host-catalog.azure_client_id.help'}} + @label={{t 'resources.host-catalog.form.azure_client_id.label'}} + @helperText={{t 'resources.host-catalog.form.azure_client_id.help'}} @linkText={{t 'actions.learn-more'}} readonly={{false}} /> 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 aceead976..3af6ce47f 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -75,8 +75,8 @@ - <:title>{{t 'resources.host-set.filter.label'}} - <:description>{{t 'resources.host-set.filter.help'}} + <:title>{{t 'resources.host-set.form.filter.label'}} + <:description>{{t 'resources.host-set.form.filter.help'}} <:body> {{#if @model.errors.filters}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index d306b00f6..686cb70d4 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -78,8 +78,8 @@ @name='filter' @type='filter' @value={{@model.filter}} - @label={{t 'resources.host-set.filter.label'}} - @helperText={{t 'resources.host-set.filter.help'}} + @label={{t 'resources.host-set.form.filter.label'}} + @helperText={{t 'resources.host-set.form.filter.help'}} @linkText={{t 'form. tiltes.learn-more'}} @error={{@model.errors.description}} disabled={{@model.isSaving}} From 5f1df8a0a0a431769807f13375303d7d66e78ae1 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 15 Feb 2022 16:12:05 -0800 Subject: [PATCH 121/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20show=20latest?= =?UTF-8?q?=20ip=20addresses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/en-us.yaml | 1 + .../app/components/form/host/aws/index.hbs | 17 +++++++++----- .../app/components/form/host/azure/index.hbs | 23 ++++++++++++------- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/addons/core/translations/en-us.yaml b/addons/core/translations/en-us.yaml index 73a720d62..12232d8a6 100644 --- a/addons/core/translations/en-us.yaml +++ b/addons/core/translations/en-us.yaml @@ -30,6 +30,7 @@ titles: label: Label value: Value no-results: No Results + ip-addresses: Latest IP Addresses descriptions: empty-set: There are no items to display yet. You may be able to add items or try back later. origin-initialization: To get started, please enter your origin URL diff --git a/ui/admin/app/components/form/host/aws/index.hbs b/ui/admin/app/components/form/host/aws/index.hbs index 8e6a2cc08..1ceea8ff7 100644 --- a/ui/admin/app/components/form/host/aws/index.hbs +++ b/ui/admin/app/components/form/host/aws/index.hbs @@ -71,13 +71,18 @@ + {{#each @model.ip_addresses as |ip_address|}} - + + <:title>{{t 'titles.ip-addresses'}} + <:body> + + + {{/each}} {{#if (can 'save model' @model)}}
- {{#each @model.ip_addresses as |ip_address|}} - - {{/each}} + + + <:title>{{t 'titles.ip-addresses'}} + <:body> + {{#each @model.ip_addresses as |ip_address|}} + + + {{/each}} + + + {{#if (can 'save model' @model)}} Date: Tue, 15 Feb 2022 18:55:42 -0800 Subject: [PATCH 122/148] conflict --- addons/core/translations/form/en-us.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index f185acb71..e93ad3774 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -135,3 +135,5 @@ region: secret: label: Client secret value help: The client secret value for the client you want Boundary to use +disable_credential_rotation: + label: Disable credential rotation \ No newline at end of file From 8c2ff4d2e9e42f5c631c88f25edd690c2906bb62 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 15 Feb 2022 16:53:27 -0800 Subject: [PATCH 123/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20doc=20lin?= =?UTF-8?q?k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/config/environment.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/admin/config/environment.js b/ui/admin/config/environment.js index f5d8c53b9..e72d72854 100644 --- a/ui/admin/config/environment.js +++ b/ui/admin/config/environment.js @@ -53,6 +53,7 @@ module.exports = function (environment) { 'group.add-members': '/groups/add-members', 'host-catalog': '/host-catalogs', 'host-catalog.new': '/host-catalogs/new', + 'host-catalog.set-up-cloud-hosts': 'host-catalog.set-up-cloud-hosts', 'host-set': '/host-sets', 'host-set.new': '/host-sets/new', 'host-set.add-hosts': '/host-sets/add-hosts', From 8b338f028858b716f09d0ea6be0feaee6dc5f751 Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 15 Feb 2022 18:51:58 -0800 Subject: [PATCH 124/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20doc=20lin?= =?UTF-8?q?ks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-catalog/azure/index.hbs | 4 ++++ ui/admin/app/components/form/host-catalog/index.hbs | 1 + ui/admin/app/components/form/host-catalog/static/index.hbs | 1 - ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs | 1 + ui/admin/config/environment.js | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index d19cb2dd3..d816e36a9 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -131,6 +131,7 @@ @label={{t 'form.tenant_id.label'}} @helperText={{t 'form.tenant_id.help'}} @linkText={{t 'actions.learn-more'}} + @link={{doc-url @doc}} readonly={{false}} /> @@ -141,6 +142,7 @@ @label={{t 'form.subscription_id.label'}} @helperText={{t 'form.subscription_id.help'}} @linkText={{t 'actions.learn-more'}} + @link={{doc-url @doc}} readonly={{false}} /> @@ -151,6 +153,7 @@ @label={{t 'resources.host-catalog.form.azure_client_id.label'}} @helperText={{t 'resources.host-catalog.form.azure_client_id.help'}} @linkText={{t 'actions.learn-more'}} + @link={{doc-url @doc}} readonly={{false}} /> @@ -160,6 +163,7 @@ @label={{t 'form.secret.label'}} @helperText={{t 'form.secret.help'}} @linkText={{t 'actions.learn-more'}} + @link={{doc-url @doc}} readonly={{false}} /> diff --git a/ui/admin/app/components/form/host-catalog/index.hbs b/ui/admin/app/components/form/host-catalog/index.hbs index 90cebebc9..2af0d78a5 100644 --- a/ui/admin/app/components/form/host-catalog/index.hbs +++ b/ui/admin/app/components/form/host-catalog/index.hbs @@ -4,4 +4,5 @@ submit=@submit cancel=@cancel changeType=@changeType + doc=@doc }} \ No newline at end of file diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index 560b9c118..58bfe36da 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -81,7 +81,6 @@ <:title>{{t 'titles.choose-a-provider'}} <:description>{{t 'descriptions.choose-a-provider'}} - <:body> diff --git a/ui/admin/config/environment.js b/ui/admin/config/environment.js index e72d72854..cd6e3a020 100644 --- a/ui/admin/config/environment.js +++ b/ui/admin/config/environment.js @@ -53,7 +53,7 @@ module.exports = function (environment) { 'group.add-members': '/groups/add-members', 'host-catalog': '/host-catalogs', 'host-catalog.new': '/host-catalogs/new', - 'host-catalog.set-up-cloud-hosts': 'host-catalog.set-up-cloud-hosts', + 'host-catalog.set-up-cloud-hosts': '/host-catalog-set-up-cloud-hosts', 'host-set': '/host-sets', 'host-set.new': '/host-sets/new', 'host-set.add-hosts': '/host-sets/add-hosts', From 88b4a1a243fff683ead58bf5d1a58e3b446cdb19 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 16 Feb 2022 08:33:47 -0800 Subject: [PATCH 125/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20multiple=20labels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host/aws/index.hbs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/admin/app/components/form/host/aws/index.hbs b/ui/admin/app/components/form/host/aws/index.hbs index 1ceea8ff7..7ca35ec66 100644 --- a/ui/admin/app/components/form/host/aws/index.hbs +++ b/ui/admin/app/components/form/host/aws/index.hbs @@ -72,18 +72,20 @@ - {{#each @model.ip_addresses as |ip_address|}} - - <:title>{{t 'titles.ip-addresses'}} - <:body> + + <:title>{{t 'titles.ip-addresses'}} + <:body> + {{#each @model.ip_addresses as |ip_address|}} + - - - {{/each}} + {{/each}} + + + {{#if (can 'save model' @model)}} Date: Wed, 16 Feb 2022 08:49:11 -0800 Subject: [PATCH 126/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Refactor=20host-s?= =?UTF-8?q?et=20dropdown=20separator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactor host-set actions dropdown separator to not be show when there is just 1 option. --- .../host-catalogs/host-catalog/host-sets/host-set/-actions.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/-actions.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/-actions.hbs index d0bae064d..9115209fc 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/-actions.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/-actions.hbs @@ -14,9 +14,9 @@ > {{t 'resources.host-set.actions.add-hosts'}} + {{/if}} {{#if (can 'delete model' @model)}} - Date: Wed, 16 Feb 2022 08:51:07 -0800 Subject: [PATCH 127/148] fix key --- ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs index 4f2dc09d9..682fc6026 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/new.hbs @@ -19,7 +19,7 @@ @submit={{route-action 'save' @model}} @cancel={{route-action 'cancel' @model}} @changeType={{route-action 'changeType'}} - @doc='host-catalog-set-up-cloud-hosts' + @doc='host-catalog.set-up-cloud-hosts' /> From a44c859414d35f5b203b827ca93660baa81c5b7c Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 16 Feb 2022 10:30:31 -0800 Subject: [PATCH 128/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20missed=20value=20?= =?UTF-8?q?field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/components/form/host-catalog/azure/index.hbs | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index d816e36a9..930e9ec5e 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -160,6 +160,7 @@ Date: Wed, 16 Feb 2022 11:10:40 -0800 Subject: [PATCH 129/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20preferred?= =?UTF-8?q?=20endpoitns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 2 + .../components/form/host-set/aws/index.hbs | 81 +++++++++++++++++++ .../components/form/host-set/azure/index.hbs | 81 +++++++++++++++++++ .../host-catalogs/host-catalog/host-sets.js | 25 ++++++ 4 files changed, 189 insertions(+) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 1341dcc76..6d55b8ae9 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -111,6 +111,8 @@ host-set: filter: label: Filter help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider + preferred_endpoints: + label: Preferred Endpoints messages: welcome: title: Welcome to Host Sets 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 3af6ce47f..4be390cbb 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -74,6 +74,87 @@
+ + <:title>{{t 'resources.host-set.form.preferred_endpoints.label'}} + + <:body> + {{#if @model.errors.preferred_endpoints}} + + {{#each @model.errors.preferred_endpoints as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{t 'titles.value'}} + + + + + {{#each @model.preferred_endpoints as |endpoint i|}} + + + + + + + + + {{t 'actions.remove'}} + + + + {{/each}} + + + + + + + + {{t 'actions.add'}} + + + + + + + + <:title>{{t 'resources.host-set.form.filter.label'}} <:description>{{t 'resources.host-set.form.filter.help'}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index 686cb70d4..e7e437ce0 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -74,6 +74,87 @@
+ + <:title>{{t 'resources.host-set.form.preferred_endpoints.label'}} + + <:body> + {{#if @model.errors.preferred_endpoints}} + + {{#each @model.errors.preferred_endpoints as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + + {{t 'titles.value'}} + + + + + {{#each @model.preferred_endpoints as |endpoint i|}} + + + + + + + + + {{t 'actions.remove'}} + + + + {{/each}} + + + + + + + + {{t 'actions.add'}} + + + + + + + + Date: Wed, 16 Feb 2022 11:33:33 -0800 Subject: [PATCH 130/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20host=20list?= =?UTF-8?q?=20table=20missing=20address=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix address missing field for static hosts in the host list --- .../scopes/scope/projects/targets/target/hosts.hbs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index 1f25fe243..5a2f47206 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -26,7 +26,13 @@ {{host.id}} - {{host.attributes.address}} + + {{#if host.isStatic}} + {{host.address}} + {{else}} +   + {{/if}} + Date: Wed, 16 Feb 2022 11:37:16 -0800 Subject: [PATCH 131/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/translations/resources/en-us.yaml | 1 + ui/admin/app/components/form/host-set/aws/index.hbs | 4 +++- ui/admin/app/components/form/host-set/azure/index.hbs | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 6d55b8ae9..57de894d3 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -113,6 +113,7 @@ host-set: help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider preferred_endpoints: label: Preferred Endpoints + help: Selects addresses of hosts, in cidr: or dns: format messages: welcome: title: Welcome to Host Sets 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 4be390cbb..9f21b0097 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -76,7 +76,9 @@ <:title>{{t 'resources.host-set.form.preferred_endpoints.label'}} - + <:description>{{t + 'resources.host-set.form.preferred_endpoints.help' + }} <:body> {{#if @model.errors.preferred_endpoints}} diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index e7e437ce0..4cc9cfb4c 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -76,7 +76,9 @@ <:title>{{t 'resources.host-set.form.preferred_endpoints.label'}} - + <:description>{{t + 'resources.host-set.form.preferred_endpoints.help' + }} <:body> {{#if @model.errors.preferred_endpoints}} From e0b8f7d796e8f78dd897c718a8b49bdfe5582b6c Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 16 Feb 2022 11:38:16 -0800 Subject: [PATCH 132/148] remove unused --- .../host-catalogs/host-catalog/host-sets.js | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js index c12deae0f..dc6fdccea 100644 --- a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets.js @@ -91,29 +91,4 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsRoute extends Rou 'scopes.scope.host-catalogs.host-catalog.host-sets' ); } - - // /** - // * Adds a string item to array `property` on the passed `filter`. - - // * @param {hostSetModel} hostSet - // * @param {string} property - // * @param {string} value - // */ - // @action - // async addStringItem(hostSet, property, value) { - // const array = hostSet.get(property); - // array.addObject({ value }); - // } - // /** - // * Removes an item from array `property` at `index` on the - // * passed `hostSet`. - // * @param {hostSetModel} hostSet - // * @param {string} property - // * @param {number} index - // */ - // @action - // async removeItemByIndex(hostSet, property, index) { - // const array = hostSet.get(property); - // array.removeAt(index); - // } } From 8e9b783b0684dfdf4ca461e517d5317d0cafa8e0 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 16 Feb 2022 11:52:39 -0800 Subject: [PATCH 133/148] fix helper text for secret acc value --- addons/core/translations/form/en-us.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index e93ad3774..9807dbcaf 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -129,7 +129,7 @@ access_key_id: help: The access key ID found on the Security Credentials page in AWS. secret_access_key: label: Secret Access Key - help: The subscription ID for the subscription with read access. + help: The secret access key found on the Security Credentials page in AWS. region: label: Region secret: From 22e3a3e6db2186558408866443e304ac68f01ad1 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Wed, 16 Feb 2022 13:31:38 -0800 Subject: [PATCH 134/148] Delete unnecessary else clause in host list within targets --- .../templates/scopes/scope/projects/targets/target/hosts.hbs | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index 5a2f47206..425fd6b9e 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -29,8 +29,6 @@ {{#if host.isStatic}} {{host.address}} - {{else}} -   {{/if}} From 595443bccf5369da816025bea071c40ba2e3dbc0 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 16 Feb 2022 13:35:20 -0800 Subject: [PATCH 135/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20placeholder?= =?UTF-8?q?=20to=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/addon/components/rose/form/input/index.hbs | 2 ++ .../addon/components/rose/form/input/index.stories.mdx | 6 +++++- .../rose/addon/components/rose/form/input/input/index.hbs | 1 + addons/rose/addon/styles/rose/components/form/_input.scss | 4 ++++ ui/admin/app/components/form/host-set/aws/index.hbs | 7 ++++++- ui/admin/app/components/form/host-set/azure/index.hbs | 7 ++++++- 6 files changed, 24 insertions(+), 3 deletions(-) diff --git a/addons/rose/addon/components/rose/form/input/index.hbs b/addons/rose/addon/components/rose/form/input/index.hbs index 524523bbb..96bf0330d 100644 --- a/addons/rose/addon/components/rose/form/input/index.hbs +++ b/addons/rose/addon/components/rose/form/input/index.hbs @@ -15,6 +15,7 @@ type=@type disabled=@disabled error=@error + placeholder=@placeholder aria-describedby=(concat (if @helperText (concat 'helper-text-' this.id)) (if @error (concat ' errors-' this.id))) ) errors=(component 'rose/form/errors' @@ -48,6 +49,7 @@ @type={{@type}} @disabled={{@disabled}} @error={{@error}} + @placeholder={{@placeholder}} @aria-describedby="{{if @helperText (concat 'helper-text-' this.id)}} {{if @error (concat 'errors-' this.id)}}" /> {{yield (hash diff --git a/addons/rose/addon/components/rose/form/input/index.stories.mdx b/addons/rose/addon/components/rose/form/input/index.stories.mdx index 2eaeb2f99..e84eab87b 100644 --- a/addons/rose/addon/components/rose/form/input/index.stories.mdx +++ b/addons/rose/addon/components/rose/form/input/index.stories.mdx @@ -13,7 +13,7 @@ Renders a simple form input. ``` @@ -40,6 +41,7 @@ Or a fully contextual component without a wrapper, for maximum flexibility. @error={{false}} @disabled={{false}} readonly={{false}} + placeholder='la la la' > @@ -60,6 +62,7 @@ Or a fully contextual component without a wrapper, for maximum flexibility. @disabled={{disabled}} readonly={{read-only}} @icon={{icon}} + placeholder={{placeholder}} /> `, context: { @@ -75,6 +78,7 @@ Or a fully contextual component without a wrapper, for maximum flexibility. ), value: text('value', 'Value'), label: text('label', 'Label'), + placeholder: text('placeholder', 'this is a placeholder'), helperText: text('helperText', 'Helper text'), link: text('link', 'link goes here'), linkText: text('linkText', 'link text'), diff --git a/addons/rose/addon/components/rose/form/input/input/index.hbs b/addons/rose/addon/components/rose/form/input/input/index.hbs index 95e81a114..802feeea7 100644 --- a/addons/rose/addon/components/rose/form/input/input/index.hbs +++ b/addons/rose/addon/components/rose/form/input/input/index.hbs @@ -6,4 +6,5 @@ name={{@name}} @type={{@type}} @value={{@value}} + placeholder={{@placeholder}} aria-describedby={{@aria-describedby}} /> diff --git a/addons/rose/addon/styles/rose/components/form/_input.scss b/addons/rose/addon/styles/rose/components/form/_input.scss index 214f57734..889c933ef 100644 --- a/addons/rose/addon/styles/rose/components/form/_input.scss +++ b/addons/rose/addon/styles/rose/components/form/_input.scss @@ -30,6 +30,10 @@ border-radius: sizing.rems(xxxs); box-shadow: inset 0px 3px 1px rgba(var(--stark-components), var(--opacity-4)); + &::placeholder { + color: var(--ui-gray-subtler-1); + } + &.error { color: var(--failure); border-color: currentColor; 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 9f21b0097..79782093e 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -103,6 +103,7 @@ @value={{endpoint.value}} @error={{@model.errors.preferred_endpoints}} @contextual={{true}} + @placeholder='cidr:2001:4860:4860::8888/32' as |field| > @@ -128,7 +129,11 @@ - + @@ -128,7 +129,11 @@ - + Date: Wed, 16 Feb 2022 13:36:49 -0800 Subject: [PATCH 136/148] Update index.stories.mdx --- addons/rose/addon/components/rose/form/input/index.stories.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/rose/addon/components/rose/form/input/index.stories.mdx b/addons/rose/addon/components/rose/form/input/index.stories.mdx index e84eab87b..486acaf47 100644 --- a/addons/rose/addon/components/rose/form/input/index.stories.mdx +++ b/addons/rose/addon/components/rose/form/input/index.stories.mdx @@ -41,7 +41,7 @@ Or a fully contextual component without a wrapper, for maximum flexibility. @error={{false}} @disabled={{false}} readonly={{false}} - placeholder='la la la' + placeholder='placeholder text' > From 1dcfc67e0a4cf04ee59387f506cef544489d3558 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 16 Feb 2022 13:47:02 -0800 Subject: [PATCH 137/148] remove attr from input --- addons/rose/addon/components/rose/form/input/index.hbs | 2 -- .../rose/addon/components/rose/form/input/index.stories.mdx | 4 ---- addons/rose/addon/components/rose/form/input/input/index.hbs | 1 - ui/admin/app/components/form/host-set/aws/index.hbs | 4 ++-- ui/admin/app/components/form/host-set/azure/index.hbs | 4 ++-- 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/addons/rose/addon/components/rose/form/input/index.hbs b/addons/rose/addon/components/rose/form/input/index.hbs index 96bf0330d..524523bbb 100644 --- a/addons/rose/addon/components/rose/form/input/index.hbs +++ b/addons/rose/addon/components/rose/form/input/index.hbs @@ -15,7 +15,6 @@ type=@type disabled=@disabled error=@error - placeholder=@placeholder aria-describedby=(concat (if @helperText (concat 'helper-text-' this.id)) (if @error (concat ' errors-' this.id))) ) errors=(component 'rose/form/errors' @@ -49,7 +48,6 @@ @type={{@type}} @disabled={{@disabled}} @error={{@error}} - @placeholder={{@placeholder}} @aria-describedby="{{if @helperText (concat 'helper-text-' this.id)}} {{if @error (concat 'errors-' this.id)}}" /> {{yield (hash diff --git a/addons/rose/addon/components/rose/form/input/index.stories.mdx b/addons/rose/addon/components/rose/form/input/index.stories.mdx index e84eab87b..4dbe35b58 100644 --- a/addons/rose/addon/components/rose/form/input/index.stories.mdx +++ b/addons/rose/addon/components/rose/form/input/index.stories.mdx @@ -22,7 +22,6 @@ Renders a simple form input. @disabled={{false}} @icon='flight-icons/svg/search-16' readonly={{false}} - placeholder='this is a placeholder' /> ``` @@ -41,7 +40,6 @@ Or a fully contextual component without a wrapper, for maximum flexibility. @error={{false}} @disabled={{false}} readonly={{false}} - placeholder='la la la' > @@ -62,7 +60,6 @@ Or a fully contextual component without a wrapper, for maximum flexibility. @disabled={{disabled}} readonly={{read-only}} @icon={{icon}} - placeholder={{placeholder}} /> `, context: { @@ -78,7 +75,6 @@ Or a fully contextual component without a wrapper, for maximum flexibility. ), value: text('value', 'Value'), label: text('label', 'Label'), - placeholder: text('placeholder', 'this is a placeholder'), helperText: text('helperText', 'Helper text'), link: text('link', 'link goes here'), linkText: text('linkText', 'link text'), diff --git a/addons/rose/addon/components/rose/form/input/input/index.hbs b/addons/rose/addon/components/rose/form/input/input/index.hbs index 802feeea7..95e81a114 100644 --- a/addons/rose/addon/components/rose/form/input/input/index.hbs +++ b/addons/rose/addon/components/rose/form/input/input/index.hbs @@ -6,5 +6,4 @@ name={{@name}} @type={{@type}} @value={{@value}} - placeholder={{@placeholder}} aria-describedby={{@aria-describedby}} /> 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 79782093e..3d7b974ab 100644 --- a/ui/admin/app/components/form/host-set/aws/index.hbs +++ b/ui/admin/app/components/form/host-set/aws/index.hbs @@ -103,7 +103,7 @@ @value={{endpoint.value}} @error={{@model.errors.preferred_endpoints}} @contextual={{true}} - @placeholder='cidr:2001:4860:4860::8888/32' + placeholder='cidr:2001:4860:4860::8888/32' as |field| > @@ -132,7 +132,7 @@ diff --git a/ui/admin/app/components/form/host-set/azure/index.hbs b/ui/admin/app/components/form/host-set/azure/index.hbs index b31f8e7df..866577b7d 100644 --- a/ui/admin/app/components/form/host-set/azure/index.hbs +++ b/ui/admin/app/components/form/host-set/azure/index.hbs @@ -103,7 +103,7 @@ @value={{endpoint.value}} @error={{@model.errors.preferred_endpoints}} @contextual={{true}} - @placeholder='cidr:2001:4860:4860::8888/32' + placeholder='cidr:2001:4860:4860::8888/32' as |field| > @@ -132,7 +132,7 @@ From c5601a5c6359250d4b8e992b7e3848c84b974dd4 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 16 Feb 2022 16:48:01 -0500 Subject: [PATCH 138/148] chore: support `filters` when it is a string by converting to an array --- addons/api/addon/serializers/host-set.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/addons/api/addon/serializers/host-set.js b/addons/api/addon/serializers/host-set.js index 613caf1ab..5749cd993 100644 --- a/addons/api/addon/serializers/host-set.js +++ b/addons/api/addon/serializers/host-set.js @@ -1,4 +1,5 @@ import ApplicationSerializer from './application'; +import { copy } from 'ember-copy'; const fieldByType = { aws: ['preferred_endpoints', 'filters'], @@ -69,4 +70,19 @@ export default class HostSetSerializer extends ApplicationSerializer { } return value; } + + /** + * Temporarily converts `filters` to an array if it is a string. This is a + * quirk of the API. + * + * TODO: remove once API consistently returns arrays. + */ + normalize(typeClass, hash, ...rest) { + const normalizedHash = copy(hash, true); + if (typeof normalizedHash?.filters === 'string') { + normalizedHash.filters = [normalizedHash.filters]; + } + const normalized = super.normalize(typeClass, normalizedHash, ...rest); + return normalized; + } } From 731ce408507ffef5e581453591acac55591145b4 Mon Sep 17 00:00:00 2001 From: dharini Date: Wed, 16 Feb 2022 13:53:58 -0800 Subject: [PATCH 139/148] undo change --- addons/rose/addon/components/rose/form/input/index.stories.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/rose/addon/components/rose/form/input/index.stories.mdx b/addons/rose/addon/components/rose/form/input/index.stories.mdx index 4dbe35b58..2eaeb2f99 100644 --- a/addons/rose/addon/components/rose/form/input/index.stories.mdx +++ b/addons/rose/addon/components/rose/form/input/index.stories.mdx @@ -13,7 +13,7 @@ Renders a simple form input. Date: Thu, 17 Feb 2022 09:20:30 -0500 Subject: [PATCH 140/148] chore: make radio cards a bit narrower --- .../rose/addon/styles/rose/components/form/_radio-card.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/rose/addon/styles/rose/components/form/_radio-card.scss b/addons/rose/addon/styles/rose/components/form/_radio-card.scss index d8b69c896..18081e154 100644 --- a/addons/rose/addon/styles/rose/components/form/_radio-card.scss +++ b/addons/rose/addon/styles/rose/components/form/_radio-card.scss @@ -32,12 +32,12 @@ $radio-svg: ( ); .rose-form-radio-card { - $cardWideWidth: $size-m * 11; + $cardWideWidth: $size-m * 10; $cardTileWidth: $size-m * 7.25; $borderWidth: $size-xxxs * 2; &.wide { - width: ($size-m) * 23; + width: ($size-m) * 20; } &.tile { From f6a29597af4cee0cfe8702bd0ade86fafa624d27 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Thu, 17 Feb 2022 09:12:34 -0800 Subject: [PATCH 141/148] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Host=20address=20?= =?UTF-8?q?field=20shows=20value=20for=20type=20plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Host address field shows Dynamic value on list when it is not type static --- .../templates/scopes/scope/projects/targets/target/hosts.hbs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index 425fd6b9e..8e30c4bbc 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -29,6 +29,8 @@ {{#if host.isStatic}} {{host.address}} + {{else}} + {{t 'resources.host-catalog.types.dynamic'}} {{/if}} From d66b40ad9b1af93fb1a828cc1335e63562a3630f Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Thu, 17 Feb 2022 11:41:35 -0800 Subject: [PATCH 142/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Bump=20binary=20?= =?UTF-8?q?version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump binary version + update changelog --- ui/desktop/CHANGELOG.md | 6 ++++++ ui/desktop/electron-app/config/cli/VERSION | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/desktop/CHANGELOG.md b/ui/desktop/CHANGELOG.md index 9e8fc2f53..923135f1c 100644 --- a/ui/desktop/CHANGELOG.md +++ b/ui/desktop/CHANGELOG.md @@ -2,6 +2,12 @@ Canonical reference for changes, improvements, and bugfixes for Boundary Desktop. +## v1.4.2 [CLI 0.7.5] (2022.02.17) + +### New + +- Support dynamic host catalogs. ([PR](https://github.com/hashicorp/boundary-ui/pull/981)) + ## v1.4.1 [CLI 0.7.3] (2021.12.16) ### New diff --git a/ui/desktop/electron-app/config/cli/VERSION b/ui/desktop/electron-app/config/cli/VERSION index f38fc5393..8bd6ba8c5 100644 --- a/ui/desktop/electron-app/config/cli/VERSION +++ b/ui/desktop/electron-app/config/cli/VERSION @@ -1 +1 @@ -0.7.3 +0.7.5 From a5f0674e9d6f394e0b6068f7fe5b564732ddeedd Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 22 Feb 2022 08:30:28 -0800 Subject: [PATCH 143/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Update=20ember-?= =?UTF-8?q?cli-storybook=20dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/package.json | 2 +- yarn.lock | 117 +++++++++++---------------------------- 2 files changed, 32 insertions(+), 87 deletions(-) diff --git a/addons/rose/package.json b/addons/rose/package.json index 292c1f3ca..8409863f0 100644 --- a/addons/rose/package.json +++ b/addons/rose/package.json @@ -55,7 +55,7 @@ "@storybook/components": "^6.3.12", "@storybook/core-events": "^6.3.0", "@storybook/ember": "^6.3.8", - "@storybook/ember-cli-storybook": "^0.4.0", + "@storybook/ember-cli-storybook": "^0.5.0", "@storybook/theming": "^6.3.0", "babel-eslint": "^10.1.0", "babel-loader": "^8.2.2", diff --git a/yarn.lock b/yarn.lock index 7c0982189..76e206d2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4888,15 +4888,15 @@ dependencies: lodash "^4.17.15" -"@storybook/ember-cli-storybook@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@storybook/ember-cli-storybook/-/ember-cli-storybook-0.4.0.tgz#d0d0d326fa99a19602071e91d93b0bbd907493ec" - integrity sha512-sJyetdQRtM8tO3pjxaRt1Y1nuWRCRAp3mPLgqNS7+6Pv/bISsSgkg0bziqXq1DeDLLOZYe1kqYschaVifTy89A== +"@storybook/ember-cli-storybook@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@storybook/ember-cli-storybook/-/ember-cli-storybook-0.5.0.tgz#b97fc212e6920871f0d6ac4348d663c335ff61b4" + integrity sha512-TleCWq4SgtgeutdSQ2UWEEI5h37au9vX8U+LXN1dbnSBNnNpmdSa0PxXhFhJNZaMZsMq8XzAQowG+H0U7BxIeg== dependencies: - broccoli-funnel "^2.0.2" - broccoli-merge-trees "^3.0.2" + broccoli-funnel "^3.0.8" + broccoli-merge-trees "^4.2.0" cheerio "^1.0.0-rc.2" - ember-cli-addon-docs-yuidoc "^0.2.3" + ember-cli-addon-docs-yuidoc "^1.0.0" ember-cli-babel "^7.23.0" ember-cli-htmlbars "^5.3.1" @@ -6416,11 +6416,6 @@ ansistyles@~0.1.3: resolved "https://registry.yarnpkg.com/ansistyles/-/ansistyles-0.1.3.tgz#5de60415bda071bb37127854c864f41b23254539" integrity sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk= -any-promise@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -10557,16 +10552,17 @@ ember-can@^3.1.0: ember-cli-htmlbars "^4.2.1" ember-inflector "^3.0.1" -ember-cli-addon-docs-yuidoc@^0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/ember-cli-addon-docs-yuidoc/-/ember-cli-addon-docs-yuidoc-0.2.4.tgz#dd8f5cf4982e8492b255fb677e9d771925e27dce" - integrity sha512-asyGxagV+VKK+edc5iOW8JI8Css/d8mEE7ndWKqYa8Ub4eFwVfI6SLr9gHZc8f7q9BK+M5a/RSWHSnTTL5/3Zw== +ember-cli-addon-docs-yuidoc@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ember-cli-addon-docs-yuidoc/-/ember-cli-addon-docs-yuidoc-1.0.0.tgz#0bc750c3950d77fbcce645855063013b295ee6be" + integrity sha512-q7tNVbD4niPgXEQ1Exfeh7Mfiwi3sbT5IG8vXgAumpJgATouTJrk3MGeZjInR7x6CV0AKDiExF/BdMwAshTmrg== dependencies: broccoli-caching-writer "^3.0.3" - ember-cli-babel "^7.7.3" - fs-extra "^5.0.0" - json-api-serializer "^1.11.0" - lodash "^4.17.5" + ember-cli-babel "^7.22.1" + ember-cli-htmlbars "^5.3.1" + fs-extra "^9.0.1" + json-api-serializer "^2.6.0" + lodash "^4.17.20" yuidocjs "^0.10.2" ember-cli-app-version@^5.0.0: @@ -14408,7 +14404,7 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoek@2.x.x, hoek@4.x.x, hoek@6.x.x, hoek@~4.2.0: +hoek@2.x.x, hoek@6.x.x, hoek@~4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA== @@ -15568,13 +15564,6 @@ isbinaryfile@^4.0.8: resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.8.tgz#5d34b94865bd4946633ecc78a026fc76c5b11fcf" integrity sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w== -isemail@3.x.x: - version "3.2.0" - resolved "https://registry.yarnpkg.com/isemail/-/isemail-3.2.0.tgz#59310a021931a9fb06bbb51e155ce0b3f236832c" - integrity sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg== - dependencies: - punycode "2.x.x" - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -16214,15 +16203,6 @@ jest@^27.4.7: import-local "^3.0.2" jest-cli "^27.4.7" -joi@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/joi/-/joi-12.0.0.tgz#46f55e68f4d9628f01bbb695902c8b307ad8d33a" - integrity sha512-z0FNlV4NGgjQN1fdtHYXf5kmgludM65fG/JlXzU6+rwkt9U5UWuXVYnXa2FpK0u6+qBuCmrm5byPNuiiddAHvQ== - dependencies: - hoek "4.x.x" - isemail "3.x.x" - topo "2.x.x" - jpeg-js@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.3.tgz#6158e09f1983ad773813704be80680550eff977b" @@ -16376,17 +16356,12 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -json-api-serializer@^1.11.0: - version "1.15.1" - resolved "https://registry.yarnpkg.com/json-api-serializer/-/json-api-serializer-1.15.1.tgz#241ea66dfc5c629ae46d8315c6ee4232b81bb6b7" - integrity sha512-dp7d/TLWudViXADFnmdiq80krYZ+zA0WeB1771O1Is8HWdeySZofhp/TPWHCzgFPmGkgwI7oTEgjgZ6Dcxr/2w== +json-api-serializer@^2.6.0: + version "2.6.6" + resolved "https://registry.yarnpkg.com/json-api-serializer/-/json-api-serializer-2.6.6.tgz#fa5d283b913e0ea25653f4d04f981dc44d66dd4f" + integrity sha512-l7/e2O5/0+GU38RTMowRUKxRlT8zFc1oryAYBxqK54sFZnvJOJI2bo4XbbxnkTtvSzwkyv5DoBUuFm0hvG3avg== dependencies: - into-stream "^3.1.0" - joi "^12.0.0" - lodash "^4.5.1" - stream-to-array "^2.3.0" - through2 "^2.0.3" - unique-stream "^2.2.1" + setimmediate "^1.0.5" json-buffer@3.0.0: version "3.0.0" @@ -17317,7 +17292,7 @@ lodash.without@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= -lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.6.1, lodash@^4.7.0, lodash@~4.17.10: +lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.3.0, lodash@^4.6.1, lodash@^4.7.0, lodash@~4.17.10: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -20290,16 +20265,16 @@ punycode@1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@2.x.x, punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + pupa@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62" @@ -21906,7 +21881,7 @@ set-value@^2.0.0, set-value@^2.0.1, set-value@^4.0.1: is-plain-object "^2.0.4" is-primitive "^3.0.1" -setimmediate@^1.0.4: +setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= @@ -22530,13 +22505,6 @@ stream-shift@^1.0.0: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== -stream-to-array@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/stream-to-array/-/stream-to-array-2.3.0.tgz#bbf6b39f5f43ec30bc71babcb37557acecf34353" - integrity sha1-u/azn19D7DC8cbq8s3VXrOzzQ1M= - dependencies: - any-promise "^1.1.0" - strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" @@ -23277,15 +23245,7 @@ throttleit@0.0.2: resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf" integrity sha1-z+34jmDADdlpe2H90qg0OptoDq8= -through2-filter@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" - integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== - dependencies: - through2 "~2.0.0" - xtend "~4.0.0" - -through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: +through2@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -23466,13 +23426,6 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -topo@2.x.x: - version "2.0.2" - resolved "https://registry.yarnpkg.com/topo/-/topo-2.0.2.tgz#cd5615752539057c0dc0491a621c3bc6fbe1d182" - integrity sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI= - dependencies: - hoek "4.x.x" - tough-cookie@^4.0.0, tough-cookie@~2.2.0, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" @@ -23858,14 +23811,6 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" -unique-stream@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac" - integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== - dependencies: - json-stable-stringify-without-jsonify "^1.0.1" - through2-filter "^3.0.0" - unique-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" @@ -24863,7 +24808,7 @@ xmlhttprequest-ssl@^1.6.2: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz#03b713873b01659dfa2c1c5d056065b27ddc2de6" integrity sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q== -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== From aa623485034046735da4a4fedf9098054c4eda4c Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 22 Feb 2022 08:46:29 -0800 Subject: [PATCH 144/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Update=20babel-?= =?UTF-8?q?plugin-ember-modules-api-polyfill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/package.json | 2 +- yarn.lock | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/addons/rose/package.json b/addons/rose/package.json index 292c1f3ca..ae6e3c97e 100644 --- a/addons/rose/package.json +++ b/addons/rose/package.json @@ -59,7 +59,7 @@ "@storybook/theming": "^6.3.0", "babel-eslint": "^10.1.0", "babel-loader": "^8.2.2", - "babel-plugin-ember-modules-api-polyfill": "^2.12.0", + "babel-plugin-ember-modules-api-polyfill": "^3.5.0", "broccoli-asset-rev": "^3.0.0", "doctoc": "^2.0.1", "ember-auto-import": "^1.12.0", diff --git a/yarn.lock b/yarn.lock index 7c0982189..bd5f6d86f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6932,13 +6932,6 @@ babel-plugin-ember-data-packages-polyfill@^0.1.2: dependencies: "@ember-data/rfc395-data" "^0.0.4" -babel-plugin-ember-modules-api-polyfill@^2.12.0: - version "2.13.4" - resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.13.4.tgz#cf62bc9bfd808c48d810d5194f4329e9453bd603" - integrity sha512-uxQPkEQAzCYdwhZk16O9m1R4xtCRNy4oEUTBrccOPfzlIahRZJic/JeP/ZEL0BC6Mfq6r55eOg6gMF/zdFoCvA== - dependencies: - ember-rfc176-data "^0.3.13" - babel-plugin-ember-modules-api-polyfill@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-3.5.0.tgz#27b6087fac75661f779f32e60f94b14d0e9f6965" @@ -11475,7 +11468,7 @@ ember-resolver@^8.0.3: ember-cli-version-checker "^5.1.2" resolve "^1.20.0" -ember-rfc176-data@^0.3.13, ember-rfc176-data@^0.3.15, ember-rfc176-data@^0.3.17: +ember-rfc176-data@^0.3.15, ember-rfc176-data@^0.3.17: version "0.3.17" resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.17.tgz#d4fc6c33abd6ef7b3440c107a28e04417b49860a" integrity sha512-EVzTTKqxv9FZbEh6Ktw56YyWRAA0MijKvl7H8C06wVF+8f/cRRz3dXxa4nkwjzyVwx4rzKGuIGq77hxJAQhWWw== From ea9e286de4409def987c812f444d9c9927e40a4f Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 22 Feb 2022 09:31:20 -0800 Subject: [PATCH 145/148] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Update=20@ember/?= =?UTF-8?q?test-helpers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/package.json | 2 +- addons/auth/package.json | 2 +- addons/core/package.json | 2 +- addons/rose/package.json | 2 +- ui/admin/package.json | 2 +- ui/desktop/package.json | 2 +- yarn.lock | 8 ++++---- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/api/package.json b/addons/api/package.json index f92862d48..952aa0dac 100644 --- a/addons/api/package.json +++ b/addons/api/package.json @@ -36,7 +36,7 @@ "js-bexpr": "hashicorp/js-bexpr#9b4a4b54d85eba67fdfc0990133d1518d890b1e1", "@babel/core": "^7.16.5", "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", + "@ember/test-helpers": "^2.6.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", diff --git a/addons/auth/package.json b/addons/auth/package.json index 14e337b01..2562cea2c 100644 --- a/addons/auth/package.json +++ b/addons/auth/package.json @@ -28,7 +28,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", + "@ember/test-helpers": "^2.6.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", diff --git a/addons/core/package.json b/addons/core/package.json index 34d8a6e2b..48c92d29c 100644 --- a/addons/core/package.json +++ b/addons/core/package.json @@ -42,7 +42,7 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", + "@ember/test-helpers": "^2.6.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", diff --git a/addons/rose/package.json b/addons/rose/package.json index 292c1f3ca..a012f94a4 100644 --- a/addons/rose/package.json +++ b/addons/rose/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@babel/core": "^7.16.5", "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.4.2", + "@ember/test-helpers": "^2.6.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "@hashicorp/flight-icons": "^2.0.1", diff --git a/ui/admin/package.json b/ui/admin/package.json index 6d2ac1828..4836b581d 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -38,7 +38,7 @@ "@babel/core": "^7.16.5", "@ember/optional-features": "^2.0.0", "@ember/render-modifiers": "^2.0.2", - "@ember/test-helpers": "^2.4.2", + "@ember/test-helpers": "^2.6.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", diff --git a/ui/desktop/package.json b/ui/desktop/package.json index cca7db5a3..22260a301 100755 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -56,7 +56,7 @@ "@doyensec/electronegativity": "^1.9.1", "@ember/optional-features": "^2.0.0", "@ember/render-modifiers": "^2.0.2", - "@ember/test-helpers": "^2.4.2", + "@ember/test-helpers": "^2.6.0", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "@playwright/test": "^1.15.0", diff --git a/yarn.lock b/yarn.lock index 7c0982189..83bf194b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2943,10 +2943,10 @@ ember-cli-htmlbars "^5.7.1" ember-destroyable-polyfill "^2.0.3" -"@ember/test-helpers@^2.4.2": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@ember/test-helpers/-/test-helpers-2.4.2.tgz#e5be97e316dc502d7da933461135fbcb9254726e" - integrity sha512-++k/dXZ0IeOQLSm0Yu5QuCRe9UoptuckMhaXHY37VLb1varLHRuP8908kigVNt9c5waiocaK4jPjDBkKYRLlfA== +"@ember/test-helpers@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@ember/test-helpers/-/test-helpers-2.6.0.tgz#d687515c6ab49ba72717fc62046970ef4a72ea9c" + integrity sha512-N5sr3layWk60wB3maCy+/5hFHQRcTh8aqxcZTSs3Od9QkuHdWBtRgMGLP/35mXpJlgWuu3xqLpt6u3dGHc8gCg== dependencies: "@ember/test-waiters" "^3.0.0" broccoli-debug "^0.6.5" From 48bb575b8fde2dc36ea395a5b49db37ff8fe0ade Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 22 Feb 2022 09:45:14 -0800 Subject: [PATCH 146/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Update=20doctoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/package.json | 2 +- addons/auth/package.json | 2 +- addons/core/package.json | 2 +- addons/rose/package.json | 2 +- package.json | 2 +- ui/admin/package.json | 2 +- ui/desktop/package.json | 2 +- yarn.lock | 8 ++++---- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addons/api/package.json b/addons/api/package.json index f92862d48..676f79d22 100644 --- a/addons/api/package.json +++ b/addons/api/package.json @@ -41,7 +41,7 @@ "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "doctoc": "^2.0.1", + "doctoc": "^2.1.0", "ember-auto-import": "^1.12.0", "ember-cli": "~4.1.0", "ember-cli-dependency-checker": "^3.2.0", diff --git a/addons/auth/package.json b/addons/auth/package.json index 14e337b01..24801d3f2 100644 --- a/addons/auth/package.json +++ b/addons/auth/package.json @@ -34,7 +34,7 @@ "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", "core": "*", - "doctoc": "^2.0.1", + "doctoc": "^2.1.0", "ember-auto-import": "^1.12.0", "ember-cli": "~4.1.0", "ember-cli-dependency-checker": "^3.2.0", diff --git a/addons/core/package.json b/addons/core/package.json index 34d8a6e2b..4508190d5 100644 --- a/addons/core/package.json +++ b/addons/core/package.json @@ -47,7 +47,7 @@ "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", "broccoli-asset-rev": "^3.0.0", - "doctoc": "^2.0.1", + "doctoc": "^2.1.0", "ember-auto-import": "^1.12.0", "ember-cli": "~4.1.0", "ember-cli-dependency-checker": "^3.2.0", diff --git a/addons/rose/package.json b/addons/rose/package.json index 292c1f3ca..a272566f1 100644 --- a/addons/rose/package.json +++ b/addons/rose/package.json @@ -61,7 +61,7 @@ "babel-loader": "^8.2.2", "babel-plugin-ember-modules-api-polyfill": "^2.12.0", "broccoli-asset-rev": "^3.0.0", - "doctoc": "^2.0.1", + "doctoc": "^2.1.0", "ember-auto-import": "^1.12.0", "ember-cli": "~4.1.0", "ember-cli-dependency-checker": "^3.2.0", diff --git a/package.json b/package.json index eb0ba9c44..7b6148ae1 100755 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "cz-conventional-changelog": "^3.1.0", - "doctoc": "^2.0.1", + "doctoc": "^2.1.0", "git-cz": "^4.3.1", "license-checker": "^25.0.1" }, diff --git a/ui/admin/package.json b/ui/admin/package.json index 6d2ac1828..582f974ba 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -46,7 +46,7 @@ "broccoli-asset-rev": "^3.0.0", "clipboard": "^2.0.8", "core": "*", - "doctoc": "^2.0.1", + "doctoc": "^2.1.0", "ember-a11y-testing": "^4.2.0", "ember-auto-import": "^1.12.0", "ember-breadcrumbs": "^0.2.3", diff --git a/ui/desktop/package.json b/ui/desktop/package.json index cca7db5a3..31493554f 100755 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -67,7 +67,7 @@ "core": "*", "cross-env": "^7.0.3", "cross-os": "^1.4.0", - "doctoc": "^2.0.1", + "doctoc": "^2.1.0", "ember-a11y-testing": "^4.2.0", "ember-auto-import": "^1.12.0", "ember-autofocus-modifier": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 7c0982189..08968cdaf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10100,10 +10100,10 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -doctoc@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/doctoc/-/doctoc-2.0.1.tgz#d5aee2bce65a438ff8717d9e51df3d540caa3b78" - integrity sha512-JsxnSVZtLCThKehjFPBDhP1+ZLmdfXQynZH/0ABAwrnd1Zf3AV6LigC9oWJyaZ+c6RXCDnlGUNJ7I+1v8VaaRg== +doctoc@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctoc/-/doctoc-2.1.0.tgz#e7cbcd1f9e65519c295461423b2e7195d9e0d7ab" + integrity sha512-0darEVEuWKLyIlpGOzE5cILf/pgUu25qUs6YwCqLqfxb8+3b9Cl4iakA8vwYrBQOkJ5SwpHKEPVMu2KOMrTA7A== dependencies: "@textlint/markdown-to-ast" "~6.1.7" anchor-markdown-header "~0.5.7" From ab9581ea12f423288cabff7fb14f4b27697b7d82 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 22 Feb 2022 10:25:55 -0800 Subject: [PATCH 147/148] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Update=20ember-?= =?UTF-8?q?cli-htmlbars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/package.json | 2 +- addons/auth/package.json | 2 +- addons/core/package.json | 2 +- addons/rose/package.json | 2 +- ui/admin/package.json | 2 +- ui/desktop/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/api/package.json b/addons/api/package.json index f92862d48..bf4f8e38e 100644 --- a/addons/api/package.json +++ b/addons/api/package.json @@ -26,7 +26,7 @@ "dependencies": { "ember-can": "^3.1.0", "ember-cli-babel": "^7.26.8", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^6.0.1", "ember-cli-mirage": "^2.2.0", "ember-data": "^3.20.0", "ember-data-model-fragments": "5.0.0-beta.2", diff --git a/addons/auth/package.json b/addons/auth/package.json index 14e337b01..108e76a38 100644 --- a/addons/auth/package.json +++ b/addons/auth/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "ember-cli-babel": "^7.26.8", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^6.0.1", "ember-fetch": "^8.1.1", "ember-simple-auth": "^4.0.0" }, diff --git a/addons/core/package.json b/addons/core/package.json index 34d8a6e2b..2544c31d8 100644 --- a/addons/core/package.json +++ b/addons/core/package.json @@ -32,7 +32,7 @@ "auth": "*", "ember-browser-services": "^2.0.0", "ember-cli-babel": "^7.26.8", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^6.0.1", "ember-feature-flags": "^6.0.0", "ember-intl": "^5.7.0", "ember-loading": "^2.0.0", diff --git a/addons/rose/package.json b/addons/rose/package.json index 292c1f3ca..0aff38444 100644 --- a/addons/rose/package.json +++ b/addons/rose/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "ember-cli-babel": "^7.26.8", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^6.0.1", "ember-composable-helpers": "^4.5.0", "ember-focus-trap": "^0.7.0", "ember-named-blocks-polyfill": "^0.2.4", diff --git a/ui/admin/package.json b/ui/admin/package.json index 6d2ac1828..1eb37233f 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -56,7 +56,7 @@ "ember-cli-code-coverage": "^1.0.3", "ember-cli-content-security-policy": "^1.1.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^6.0.1", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sass": "^10.0.1", "ember-cli-sri": "^2.1.1", diff --git a/ui/desktop/package.json b/ui/desktop/package.json index cca7db5a3..9c036328c 100755 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -76,7 +76,7 @@ "ember-cli-babel": "^7.26.8", "ember-cli-code-coverage": "^1.0.3", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", + "ember-cli-htmlbars": "^6.0.1", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sass": "^10.0.1", "ember-cli-sri": "^2.1.1", From 6bd70237765c400b6b335a7d04cb5c655c21a1a0 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 22 Feb 2022 14:21:28 -0800 Subject: [PATCH 148/148] =?UTF-8?q?Revert=20"chore:=20=F0=9F=A4=96=20Updat?= =?UTF-8?q?e=20ember-cli-htmlbars"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/package.json | 2 +- addons/auth/package.json | 2 +- addons/core/package.json | 2 +- addons/rose/package.json | 2 +- ui/admin/package.json | 2 +- ui/desktop/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/api/package.json b/addons/api/package.json index bf4f8e38e..f92862d48 100644 --- a/addons/api/package.json +++ b/addons/api/package.json @@ -26,7 +26,7 @@ "dependencies": { "ember-can": "^3.1.0", "ember-cli-babel": "^7.26.8", - "ember-cli-htmlbars": "^6.0.1", + "ember-cli-htmlbars": "^5.7.1", "ember-cli-mirage": "^2.2.0", "ember-data": "^3.20.0", "ember-data-model-fragments": "5.0.0-beta.2", diff --git a/addons/auth/package.json b/addons/auth/package.json index 108e76a38..14e337b01 100644 --- a/addons/auth/package.json +++ b/addons/auth/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "ember-cli-babel": "^7.26.8", - "ember-cli-htmlbars": "^6.0.1", + "ember-cli-htmlbars": "^5.7.1", "ember-fetch": "^8.1.1", "ember-simple-auth": "^4.0.0" }, diff --git a/addons/core/package.json b/addons/core/package.json index 2544c31d8..34d8a6e2b 100644 --- a/addons/core/package.json +++ b/addons/core/package.json @@ -32,7 +32,7 @@ "auth": "*", "ember-browser-services": "^2.0.0", "ember-cli-babel": "^7.26.8", - "ember-cli-htmlbars": "^6.0.1", + "ember-cli-htmlbars": "^5.7.1", "ember-feature-flags": "^6.0.0", "ember-intl": "^5.7.0", "ember-loading": "^2.0.0", diff --git a/addons/rose/package.json b/addons/rose/package.json index 4dbfdd404..8409863f0 100644 --- a/addons/rose/package.json +++ b/addons/rose/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "ember-cli-babel": "^7.26.8", - "ember-cli-htmlbars": "^6.0.1", + "ember-cli-htmlbars": "^5.7.1", "ember-composable-helpers": "^4.5.0", "ember-focus-trap": "^0.7.0", "ember-named-blocks-polyfill": "^0.2.4", diff --git a/ui/admin/package.json b/ui/admin/package.json index 1eb37233f..6d2ac1828 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -56,7 +56,7 @@ "ember-cli-code-coverage": "^1.0.3", "ember-cli-content-security-policy": "^1.1.1", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^6.0.1", + "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sass": "^10.0.1", "ember-cli-sri": "^2.1.1", diff --git a/ui/desktop/package.json b/ui/desktop/package.json index 9c036328c..cca7db5a3 100755 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -76,7 +76,7 @@ "ember-cli-babel": "^7.26.8", "ember-cli-code-coverage": "^1.0.3", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^6.0.1", + "ember-cli-htmlbars": "^5.7.1", "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sass": "^10.0.1", "ember-cli-sri": "^2.1.1",