Add different host types in Mirage. Add conditional in admin host-catalog hosts list to just show type=static

This commit is contained in:
Carlos Alcaide Corvo committed 2021-12-14 08:08:15 -08:00
1 parent c8b49beba6
commit aaa205b4e0
3 files changed
+65 -64

No files matched your search

@@ -5,37 +5,35 @@
<Rose::Table as |table|>
<table.body as |body|>
{{#each @model.hosts as |host|}}
{{#if host.isStatic}}
<body.row as |row|>
<row.cell>
{{host.displayName}}
<p>{{host.description}}</p>
</row.cell>
<row.cell>
<Copyable
@text={{host.id}}
@buttonText={{t 'actions.copy-to-clipboard'}}
@acknowledgeText={{t 'states.copied'}}
>
<code>{{host.id}}</code>
</Copyable>
</row.cell>
<row.cell>{{host.attributes.address}}</row.cell>
<row.cell>
<Rose::Badge>{{t
(concat 'resources.host.types.' host.type)
}}</Rose::Badge>
</row.cell>
<row.cell>
<Rose::Button
@style='secondary'
{{on 'click' (route-action 'connect' @model.target host)}}
>
{{t 'resources.session.actions.connect'}}
</Rose::Button>
</row.cell>
</body.row>
{{/if}}
<body.row as |row|>
<row.cell>
{{host.displayName}}
<p>{{host.description}}</p>
</row.cell>
<row.cell>
<Copyable
@text={{host.id}}
@buttonText={{t 'actions.copy-to-clipboard'}}
@acknowledgeText={{t 'states.copied'}}
>
<code>{{host.id}}</code>
</Copyable>
</row.cell>
<row.cell>{{host.attributes.address}}</row.cell>
<row.cell>
<Rose::Badge>{{t
(concat 'resources.host.types.' host.type)
}}</Rose::Badge>
</row.cell>
<row.cell>
<Rose::Button
@style='secondary'
{{on 'click' (route-action 'connect' @model.target host)}}
>
{{t 'resources.session.actions.connect'}}
</Rose::Button>
</row.cell>
</body.row>
{{/each}}
</table.body>
</Rose::Table>
@@ -53,4 +51,4 @@
</Rose::Message>
</Rose::Layout::Centered>
{{/if}}
{{/if}}