diff --git a/ui/core/app/components/form/target/add-host-sets/index.hbs b/ui/core/app/components/form/target/add-host-sets/index.hbs index 5ad080dee..fa02412bb 100644 --- a/ui/core/app/components/form/target/add-host-sets/index.hbs +++ b/ui/core/app/components/form/target/add-host-sets/index.hbs @@ -1,44 +1,60 @@ - +{{#if this.hasAvailableHostSets}} + - + - - - - {{t 'form.id.label'}} - {{t 'form.name.label'}} - {{t 'form.type.label'}} - {{t 'resources.host-catalog.title_plural'}} - - - - {{#each this.filteredHostSets as |hostSet|}} - - - - - {{hostSet.name}} - - {{hostSet.type}} - - - {{hostSet.host_catalog_id}} - - - {{/each}} - - + + + + {{t 'form.id.label'}} + {{t 'form.name.label'}} + {{t 'form.type.label'}} + {{t 'resources.host-catalog.title_plural'}} + + + + {{#each this.filteredHostSets as |hostSet|}} + + + + + {{hostSet.name}} + + {{t (concat 'resources.host-set.types.' hostSet.type)}} + + + {{hostSet.host_catalog_id}} + + + {{/each}} + + - + +{{/if}} + +{{#unless this.hasAvailableHostSets}} + + + + {{t "resources.target.host-set.messages.none.description"}} + + + + {{t "actions.back"}} + + + +{{/unless}} \ No newline at end of file diff --git a/ui/core/app/components/form/target/add-host-sets/index.js b/ui/core/app/components/form/target/add-host-sets/index.js index 317ac2ba6..c65b7a620 100644 --- a/ui/core/app/components/form/target/add-host-sets/index.js +++ b/ui/core/app/components/form/target/add-host-sets/index.js @@ -11,6 +11,16 @@ export default class FormTargetAddHostSetsComponent extends Component { */ selectedHostSetIDs = A(); + /** + * Checks for unassigned hostsets. + * @param {[HostSetModel]} filteredHostSets + * @type {boolean} + */ + @computed('filteredHostSets') + get hasAvailableHostSets() { + return this.filteredHostSets.length > 0; + } + /** * Host sets not already added to the target. * @type {[HostSetModel]} diff --git a/ui/core/app/components/form/target/index.hbs b/ui/core/app/components/form/target/index.hbs index f061923bf..c1a4bebf6 100644 --- a/ui/core/app/components/form/target/index.hbs +++ b/ui/core/app/components/form/target/index.hbs @@ -7,7 +7,7 @@ > diff --git a/ui/core/app/controllers/scopes/scope/projects/project/targets.js b/ui/core/app/controllers/scopes/scope/projects/project/targets.js index 5d11f3566..9c51e3de1 100644 --- a/ui/core/app/controllers/scopes/scope/projects/project/targets.js +++ b/ui/core/app/controllers/scopes/scope/projects/project/targets.js @@ -13,6 +13,6 @@ export default class ScopesScopeProjectsProjectTargetsController extends Control * @type {string} */ get breadCrumb() { - return this.intl.t('resources.targets'); + return this.intl.t('resources.target.title_plural'); } } diff --git a/ui/core/app/controllers/scopes/scope/projects/project/targets/target/add-host-sets.js b/ui/core/app/controllers/scopes/scope/projects/project/targets/target/add-host-sets.js index db7181061..8a4cb606e 100644 --- a/ui/core/app/controllers/scopes/scope/projects/project/targets/target/add-host-sets.js +++ b/ui/core/app/controllers/scopes/scope/projects/project/targets/target/add-host-sets.js @@ -12,6 +12,6 @@ export default class ScopesScopeProjectsProjectTargetsTargetAddHostSetsControlle * @type {string} */ get breadCrumb() { - return this.intl.t('actions.add-host-sets'); + return this.intl.t('resources.target.actions.add-host-sets'); } } diff --git a/ui/core/app/controllers/scopes/scope/projects/project/targets/target/host-sets.js b/ui/core/app/controllers/scopes/scope/projects/project/targets/target/host-sets.js index 92d1dfc1f..92a90208b 100644 --- a/ui/core/app/controllers/scopes/scope/projects/project/targets/target/host-sets.js +++ b/ui/core/app/controllers/scopes/scope/projects/project/targets/target/host-sets.js @@ -13,6 +13,6 @@ export default class ScopesScopeProjectsProjectTargetsTargetHostSetsController e * @type {string} */ get breadCrumb() { - return this.intl.t('resources.host-sets'); + return this.intl.t('resources.host-set.title_plural'); } } diff --git a/ui/core/app/templates/scopes/scope/projects/project/_sidebar.hbs b/ui/core/app/templates/scopes/scope/projects/project/_sidebar.hbs index 30441e047..b9d440b7c 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/_sidebar.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/_sidebar.hbs @@ -3,7 +3,7 @@ {{t "resources.session.title_plural"}} - {{t "resources.targets"}} + {{t "resources.target.title_plural"}} {{t "resources.host-catalog.title_plural"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets.hbs index 744cee2b2..8b5774916 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets.hbs @@ -1,3 +1,3 @@ -{{title (t "resources.targets")}} +{{title (t "resources.target.title_plural")}} {{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs index 987d342d1..d6e45da25 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs @@ -5,8 +5,10 @@ -

{{t "resources.targets"}}

-

{{t "resources.descriptions.targets"}}

+

{{t "resources.target.title_plural"}}

+ {{#if @model}} +

{{t "resources.target.description"}}

+ {{/if}}
@@ -44,7 +46,7 @@ {{#if target.type}} - {{t (concat "target.types." target.type)}} + {{t (concat "resources.target.types." target.type)}} {{/if}} @@ -59,9 +61,9 @@ {{else}} - + - {{t "descriptions.targets-welcome"}} + {{t "resources.target.description"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-actions.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-actions.hbs index 4e62a8047..40c0949d0 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-actions.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-actions.hbs @@ -1,12 +1,12 @@ - {{t 'actions.add-host-sets'}} + {{t 'resources.target.actions.add-host-sets'}} - {{t 'actions.delete-target'}} + {{t 'resources.target.actions.delete'}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs index 0dc39d88d..5de87dc3d 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs @@ -1,2 +1,2 @@ -

{{t "resources.target"}}

-

{{t "resources.descriptions.target"}}

+

{{t "resources.target.title"}}

+

{{t "resources.target.description"}}

diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-navigation.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-navigation.hbs index b486f4ca8..a31f1590c 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-navigation.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-navigation.hbs @@ -3,6 +3,6 @@ {{t 'titles.details'}}
- {{t 'titles.host-sets'}} + {{t 'resources.host-set.title_plural'}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets.hbs index e487f20f6..15daf752a 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets.hbs @@ -1,4 +1,4 @@ -{{title (t 'actions.add-host-sets')}} +{{title (t 'resources.target.actions.add-host-sets')}} {{#if @model.hostSets}} - + - {{t "descriptions.no-host-sets-for-target"}} + {{t "resources.target.host-set.messages.none.description"}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets/-header.hbs index f29bc39c7..794392a62 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets/-header.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/target/add-host-sets/-header.hbs @@ -1 +1,2 @@ -

{{t "actions.add-host-sets"}}

+

{{t "resources.target.host-set.messages.add.title"}}

+

{{t "resources.target.host-set.messages.add.description"}}

\ No newline at end of file diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs index acdad4643..827793ccd 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/target/host-sets.hbs @@ -1,4 +1,4 @@ -{{title (t "resources.host-sets")}} +{{title (t "resources.host-set.title_plural")}} {{#if @model.hostSets}} @@ -19,7 +19,7 @@

{{hostSet.model.description}}

- {{hostSet.model.type}} + {{t (concat 'resources.host-set.types.' hostSet.model.type)}} {{hostSet.model.id}} @@ -48,9 +48,9 @@ {{else}} - + - {{t "descriptions.target-host-sets-welcome"}} + {{t "resources.target.host-set.messages.welcome.description"}} diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index f7f1be5d6..a7957c064 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -5,9 +5,6 @@ auth: no-scopes: No scopes were found. To authenticate, ask your administrator to create an scope and grant you access. choose-org: Choose a scope to authenticate. authenticating-with-org: "You're authenticating with {name}." -target: - types: - tcp: TCP titles: iam: IAM new: New @@ -17,16 +14,7 @@ titles: overview: Overview settings: Settings empty-set: No Items Yet - targets-welcome: Create your first Target - target-host-sets-welcome: No Host Sets Associated - targets: Targets global: Global - no-host-sets-for-target: No Host Sets Available - no-available-users: No Users Available actions: Actions descriptions: - empty-set: There are no items to display yet. You may be able to add items or try back later. - targets-welcome: Targets provide Users the means to connect to and interact networked services. A Target contains a collection of Hosts and a collection of Credentials. - target-host-sets-welcome: Add Host Sets to this target to provide access. - no-host-sets-for-target: No host sets are available to add to this target. - no-available-users: No users are available to add to this group. + empty-set: There are no items to display yet. You may be able to add items or try back later. \ No newline at end of file diff --git a/ui/core/translations/resources/en-us.yaml b/ui/core/translations/resources/en-us.yaml index 87ad8d7a7..2632275f4 100644 --- a/ui/core/translations/resources/en-us.yaml +++ b/ui/core/translations/resources/en-us.yaml @@ -152,8 +152,27 @@ role: description: Grants are permissions which allow roles to take actions and access resources actions: create: New Grant -target: Target -targets: Targets -descriptions: - target: Target is abstract. A Target is deleted when the Scope it belongs to is deleted. - targets: A target is a networked service a User can connect to and interact with through Boundary. A Target does not directly contain any secrets. A Target contains a collection of Hosts. A Target belongs to one and only one Scope. A Target can contain zero or more Host Sets. The lifecycle of a Target is not tied to the lifecycle of any Host Set. +target: + title: Target + title_plural: Targets + description: A target is a logical collection of host sets which may be used to initiate sessions. + messages: + welcome: + title: Welcome to Targets + actions: + create: New Target + delete: Delete Target + add-host-sets: Add Host Sets + types: + tcp: TCP + host-set: + messages: + welcome: + title: Welcome to Host Sets + description: No hosts sets in this target. + none: + title: No Host Sets Available + description: No hosts sets available to add to target. + add: + title: Add Host Sets + description: Select host sets to assign to this target. \ No newline at end of file