mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-26 14:16:07 +02:00
feat: Add tag scopes to front and backend, initial commit
This commit is contained in:
@@ -81,6 +81,7 @@
|
||||
id
|
||||
type
|
||||
name
|
||||
scope
|
||||
}
|
||||
userData {
|
||||
name
|
||||
|
@@ -37,7 +37,13 @@
|
||||
|
||||
<a target={clickable ? "_blank" : null} href={clickable ? `/monitoring/jobs/?tag=${id}` : null}>
|
||||
{#if tag}
|
||||
<span class="badge bg-warning text-dark">{tag.type}: {tag.name}</span>
|
||||
{#if tag?.scope === "global"}
|
||||
<span style="background-color:#9e9e9e;" class="badge text-dark">{tag.type}: {tag.name}</span>
|
||||
{:else if tag.scope === "admin"}
|
||||
<span style="background-color:#80deea;" class="badge text-dark">{tag.type}: {tag.name}</span>
|
||||
{:else}
|
||||
<span class="badge bg-warning text-dark">{tag.type}: {tag.name}</span>
|
||||
{/if}
|
||||
{:else}
|
||||
Loading...
|
||||
{/if}
|
||||
|
@@ -77,7 +77,7 @@ export function init(extraInitQuery = "") {
|
||||
footprint
|
||||
}
|
||||
}
|
||||
tags { id, name, type }
|
||||
tags { id, name, type, scope }
|
||||
globalMetrics {
|
||||
name
|
||||
scope
|
||||
|
Reference in New Issue
Block a user