feat: Add host address
This commit is contained in:
5 files changed
+25
-2
No files matched your search
@@ -41,7 +41,7 @@
|
||||
onChange={{fn @toggleHost option.host}} />
|
||||
</row.cell>
|
||||
<row.cell>{{option.host.name}}</row.cell>
|
||||
<row.cell>{{option.host.address}}</row.cell>
|
||||
<row.cell>{{option.host.attributes.address}}</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
|
||||
@@ -47,6 +47,24 @@
|
||||
{{/if}}
|
||||
</form.textarea>
|
||||
|
||||
<form.input
|
||||
@name="address"
|
||||
@type="text"
|
||||
@value={{@model.attributes.address}}
|
||||
@label={{t "form.label.address"}}
|
||||
@error={{@model.errors.name}}
|
||||
readonly={{false}}
|
||||
as |field|>
|
||||
{{#if @model.errors.name}}
|
||||
<field.errors as |errors|>
|
||||
{{#each @model.errors.name as |error|}}
|
||||
<errors.message>{{error.message}}</errors.message>
|
||||
{{/each}}
|
||||
</field.errors>
|
||||
{{/if}}
|
||||
</form.input>
|
||||
|
||||
|
||||
<form.actions
|
||||
@disabled={{if @model.cannotSave @model.cannotSave}}
|
||||
@submitText={{t "actions.save"}}
|
||||
|
||||
+1
@@ -13,6 +13,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsHostR
|
||||
const { id: scopeID } = this.modelFor('scopes.scope.projects.project');
|
||||
const hostCatalogID = this.modelFor('scopes.scope.projects.project.host-catalogs.host-catalog').id;
|
||||
return this.store.findRecord('host', host_id, {
|
||||
reload: true,
|
||||
adapterOptions: { scopeID, hostCatalogID }
|
||||
});
|
||||
}
|
||||
|
||||
+4
@@ -6,6 +6,7 @@
|
||||
<row.headerCell>{{t "form.label.name"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.label.type"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.label.id"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.label.address"}}</row.headerCell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
<table.body as |body|>
|
||||
@@ -26,6 +27,9 @@
|
||||
<row.cell>
|
||||
<code>{{host.id}}</code>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{host.attributes.address}}</code>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
|
||||
@@ -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() } },
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user