From 361bdf02a4869f82f0eb0817df5d37e0f4ba7f55 Mon Sep 17 00:00:00 2001 From: dharini Date: Sun, 13 Feb 2022 22:42:34 -0800 Subject: [PATCH 1/7] 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 9ccae001d3a24b7a0acf896b04d82e429560eefa Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 10:20:00 -0800 Subject: [PATCH 2/7] =?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 3/7] 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 ea5ab02d7008f07214338ae24ad95236c80717d2 Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Mon, 14 Feb 2022 12:39:48 -0800 Subject: [PATCH 4/7] 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 5/7] 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 6/7] 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 4438a6719ff511fa73f0a0d8de4ce3672f476a76 Mon Sep 17 00:00:00 2001 From: dharini Date: Mon, 14 Feb 2022 13:55:34 -0800 Subject: [PATCH 7/7] =?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 @@ - +