mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-06-08 08:33:49 +02:00
Migrate tags view
This commit is contained in:
parent
1f103e5ef5
commit
24cf5047da
@ -24,15 +24,22 @@
|
|||||||
init,
|
init,
|
||||||
} from "./generic/utils.js";
|
} from "./generic/utils.js";
|
||||||
|
|
||||||
export let username;
|
/* Svelte 5 Props */
|
||||||
export let isAdmin;
|
let {
|
||||||
export let tagmap;
|
username,
|
||||||
|
isAdmin,
|
||||||
|
presetTagmap,
|
||||||
|
} = $props();
|
||||||
|
|
||||||
|
/* Const Init */
|
||||||
const {} = init();
|
const {} = init();
|
||||||
const client = getContextClient();
|
const client = getContextClient();
|
||||||
|
|
||||||
let pendingChange = "none";
|
/* State Init */
|
||||||
|
let pendingChange = $state("none");
|
||||||
|
let tagmap = $state(presetTagmap)
|
||||||
|
|
||||||
|
/* Functions */
|
||||||
const removeTagMutation = ({ tagIds }) => {
|
const removeTagMutation = ({ tagIds }) => {
|
||||||
return mutationStore({
|
return mutationStore({
|
||||||
client: client,
|
client: client,
|
||||||
@ -96,7 +103,7 @@
|
|||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
color="danger"
|
color="danger"
|
||||||
on:click={() => removeTag(tag, tagType)}
|
onclick={() => removeTag(tag, tagType)}
|
||||||
>
|
>
|
||||||
<Icon name="x" />
|
<Icon name="x" />
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -7,7 +7,7 @@ mount(Tags, {
|
|||||||
props: {
|
props: {
|
||||||
username: username,
|
username: username,
|
||||||
isAdmin: isAdmin,
|
isAdmin: isAdmin,
|
||||||
tagmap: tagmap,
|
presetTagmap: tagmap,
|
||||||
},
|
},
|
||||||
context: new Map([
|
context: new Map([
|
||||||
['cc-config', clusterCockpitConfig]
|
['cc-config', clusterCockpitConfig]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user