mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-12-20 06:06:16 +01:00
adapt frontend for new uiConfig keys, add nodeOverview mutation
This commit is contained in:
@@ -29,10 +29,10 @@
|
||||
} = $props();
|
||||
|
||||
/* State Init */
|
||||
let activeRow = $state(JSON.stringify(config?.plot_general_colorscheme));
|
||||
let activeRow = $state(JSON.stringify(config?.plotConfiguration_colorScheme));
|
||||
|
||||
/* Const Init */
|
||||
const colorschemes = {
|
||||
const colorSchemes = {
|
||||
Default: [
|
||||
"#00bfff",
|
||||
"#0000ff",
|
||||
@@ -266,7 +266,7 @@
|
||||
|
||||
// https://personal.sron.nl/~pault/
|
||||
// https://tsitsul.in/blog/coloropt/
|
||||
const cvdschemes = {
|
||||
const cvdSchemes = {
|
||||
HighContrast: [
|
||||
"rgb(221,170,51)",
|
||||
"rgb(187,85,102)",
|
||||
@@ -344,11 +344,11 @@
|
||||
</div>
|
||||
{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="plot_general_colorscheme" />
|
||||
<input type="hidden" name="key" value="plotConfiguration_colorScheme" />
|
||||
<Table hover>
|
||||
<tbody>
|
||||
{#key activeRow}
|
||||
{#each Object.entries(cbmode ? cvdschemes : colorschemes) as [name, rgbrow]}
|
||||
{#each Object.entries(cbmode ? cvdSchemes : colorSchemes) as [name, rgbrow]}
|
||||
<tr>
|
||||
<th scope="col">{name}</th>
|
||||
<td>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="plot_general_lineWidth" />
|
||||
<input type="hidden" name="key" value="plotConfiguration_lineWidth" />
|
||||
<div class="mb-3">
|
||||
<label for="value" class="form-label">Line Width</label>
|
||||
<input
|
||||
@@ -64,7 +64,7 @@
|
||||
id="lwvalue"
|
||||
name="value"
|
||||
aria-describedby="lineWidthHelp"
|
||||
value={config.plot_general_lineWidth}
|
||||
value={config.plotConfiguration_lineWidth}
|
||||
min="1"
|
||||
/>
|
||||
<div id="lineWidthHelp" class="form-text">
|
||||
@@ -102,7 +102,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="plot_view_plotsPerRow" />
|
||||
<input type="hidden" name="key" value="plotConfiguration_plotsPerRow" />
|
||||
<div class="mb-3">
|
||||
<label for="value" class="form-label">Plots per Row</label>
|
||||
<input
|
||||
@@ -111,7 +111,7 @@
|
||||
id="pprvalue"
|
||||
name="value"
|
||||
aria-describedby="plotsperrowHelp"
|
||||
value={config.plot_view_plotsPerRow}
|
||||
value={config.plotConfiguration_plotsPerRow}
|
||||
min="1"
|
||||
/>
|
||||
<div id="plotsperrowHelp" class="form-text">
|
||||
@@ -150,10 +150,10 @@
|
||||
</div>
|
||||
{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="plot_general_colorBackground" />
|
||||
<input type="hidden" name="key" value="plotConfiguration_colorBackground" />
|
||||
<div class="mb-3">
|
||||
<div>
|
||||
{#if config.plot_general_colorBackground}
|
||||
{#if config.plotConfiguration_colorBackground}
|
||||
<input type="radio" id="colb-true-checked" name="value" value="true" checked />
|
||||
{:else}
|
||||
<input type="radio" id="colb-true" name="value" value="true" />
|
||||
@@ -161,7 +161,7 @@
|
||||
<label for="true">Yes</label>
|
||||
</div>
|
||||
<div>
|
||||
{#if config.plot_general_colorBackground}
|
||||
{#if config.plotConfiguration_colorBackground}
|
||||
<input type="radio" id="colb-false" name="value" value="false" />
|
||||
{:else}
|
||||
<input type="radio" id="colb-false-checked" name="value" value="false" checked />
|
||||
@@ -196,10 +196,10 @@
|
||||
</div>
|
||||
{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="plot_general_colorblindMode" />
|
||||
<input type="hidden" name="key" value="plotConfiguration_colorblindMode" />
|
||||
<div class="mb-3">
|
||||
<div>
|
||||
{#if config?.plot_general_colorblindMode}
|
||||
{#if config?.plotConfiguration_colorblindMode}
|
||||
<input type="radio" id="cbm-true-checked" name="value" value="true" checked />
|
||||
{:else}
|
||||
<input type="radio" id="cbm-true" name="value" value="true" />
|
||||
@@ -207,7 +207,7 @@
|
||||
<label for="true">Yes</label>
|
||||
</div>
|
||||
<div>
|
||||
{#if config?.plot_general_colorblindMode}
|
||||
{#if config?.plotConfiguration_colorblindMode}
|
||||
<input type="radio" id="cbm-false" name="value" value="false" />
|
||||
{:else}
|
||||
<input type="radio" id="cbm-false-checked" name="value" value="false" checked />
|
||||
|
||||
@@ -104,10 +104,10 @@
|
||||
>
|
||||
</div>{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="job_list_usePaging" />
|
||||
<input type="hidden" name="key" value="jobList_usePaging" />
|
||||
<div class="mb-3">
|
||||
<div>
|
||||
{#if config?.job_list_usePaging}
|
||||
{#if config?.jobList_usePaging}
|
||||
<input type="radio" id="true-checked" name="value" value="true" checked />
|
||||
{:else}
|
||||
<input type="radio" id="true" name="value" value="true" />
|
||||
@@ -115,7 +115,7 @@
|
||||
<label for="true">Paging with selectable count of jobs.</label>
|
||||
</div>
|
||||
<div>
|
||||
{#if config?.job_list_usePaging}
|
||||
{#if config?.jobList_usePaging}
|
||||
<input type="radio" id="false" name="value" value="false" />
|
||||
{:else}
|
||||
<input type="radio" id="false-checked" name="value" value="false" checked />
|
||||
|
||||
Reference in New Issue
Block a user