refactor: 💡 consolidate host catalog type badges to component

This commit is contained in:
Randall Morey committed 2022-02-14 18:06:12 -05:00
1 parent 318103b745
commit ed248f583f
7 files changed
+38 -68

No files matched your search

@@ -0,0 +1,15 @@
{{#if @model.isStatic}}
<Rose::Badge>
{{t (concat 'resources.host-catalog.types.' @model.compositeType '.label')}}
</Rose::Badge>
{{else if @model.isUnknown}}
<Rose::Badge>
{{t (concat 'resources.host-catalog.types.' @model.compositeType '.label')}}
</Rose::Badge>
{{else}}
<Rose::Badge
@icon={{concat 'flight-icons/svg/' @model.compositeType '-color-16'}}
>
{{t (concat 'resources.host-catalog.types.' @model.compositeType '.label')}}
</Rose::Badge>
{{/if}}
@@ -26,7 +26,7 @@
<p>{{host.description}}</p>
</row.headerCell>
<row.cell>
<Rose::Badge>{{host.type}}</Rose::Badge>
<HostCatalogTypeBadge @model={{host}} />
</row.cell>
<row.cell>
<Copyable
@@ -25,29 +25,7 @@
<p>{{hostSet.description}}</p>
</row.headerCell>
<row.cell>
{{#if hostSet.isStatic}}
<Rose::Badge>
{{t
(concat
'resources.host-set.types.' hostSet.compositeType '.label'
)
}}
</Rose::Badge>
{{else}}
<Rose::Badge
@icon={{concat
'flight-icons/svg/'
hostSet.compositeType
'-color-16'
}}
>
{{t
(concat
'resources.host-set.types.' hostSet.compositeType '.label'
)
}}
</Rose::Badge>
{{/if}}
<HostCatalogTypeBadge @model={{hostSet}} />
</row.cell>
<row.cell>
<Copyable
@@ -56,43 +56,7 @@
<p>{{hostCatalog.description}}</p>
</row.headerCell>
<row.cell>
{{#if hostCatalog.isStatic}}
<Rose::Badge>
{{t
(concat
'resources.host-catalog.types.'
hostCatalog.compositeType
'.label'
)
}}
</Rose::Badge>
{{else if hostCatalog.isUnknown}}
<Rose::Badge>
{{t
(concat
'resources.host-catalog.types.'
hostCatalog.compositeType
'.label'
)
}}
</Rose::Badge>
{{else}}
<Rose::Badge
@icon={{concat
'flight-icons/svg/'
hostCatalog.compositeType
'-color-16'
}}
>
{{t
(concat
'resources.host-catalog.types.'
hostCatalog.compositeType
'.label'
)
}}
</Rose::Badge>
{{/if}}
<HostCatalogTypeBadge @model={{hostCatalog}} />
</row.cell>
<row.cell>
<Copyable
@@ -38,9 +38,7 @@
<p>{{hostSet.model.description}}</p>
</row.headerCell>
<row.cell>
<Rose::Badge>{{t
(concat 'resources.host-set.types.' hostSet.model.type)
}}</Rose::Badge>
<HostCatalogTypeBadge @model={{hostSet.model}} />
</row.cell>
<row.cell>
<Copyable