From 6c2694999c921eb46b64c7e5ddd6043302e17a57 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Mon, 6 Dec 2021 15:00:48 -0800 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Host=20catalogs=20?= =?UTF-8?q?only=20supports=20host=20type=20static?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Host Catalogs will just show the hosts with type: static --- addons/api/addon/models/host-catalog.js | 9 ++- .../tests/unit/models/host-catalog-test.js | 10 +++ .../scopes/scope/host-catalogs/index.hbs | 62 ++++++++++--------- 3 files changed, 50 insertions(+), 31 deletions(-) diff --git a/addons/api/addon/models/host-catalog.js b/addons/api/addon/models/host-catalog.js index 894ee9cf1..f9ae96493 100644 --- a/addons/api/addon/models/host-catalog.js +++ b/addons/api/addon/models/host-catalog.js @@ -1,3 +1,10 @@ import GeneratedHostCatalogModel from '../generated/models/host-catalog'; -export default class HostCatalogModel extends GeneratedHostCatalogModel {} +export default class HostCatalogModel extends GeneratedHostCatalogModel { + /** + * @type {boolean} + */ + get isStatic() { + return this.type === 'static'; + } +} diff --git a/addons/api/tests/unit/models/host-catalog-test.js b/addons/api/tests/unit/models/host-catalog-test.js index e35a07be7..48b21051d 100644 --- a/addons/api/tests/unit/models/host-catalog-test.js +++ b/addons/api/tests/unit/models/host-catalog-test.js @@ -9,4 +9,14 @@ module('Unit | Model | host catalog', function (hooks) { let model = store.createRecord('host-catalog', {}); assert.ok(model); }); + + test('it has isStatic function and returns the expected values', async function (assert) { + assert.expect(3); + const store = this.owner.lookup('service:store'); + const modelA = store.createRecord('host-catalog', { type: 'static' }); + const modelB = store.createRecord('host-catalog', { type: 'plugin' }); + assert.equal(typeof modelA.isStatic, 'boolean'); + assert.true(modelA.isStatic); + assert.false(modelB.isStatic); + }); }); diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/index.hbs index 94eb61309..b3900063f 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/index.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/index.hbs @@ -41,37 +41,39 @@ {{#each @model as |hostCatalog|}} - - - {{#if (can 'read model' hostCatalog)}} - + {{#if hostCatalog.isStatic}} + + + {{#if (can 'read model' hostCatalog)}} + + {{hostCatalog.displayName}} + + {{else}} {{hostCatalog.displayName}} - - {{else}} - {{hostCatalog.displayName}} - {{/if}} -

{{hostCatalog.description}}

-
- - - {{t - (concat 'resources.host-catalog.types.' hostCatalog.type) - }} - - - - - {{hostCatalog.id}} - - -
+ {{/if}} +

{{hostCatalog.description}}

+ + + + {{t + (concat 'resources.host-catalog.types.' hostCatalog.type) + }} + + + + + {{hostCatalog.id}} + + + + {{/if}} {{/each}}
From c8b49beba67ebf1789e9b6bed507bf5cfdb6e6b8 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 7 Dec 2021 16:24:55 -0800 Subject: [PATCH 02/10] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Host=20list=20in?= =?UTF-8?q?=20targets=20shows=20just=20type=20static?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/models/host.js | 7 +++ addons/api/tests/unit/models/host-test.js | 12 ++++ .../scope/projects/targets/target/hosts.hbs | 60 ++++++++++--------- 3 files changed, 50 insertions(+), 29 deletions(-) diff --git a/addons/api/addon/models/host.js b/addons/api/addon/models/host.js index 7748e023b..62274032b 100644 --- a/addons/api/addon/models/host.js +++ b/addons/api/addon/models/host.js @@ -7,4 +7,11 @@ export default class HostModel extends GeneratedHostModel { * @type {FragmentHostAttributesModel} */ @fragment('fragment-host-attributes', { defaultValue: {} }) attributes; + + /** + * @type {boolean} + */ + get isStatic() { + return this.type === 'static'; + } } diff --git a/addons/api/tests/unit/models/host-test.js b/addons/api/tests/unit/models/host-test.js index 871551523..9cd08b5aa 100644 --- a/addons/api/tests/unit/models/host-test.js +++ b/addons/api/tests/unit/models/host-test.js @@ -5,12 +5,14 @@ module('Unit | Model | host', function (hooks) { setupTest(hooks); test('it exists', function (assert) { + assert.expect(1); let store = this.owner.lookup('service:store'); let model = store.createRecord('host', {}); assert.ok(model); }); test('it contains attributes', function (assert) { + assert.expect(1); let store = this.owner.lookup('service:store'); let model = store.createRecord('host', { type: 'static', @@ -20,4 +22,14 @@ module('Unit | Model | host', function (hooks) { }); assert.equal(model.attributes.address, '127.0.0.1'); }); + + test('it has isStatic function and returns the expected values', async function (assert) { + assert.expect(3); + const store = this.owner.lookup('service:store'); + const modelA = store.createRecord('host', { type: 'static' }); + const modelB = store.createRecord('host', { type: 'plugin' }); + assert.equal(typeof modelA.isStatic, 'boolean'); + assert.true(modelA.isStatic); + assert.false(modelB.isStatic); + }); }); diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index 3a4dfbd65..f48b2a895 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -5,35 +5,37 @@ {{#each @model.hosts as |host|}} - - - {{host.displayName}} -

{{host.description}}

-
- - - {{host.id}} - - - {{host.attributes.address}} - - {{t - (concat 'resources.host.types.' host.type) - }} - - - - {{t 'resources.session.actions.connect'}} - - -
+ {{#if host.isStatic}} + + + {{host.displayName}} +

{{host.description}}

+
+ + + {{host.id}} + + + {{host.attributes.address}} + + {{t + (concat 'resources.host.types.' host.type) + }} + + + + {{t 'resources.session.actions.connect'}} + + +
+ {{/if}} {{/each}}
From aaa205b4e064fd25f6f4f69ecb7a4c6ad535aeab Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Fri, 10 Dec 2021 14:22:52 -0800 Subject: [PATCH 03/10] Add different host types in Mirage. Add conditional in admin host-catalog hosts list to just show type=static --- addons/api/mirage/generated/factories/host.js | 2 +- .../host-catalog/hosts/index.hbs | 65 ++++++++++--------- .../scope/projects/targets/target/hosts.hbs | 62 +++++++++--------- 3 files changed, 65 insertions(+), 64 deletions(-) diff --git a/addons/api/mirage/generated/factories/host.js b/addons/api/mirage/generated/factories/host.js index db9de3b56..08ac8a5f3 100644 --- a/addons/api/mirage/generated/factories/host.js +++ b/addons/api/mirage/generated/factories/host.js @@ -5,7 +5,7 @@ import { random, date, internet, datatype } from 'faker'; * GeneratedHostModelFactory */ export default Factory.extend({ - type: 'static', + type: () => random.arrayElement(['static', 'plugin']), name: () => random.words(), description: () => random.words(), created_time: () => date.recent(), diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs index ccf7e1ec3..eb69b4d5d 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs @@ -11,38 +11,41 @@ {{#each @model as |host|}} - - - {{#if (can 'read model' host)}} - + {{#if host.isStatic}} + + + {{#if (can 'read model' host)}} + + + {{host.displayName}} + + {{else}} {{host.displayName}} - - {{else}} - {{host.displayName}} - {{/if}} -

{{host.description}}

-
- - - {{t (concat 'resources.host.types.' host.type)}} - - - - - {{host.id}} - - - - {{host.attributes.address}} - -
+ {{/if}} +

{{host.description}}

+ + + + {{t (concat 'resources.host.types.' host.type)}} + + + + + {{host.id}} + + + + {{host.attributes.address}} + + + {{/if}} {{/each}}
diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index f48b2a895..ae19cb440 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -5,37 +5,35 @@ {{#each @model.hosts as |host|}} - {{#if host.isStatic}} - - - {{host.displayName}} -

{{host.description}}

-
- - - {{host.id}} - - - {{host.attributes.address}} - - {{t - (concat 'resources.host.types.' host.type) - }} - - - - {{t 'resources.session.actions.connect'}} - - -
- {{/if}} + + + {{host.displayName}} +

{{host.description}}

+
+ + + {{host.id}} + + + {{host.attributes.address}} + + {{t + (concat 'resources.host.types.' host.type) + }} + + + + {{t 'resources.session.actions.connect'}} + + +
{{/each}}
@@ -53,4 +51,4 @@ -{{/if}} \ No newline at end of file +{{/if}} From f4cdbfc99c5adb5456f9b5e43340597c510dc6f0 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 14 Dec 2021 08:13:18 -0800 Subject: [PATCH 04/10] Fix lint error --- .../templates/scopes/scope/projects/targets/target/hosts.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index ae19cb440..3a4dfbd65 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -51,4 +51,4 @@ -{{/if}} +{{/if}} \ No newline at end of file From bc0af27afae1b7c4ced89614a3f327bc671b2667 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 14 Dec 2021 08:35:13 -0800 Subject: [PATCH 05/10] Add conditional on template --- .../scope/projects/targets/target/hosts.hbs | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index 3a4dfbd65..f48b2a895 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -5,35 +5,37 @@ {{#each @model.hosts as |host|}} - - - {{host.displayName}} -

{{host.description}}

-
- - - {{host.id}} - - - {{host.attributes.address}} - - {{t - (concat 'resources.host.types.' host.type) - }} - - - - {{t 'resources.session.actions.connect'}} - - -
+ {{#if host.isStatic}} + + + {{host.displayName}} +

{{host.description}}

+
+ + + {{host.id}} + + + {{host.attributes.address}} + + {{t + (concat 'resources.host.types.' host.type) + }} + + + + {{t 'resources.session.actions.connect'}} + + +
+ {{/if}} {{/each}}
From 6cec91b09b203ee0dbebcc2d93d65b76545ed151 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 14 Dec 2021 09:22:33 -0800 Subject: [PATCH 06/10] Change test to filter the hosts list by type --- .../tests/acceptance/projects/targets/hosts-test.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/desktop/tests/acceptance/projects/targets/hosts-test.js b/ui/desktop/tests/acceptance/projects/targets/hosts-test.js index 3b6fda1ea..f54c33d2b 100644 --- a/ui/desktop/tests/acceptance/projects/targets/hosts-test.js +++ b/ui/desktop/tests/acceptance/projects/targets/hosts-test.js @@ -173,7 +173,14 @@ module('Acceptance | projects | targets | hosts', function (hooks) { test('visiting index', async function (assert) { assert.expect(2); - const hostsCount = this.server.schema.hosts.all().models.length; + // Because we are generating host with different types but just showing on the list + // the type = static, we have to apply a filter here + const rawHostsList = this.server.schema.hosts.all(); + const filteredHostsList = rawHostsList.filter((host) => { + if (host.type === 'static') { + return host; + } + }).length; // This later/cancelTimers technique allows us to test a page with // active polling. Normally an acceptance test waits for all runloop timers // to stop before returning from an awaited test, but polling means that @@ -183,7 +190,7 @@ module('Acceptance | projects | targets | hosts', function (hooks) { run.cancelTimers(); // await a11yAudit(); assert.equal(currentURL(), urls.hosts); - assert.equal(findAll('tbody tr').length, hostsCount); + assert.equal(findAll('tbody tr').length, filteredHostsList); }, 750); await visit(urls.hosts); }); From 8daf6129d1d7e572f2ce5c18fd1c51f134989f16 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 14 Dec 2021 10:39:15 -0800 Subject: [PATCH 07/10] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Add=20table=20head?= =?UTF-8?q?er=20for=20hosts=20list=20within=20targets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add table header for hosts list within targets --- .../scopes/scope/projects/targets/target/hosts.hbs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index 3a4dfbd65..86a5eb0b8 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -3,6 +3,15 @@ {{#if @model.hosts}} + + + {{t 'form.name.label'}} + {{t 'form.id.label'}} + {{t 'form.type.label'}} + {{t 'form.address.label'}} + + + {{#each @model.hosts as |host|}} @@ -19,12 +28,12 @@ {{host.id}} - {{host.attributes.address}} {{t (concat 'resources.host.types.' host.type) }} + {{host.attributes.address}} Date: Tue, 14 Dec 2021 15:44:51 -0800 Subject: [PATCH 08/10] Delete type column on hosts list --- .../scopes/scope/projects/targets/target/hosts.hbs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index 86a5eb0b8..48998ac4c 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -7,7 +7,6 @@ {{t 'form.name.label'}} {{t 'form.id.label'}} - {{t 'form.type.label'}} {{t 'form.address.label'}} @@ -28,11 +27,6 @@ {{host.id}} - - {{t - (concat 'resources.host.types.' host.type) - }} - {{host.attributes.address}} Date: Tue, 14 Dec 2021 16:18:18 -0800 Subject: [PATCH 09/10] Delete type column on hosts list within targets. Change test back to its initial state --- .../scope/projects/targets/target/hosts.hbs | 57 ++++++++----------- .../acceptance/projects/targets/hosts-test.js | 11 +--- 2 files changed, 26 insertions(+), 42 deletions(-) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs index f48b2a895..98a449ae8 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/hosts.hbs @@ -1,45 +1,36 @@ {{page-title (t 'resources.host-set.title_plural')}} {{#if @model.hosts}} - {{#each @model.hosts as |host|}} - {{#if host.isStatic}} - - - {{host.displayName}} -

{{host.description}}

-
- - - {{host.id}} - - - {{host.attributes.address}} - - {{t - (concat 'resources.host.types.' host.type) - }} - - - - {{t 'resources.session.actions.connect'}} - - -
- {{/if}} + + + {{host.displayName}} +

{{host.description}}

+
+ + + {{host.id}} + + + {{host.attributes.address}} + + + {{t 'resources.session.actions.connect'}} + + +
{{/each}}
- {{else}} diff --git a/ui/desktop/tests/acceptance/projects/targets/hosts-test.js b/ui/desktop/tests/acceptance/projects/targets/hosts-test.js index f54c33d2b..3b6fda1ea 100644 --- a/ui/desktop/tests/acceptance/projects/targets/hosts-test.js +++ b/ui/desktop/tests/acceptance/projects/targets/hosts-test.js @@ -173,14 +173,7 @@ module('Acceptance | projects | targets | hosts', function (hooks) { test('visiting index', async function (assert) { assert.expect(2); - // Because we are generating host with different types but just showing on the list - // the type = static, we have to apply a filter here - const rawHostsList = this.server.schema.hosts.all(); - const filteredHostsList = rawHostsList.filter((host) => { - if (host.type === 'static') { - return host; - } - }).length; + const hostsCount = this.server.schema.hosts.all().models.length; // This later/cancelTimers technique allows us to test a page with // active polling. Normally an acceptance test waits for all runloop timers // to stop before returning from an awaited test, but polling means that @@ -190,7 +183,7 @@ module('Acceptance | projects | targets | hosts', function (hooks) { run.cancelTimers(); // await a11yAudit(); assert.equal(currentURL(), urls.hosts); - assert.equal(findAll('tbody tr').length, filteredHostsList); + assert.equal(findAll('tbody tr').length, hostsCount); }, 750); await visit(urls.hosts); }); From ac5710979a6ed072c6a4da6a6d65b429a2403085 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 15 Dec 2021 13:15:31 -0500 Subject: [PATCH 10/10] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20apply=20type?= =?UTF-8?q?=20to=20host=20catalog=20and=20distribute=20down?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/models/host.js | 7 -- addons/api/mirage/factories/host-catalog.js | 6 +- .../generated/factories/host-catalog.js | 2 +- addons/api/mirage/generated/factories/host.js | 2 +- addons/api/tests/unit/models/host-test.js | 10 --- .../host-catalog/hosts/index.hbs | 66 +++++++++---------- 6 files changed, 37 insertions(+), 56 deletions(-) diff --git a/addons/api/addon/models/host.js b/addons/api/addon/models/host.js index 62274032b..7748e023b 100644 --- a/addons/api/addon/models/host.js +++ b/addons/api/addon/models/host.js @@ -7,11 +7,4 @@ export default class HostModel extends GeneratedHostModel { * @type {FragmentHostAttributesModel} */ @fragment('fragment-host-attributes', { defaultValue: {} }) attributes; - - /** - * @type {boolean} - */ - get isStatic() { - return this.type === 'static'; - } } diff --git a/addons/api/mirage/factories/host-catalog.js b/addons/api/mirage/factories/host-catalog.js index c08d2786a..75bcc3928 100644 --- a/addons/api/mirage/factories/host-catalog.js +++ b/addons/api/mirage/factories/host-catalog.js @@ -18,9 +18,9 @@ export default factory.extend({ }, withChildren: trait({ afterCreate(hostCatalog, server) { - const { scope } = hostCatalog; - const hosts = server.createList('host', 10, { scope, hostCatalog }); - server.createList('host-set', 3, { scope, hostCatalog, hosts }); + const { scope, type } = hostCatalog; + const hosts = server.createList('host', 10, { scope, hostCatalog, type }); + server.createList('host-set', 3, { scope, hostCatalog, hosts, type }); }, }), }); diff --git a/addons/api/mirage/generated/factories/host-catalog.js b/addons/api/mirage/generated/factories/host-catalog.js index 36d5e64c6..1b2bb8af6 100644 --- a/addons/api/mirage/generated/factories/host-catalog.js +++ b/addons/api/mirage/generated/factories/host-catalog.js @@ -5,7 +5,7 @@ import { random, date, datatype } from 'faker'; * GeneratedHostCatalogModelFactory */ export default Factory.extend({ - type: 'static', + type: () => random.arrayElement(['static', 'plugin']), name: () => random.words(), description: () => random.words(), created_time: () => date.recent(), diff --git a/addons/api/mirage/generated/factories/host.js b/addons/api/mirage/generated/factories/host.js index 08ac8a5f3..db9de3b56 100644 --- a/addons/api/mirage/generated/factories/host.js +++ b/addons/api/mirage/generated/factories/host.js @@ -5,7 +5,7 @@ import { random, date, internet, datatype } from 'faker'; * GeneratedHostModelFactory */ export default Factory.extend({ - type: () => random.arrayElement(['static', 'plugin']), + type: 'static', name: () => random.words(), description: () => random.words(), created_time: () => date.recent(), diff --git a/addons/api/tests/unit/models/host-test.js b/addons/api/tests/unit/models/host-test.js index 9cd08b5aa..625774e71 100644 --- a/addons/api/tests/unit/models/host-test.js +++ b/addons/api/tests/unit/models/host-test.js @@ -22,14 +22,4 @@ module('Unit | Model | host', function (hooks) { }); assert.equal(model.attributes.address, '127.0.0.1'); }); - - test('it has isStatic function and returns the expected values', async function (assert) { - assert.expect(3); - const store = this.owner.lookup('service:store'); - const modelA = store.createRecord('host', { type: 'static' }); - const modelB = store.createRecord('host', { type: 'plugin' }); - assert.equal(typeof modelA.isStatic, 'boolean'); - assert.true(modelA.isStatic); - assert.false(modelB.isStatic); - }); }); diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs index eb69b4d5d..afd87cccc 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/hosts/index.hbs @@ -11,41 +11,39 @@ {{#each @model as |host|}} - {{#if host.isStatic}} - - - {{#if (can 'read model' host)}} - - - {{host.displayName}} - - {{else}} - {{host.displayName}} - {{/if}} -

{{host.description}}

-
- - - {{t (concat 'resources.host.types.' host.type)}} - - - - + + {{#if (can 'read model' host)}} + - {{host.id}} - - - - {{host.attributes.address}} - -
- {{/if}} + + {{host.displayName}} + + {{else}} + {{host.displayName}} + {{/if}} +

{{host.description}}

+ + + + {{t (concat 'resources.host.types.' host.type)}} + + + + + {{host.id}} + + + + {{host.attributes.address}} + +
{{/each}}