From 2217a601dd19899b9a5c922754b841d256afd2ba Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Wed, 9 Sep 2020 13:05:02 -0400 Subject: [PATCH] feat: Add host address --- .../components/form/host-set/hosts/index.hbs | 2 +- ui/core/app/components/form/host/index.hbs | 18 ++++++++++++++++++ .../host-catalogs/host-catalog/hosts/host.js | 1 + .../host-catalogs/host-catalog/hosts/index.hbs | 4 ++++ ui/core/mirage/generated/factories/host.js | 2 +- 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ui/core/app/components/form/host-set/hosts/index.hbs b/ui/core/app/components/form/host-set/hosts/index.hbs index 1943e26aa..088270a0b 100644 --- a/ui/core/app/components/form/host-set/hosts/index.hbs +++ b/ui/core/app/components/form/host-set/hosts/index.hbs @@ -41,7 +41,7 @@ onChange={{fn @toggleHost option.host}} /> {{option.host.name}} - {{option.host.address}} + {{option.host.attributes.address}} {{/each}} diff --git a/ui/core/app/components/form/host/index.hbs b/ui/core/app/components/form/host/index.hbs index 9152b0ba0..2168b7285 100644 --- a/ui/core/app/components/form/host/index.hbs +++ b/ui/core/app/components/form/host/index.hbs @@ -47,6 +47,24 @@ {{/if}} + + {{#if @model.errors.name}} + + {{#each @model.errors.name as |error|}} + {{error.message}} + {{/each}} + + {{/if}} + + + {{t "form.label.name"}} {{t "form.label.type"}} {{t "form.label.id"}} + {{t "form.label.address"}} @@ -26,6 +27,9 @@ {{host.id}} + + {{host.attributes.address}} + {{/each}} diff --git a/ui/core/mirage/generated/factories/host.js b/ui/core/mirage/generated/factories/host.js index 2d6925e82..e6fccf602 100644 --- a/ui/core/mirage/generated/factories/host.js +++ b/ui/core/mirage/generated/factories/host.js @@ -12,6 +12,6 @@ export default Factory.extend({ created_time: () => date.recent(), updated_time: () => date.recent(), version: () => random.number(), - address: () => internet.ipv6(), + attributes: () => { return { address: internet.ipv6() } }, });