diff --git a/ui/admin/app/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host.js b/ui/admin/app/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host.js new file mode 100644 index 000000000..97ce819cc --- /dev/null +++ b/ui/admin/app/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host.js @@ -0,0 +1,13 @@ +import Controller from '@ember/controller'; + +export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetHostsHostController extends Controller { + // =attributes + + /** + * A role breadcrumb + * @type {string} + */ + get breadCrumb() { + return this.model.displayName; + } +} diff --git a/ui/admin/app/router.js b/ui/admin/app/router.js index ef557fbc8..75ce77c2c 100644 --- a/ui/admin/app/router.js +++ b/ui/admin/app/router.js @@ -91,7 +91,9 @@ Router.map(function () { this.route('host-sets', function () { this.route('new'); this.route('host-set', { path: ':host_set_id' }, function () { - this.route('hosts'); + this.route('hosts', function () { + this.route('host', { path: ':host_id' }, function () {}); + }); this.route('add-hosts'); this.route('create-and-add-host'); }); diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host.js new file mode 100644 index 000000000..3773e93c5 --- /dev/null +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetHostsHostRoute extends Route {} diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index.js new file mode 100644 index 000000000..873e01b71 --- /dev/null +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetHostsHostIndexRoute extends Route {} diff --git a/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.js b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.js new file mode 100644 index 000000000..30f72878b --- /dev/null +++ b/ui/admin/app/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeHostCatalogsHostCatalogHostSetsHostSetHostsIndexRoute extends Route {} 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 21d06fcb9..c78470ec0 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,83 +1,3 @@ {{page-title (t 'resources.host.title_plural')}} -{{#if @model.hosts}} - - - - - {{t 'form.name.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - {{#if @model.isStatic}} - {{t 'titles.actions'}} - {{/if}} - - - - {{#each @model.hosts as |host|}} - - - - {{host.displayName}} - -

{{host.description}}

-
- - - - - - {{host.id}} - - - - {{#if (can 'removeHosts hostSet' @model.hostSet)}} - - - {{t 'actions.remove'}} - - - {{/if}} - -
- {{/each}} -
-
- -{{/if}} - -{{#unless @model.hosts}} - - - - {{t 'resources.host-set.host.messages.none.description'}} - - {{!-- - - - {{t "resources.host-set.actions.create-and-add-host"}} - - --}} - - -{{/unless}} \ No newline at end of file +{{outlet}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host.hbs new file mode 100644 index 000000000..7d32ecb0d --- /dev/null +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host.hbs @@ -0,0 +1,3 @@ +{{page-title @model.displayName}} + +{{outlet}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index.hbs new file mode 100644 index 000000000..2a0249dfa --- /dev/null +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index.hbs @@ -0,0 +1,9 @@ + + +{{!-- + +--}} \ No newline at end of file diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.hbs new file mode 100644 index 000000000..3d1189b2e --- /dev/null +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.hbs @@ -0,0 +1,91 @@ +{{#if @model.hosts}} + + + + + {{t 'form.name.label'}} + {{t 'form.type.label'}} + {{t 'form.id.label'}} + {{#if @model.isStatic}} + {{t 'titles.actions'}} + {{/if}} + + + + {{#each @model.hosts as |host|}} + + + {{#if host.isStatic}} + + {{host.displayName}} + + {{else}} + {{! Link to a different subroute for dynamic/plugin hosts }} + + {{host.displayName}} + + {{/if}} +

{{host.description}}

+
+ + + + + + {{host.id}} + + + + {{#if (can 'removeHosts hostSet' @model.hostSet)}} + + + {{t 'actions.remove'}} + + + {{/if}} + +
+ {{/each}} +
+
+ +{{/if}} + +{{#unless @model.hosts}} + + + + {{t 'resources.host-set.host.messages.none.description'}} + + {{!-- + + + {{t "resources.host-set.actions.create-and-add-host"}} + + --}} + + +{{/unless}} \ No newline at end of file diff --git a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host-test.js b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host-test.js new file mode 100644 index 000000000..7779bde77 --- /dev/null +++ b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host-test.js @@ -0,0 +1,17 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module( + 'Unit | Controller | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host', + 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/host-catalog/host-sets/host-set/hosts/host' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/admin/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host-test.js b/ui/admin/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host-test.js new file mode 100644 index 000000000..6fc01e757 --- /dev/null +++ b/ui/admin/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host-test.js @@ -0,0 +1,16 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host', + function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host' + ); + assert.ok(route); + }); + } +); diff --git a/ui/admin/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index-test.js b/ui/admin/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index-test.js new file mode 100644 index 000000000..94e8acb8f --- /dev/null +++ b/ui/admin/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index-test.js @@ -0,0 +1,16 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index', + function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/host/index' + ); + assert.ok(route); + }); + } +); diff --git a/ui/admin/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index-test.js b/ui/admin/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index-test.js new file mode 100644 index 000000000..53eabbeab --- /dev/null +++ b/ui/admin/tests/unit/routes/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index-test.js @@ -0,0 +1,16 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module( + 'Unit | Route | scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index', + function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup( + 'route:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index' + ); + assert.ok(route); + }); + } +);