feat: Add tag scopes to front and backend, initial commit

This commit is contained in:
Christoph Kluge
2024-08-01 18:59:24 +02:00
parent c80d3a6958
commit 017f9b2140
18 changed files with 361 additions and 98 deletions

View File

@@ -81,6 +81,7 @@
id
type
name
scope
}
userData {
name

View File

@@ -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}

View File

@@ -77,7 +77,7 @@ export function init(extraInitQuery = "") {
footprint
}
}
tags { id, name, type }
tags { id, name, type, scope }
globalMetrics {
name
scope