From 4c32cee46697ecf5feee70157c32d88ec4a9a9ef Mon Sep 17 00:00:00 2001 From: dharini Date: Tue, 8 Feb 2022 12:30:14 -0800 Subject: [PATCH] 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}} +