diff --git a/ui/admin/app/templates/scopes/scope/targets/target/-actions.hbs b/ui/admin/app/components/targets/target/actions/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/targets/target/-actions.hbs rename to ui/admin/app/components/targets/target/actions/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/targets/target/-header.hbs b/ui/admin/app/components/targets/target/header/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/targets/target/-header.hbs rename to ui/admin/app/components/targets/target/header/index.hbs diff --git a/ui/admin/app/templates/scopes/scope/targets/target/-navigation.hbs b/ui/admin/app/components/targets/target/nav/index.hbs similarity index 100% rename from ui/admin/app/templates/scopes/scope/targets/target/-navigation.hbs rename to ui/admin/app/components/targets/target/nav/index.hbs diff --git a/ui/admin/app/controllers/scopes/scope/targets/target/add-credential-sources.js b/ui/admin/app/controllers/scopes/scope/targets/target/add-credential-sources.js new file mode 100644 index 000000000..9bda83b4f --- /dev/null +++ b/ui/admin/app/controllers/scopes/scope/targets/target/add-credential-sources.js @@ -0,0 +1,18 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class ScopesScopeTargetsTargetAddCredentialSourcesController extends Controller { + // =services + + @service intl; + + // =attributes + + /** + * Translated roles breadcrumb + * @type {string} + */ + get breadCrumb() { + return this.intl.t('resources.target.actions.add-credential-sources'); + } +} diff --git a/ui/admin/app/routes/scopes/scope/targets/target.js b/ui/admin/app/routes/scopes/scope/targets/target.js index 4702bb059..e8f81e451 100644 --- a/ui/admin/app/routes/scopes/scope/targets/target.js +++ b/ui/admin/app/routes/scopes/scope/targets/target.js @@ -12,28 +12,4 @@ export default class ScopesScopeTargetsTargetRoute extends Route { async model({ target_id }) { return this.store.findRecord('target', target_id, { reload: true }); } - - /** - * Renders the target-specific templates for header, navigation, - * and actions page sections. - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render('scopes/scope/targets/target/-header', { - into: 'scopes/scope/targets/target', - outlet: 'header', - }); - - this.render('scopes/scope/targets/target/-navigation', { - into: 'scopes/scope/targets/target', - outlet: 'navigation', - }); - - this.render('scopes/scope/targets/target/-actions', { - into: 'scopes/scope/targets/target', - outlet: 'actions', - }); - } } diff --git a/ui/admin/app/routes/scopes/scope/targets/target/add-credential-sources.js b/ui/admin/app/routes/scopes/scope/targets/target/add-credential-sources.js index ed884719e..59a5a6e4a 100644 --- a/ui/admin/app/routes/scopes/scope/targets/target/add-credential-sources.js +++ b/ui/admin/app/routes/scopes/scope/targets/target/add-credential-sources.js @@ -43,29 +43,6 @@ export default class ScopesScopeTargetsTargetAddCredentialSourcesRoute extends R }; } - /** - * Renders credential libraries specific header template. - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render('scopes/scope/targets/target/add-credential-sources/-header', { - into: 'scopes/scope/targets/target', - outlet: 'header', - }); - - this.render('-empty', { - into: 'scopes/scope/targets/target', - outlet: 'navigation', - }); - - this.render('-empty', { - into: 'scopes/scope/targets/target', - outlet: 'actions', - }); - } - // =actions /** diff --git a/ui/admin/app/routes/scopes/scope/targets/target/add-host-sources.js b/ui/admin/app/routes/scopes/scope/targets/target/add-host-sources.js index 4a2987bb5..e6ac82e32 100644 --- a/ui/admin/app/routes/scopes/scope/targets/target/add-host-sources.js +++ b/ui/admin/app/routes/scopes/scope/targets/target/add-host-sources.js @@ -42,29 +42,6 @@ export default class ScopesScopeTargetsTargetAddHostSourcesRoute extends Route { }; } - /** - * Renders the add-host-sources-specific header template. - * @override - */ - renderTemplate() { - super.renderTemplate(...arguments); - - this.render('scopes/scope/targets/target/add-host-sources/-header', { - into: 'scopes/scope/targets/target', - outlet: 'header', - }); - - this.render('-empty', { - into: 'scopes/scope/targets/target', - outlet: 'navigation', - }); - - this.render('-empty', { - into: 'scopes/scope/targets/target', - outlet: 'actions', - }); - } - // =actions @action diff --git a/ui/admin/app/templates/scopes/scope/targets/target.hbs b/ui/admin/app/templates/scopes/scope/targets/target.hbs index 837d1f984..7d32ecb0d 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target.hbs @@ -1,25 +1,3 @@ {{page-title @model.displayName}} - - - - - - - - {{outlet 'header'}} - - - - {{outlet 'navigation'}} - - - - {{outlet 'actions'}} - - - - {{outlet}} - - - \ No newline at end of file +{{outlet}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources.hbs index cc0992c50..90d3bdcc5 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources.hbs @@ -1,27 +1,44 @@ {{page-title (t 'resources.target.actions.add-credential-sources')}} -{{#if @model.credentialLibraries}} - -{{/if}} + -{{#unless @model.credentialLibraries}} - - - - {{t 'resources.target.credential-source.messages.none.description'}} - - - - {{t 'actions.back'}} - - - -{{/unless}} \ No newline at end of file + + + + + +

+ {{t 'resources.target.credential-source.messages.add.title'}} +

+

{{t 'resources.target.credential-source.messages.add.description'}}

+
+ + + {{#if @model.credentialLibraries}} + + {{/if}} + + {{#unless @model.credentialLibraries}} + + + + {{t 'resources.target.credential-source.messages.none.description'}} + + + + {{t 'actions.back'}} + + + + {{/unless}} + + +
\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources/-header.hbs b/ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources/-header.hbs deleted file mode 100644 index 699536650..000000000 --- a/ui/admin/app/templates/scopes/scope/targets/target/add-credential-sources/-header.hbs +++ /dev/null @@ -1,4 +0,0 @@ -

- {{t 'resources.target.credential-source.messages.add.title'}} -

-

{{t 'resources.target.credential-source.messages.add.description'}}

\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/targets/target/add-host-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/add-host-sources.hbs index f846930c6..a9ff15c12 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/add-host-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/add-host-sources.hbs @@ -1,28 +1,46 @@ {{page-title (t 'resources.target.actions.add-host-sources')}} -{{#if @model.hostSets}} - -{{/if}} + -{{#unless @model.hostSets}} - - - - {{t 'resources.target.host-source.messages.none.description'}} - - - - {{t 'actions.back'}} - - - -{{/unless}} \ No newline at end of file + + + + + +

+ {{t 'resources.target.host-source.messages.add.title'}} + +

+

{{t 'resources.target.host-source.messages.add.description'}}

+
+ + + {{#if @model.hostSets}} + + {{/if}} + + {{#unless @model.hostSets}} + + + + {{t 'resources.target.host-source.messages.none.description'}} + + + + {{t 'actions.back'}} + + + + {{/unless}} + + +
\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/targets/target/add-host-sources/-header.hbs b/ui/admin/app/templates/scopes/scope/targets/target/add-host-sources/-header.hbs deleted file mode 100644 index abbb353fa..000000000 --- a/ui/admin/app/templates/scopes/scope/targets/target/add-host-sources/-header.hbs +++ /dev/null @@ -1,5 +0,0 @@ -

- {{t 'resources.target.host-source.messages.add.title'}} - -

-

{{t 'resources.target.host-source.messages.add.description'}}

\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/targets/target/credential-sources.hbs b/ui/admin/app/templates/scopes/scope/targets/target/credential-sources.hbs index c1c06cfef..31abd9a7d 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/credential-sources.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/credential-sources.hbs @@ -1,91 +1,120 @@ {{page-title (t 'resources.target.credential-source.title_plural')}} -{{#if @model.credentialLibraries}} + - - - - {{t 'form.name.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - {{t 'titles.actions'}} - - - - {{#each @model.credentialLibraries as |credentialLibrary|}} - - - - {{credentialLibrary.displayName}} - -

{{credentialLibrary.description}}

-
- - {{t - (concat - 'resources.credential-library.types.' credentialLibrary.type - ) - }} - - - - {{credentialLibrary.id}} - - - - {{#if (can 'removeCredentialSources target' @model)}} - - + + + + + + + + + + + + + + + + + {{#if @model.credentialLibraries}} + + + + + {{t 'form.name.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} + {{t 'titles.actions'}} + + + + {{#each @model.credentialLibraries as |credentialLibrary|}} + + + - {{t 'actions.remove'}} - - - {{/if}} - -
- {{/each}} -
-
+ {{credentialLibrary.displayName}} + +

{{credentialLibrary.description}}

+ + + {{t + (concat + 'resources.credential-library.types.' + credentialLibrary.type + ) + }} + + + + {{credentialLibrary.id}} + + + + {{#if (can 'removeCredentialSources target' @model)}} + + + {{t 'actions.remove'}} + + + {{/if}} + + + {{/each}} + + -{{else}} + {{else}} - - - - {{t 'resources.target.credential-source.messages.welcome.description'}} - - - - {{t 'resources.target.actions.add-credential-sources'}} - - - + + + + {{t + 'resources.target.credential-source.messages.welcome.description' + }} + + + + {{t 'resources.target.actions.add-credential-sources'}} + + + -{{/if}} \ No newline at end of file + {{/if}} + + +
\ No newline at end of file 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 00e74bd55..9a7c0ce5b 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 @@ -1,79 +1,101 @@ {{page-title (t 'resources.target.host-source.title_plural')}} -{{#if @model.hostSets}} + - - - - {{t 'form.name.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - {{t 'titles.actions'}} - - - - {{#each @model.hostSets as |hostSet|}} - - - {{hostSet.model.displayName}} -

{{hostSet.model.description}}

-
- - {{t - (concat 'resources.host-set.types.' hostSet.model.type) - }} - - - - {{hostSet.model.id}} - - - - {{#if (can 'removeHostSources target' @model)}} - - + + + + + + + + + + + + + + + + + {{#if @model.hostSets}} + + + + + {{t 'form.name.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} + {{t 'titles.actions'}} + + + + {{#each @model.hostSets as |hostSet|}} + + + {{hostSet.model.displayName}} +

{{hostSet.model.description}}

+
+ + {{t + (concat 'resources.host-set.types.' hostSet.model.type) + }} + + + - {{t 'actions.remove'}} -
-
- {{/if}} -
-
- {{/each}} -
-
+ {{hostSet.model.id}} + + + + {{#if (can 'removeHostSources target' @model)}} + + + {{t 'actions.remove'}} + + + {{/if}} + + + {{/each}} + + -{{else}} + {{else}} - - - - {{t 'resources.target.host-source.messages.welcome.description'}} - - - - {{t 'resources.target.actions.add-host-sources'}} - - - + + + + {{t 'resources.target.host-source.messages.welcome.description'}} + + + + {{t 'resources.target.actions.add-host-sources'}} + + + -{{/if}} \ No newline at end of file + {{/if}} + + +
\ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/targets/target/index.hbs b/ui/admin/app/templates/scopes/scope/targets/target/index.hbs index ae63ba2b2..164acd745 100644 --- a/ui/admin/app/templates/scopes/scope/targets/target/index.hbs +++ b/ui/admin/app/templates/scopes/scope/targets/target/index.hbs @@ -1,5 +1,27 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file