generated from coulomb/repo-seed
feat: add vsm hub metadata
Some checks failed
Build and Deploy / build-push-deploy (push) Has been cancelled
Some checks failed
Build and Deploy / build-push-deploy (push) Has been cancelled
This commit is contained in:
@@ -53,6 +53,7 @@ renderRow row@HubRegistryRow { hub, mManifest, mLatestSnapshot } =
|
||||
{hub.name}
|
||||
</a>
|
||||
<span class="text-xs text-gray-400 font-mono">{hub.hubKind}</span>
|
||||
{classificationBadge hub}
|
||||
{gaafBadge gs}
|
||||
</div>
|
||||
<div class="flex items-center gap-4 text-xs text-gray-500">
|
||||
@@ -74,6 +75,17 @@ gaafBadge GaafDraftOnly =
|
||||
gaafBadge GaafNoManifest =
|
||||
[hsx|<span class="px-2 py-0.5 rounded text-xs bg-red-100 text-red-700">no manifest</span>|]
|
||||
|
||||
classificationBadge :: Hub -> Html
|
||||
classificationBadge hub =
|
||||
case (hub.hubFamily, hub.vsmFunction, hub.vsmSystem) of
|
||||
(Just "vsm", Just functionName, Just systemName) ->
|
||||
[hsx|<span class="px-2 py-0.5 rounded text-xs bg-emerald-100 text-emerald-800">VSM {functionName} / {vsmSystemLabel systemName}</span>|]
|
||||
_ -> mempty
|
||||
|
||||
vsmSystemLabel :: Text -> Text
|
||||
vsmSystemLabel "environment" = "Environment"
|
||||
vsmSystemLabel systemName = "System " <> systemName
|
||||
|
||||
healthScoreBadge :: Int -> Html
|
||||
healthScoreBadge s =
|
||||
let cls :: Text
|
||||
|
||||
Reference in New Issue
Block a user