mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-01-06 21:36:16 +01:00
adapt frontend for new uiConfig keys, add nodeOverview mutation
This commit is contained in:
@@ -91,8 +91,8 @@ func (uCfg *UserCfgRepo) GetUIConfig(user *schema.User) (map[string]any, error)
|
|||||||
uiconfig[key] = val
|
uiconfig[key] = val
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add global ShortRunningJobsDuration setting as plot_list_hideShortRunningJobs
|
// Add global ShortRunningJobsDuration setting as jobList_hideShortRunningJobs
|
||||||
uiconfig["plot_list_hideShortRunningJobs"] = config.Keys.ShortRunningJobsDuration
|
uiconfig["jobList_hideShortRunningJobs"] = config.Keys.ShortRunningJobsDuration
|
||||||
|
|
||||||
return uiconfig, 24 * time.Hour, size
|
return uiconfig, 24 * time.Hour, size
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -82,26 +82,26 @@
|
|||||||
let colWidth1 = $state(0);
|
let colWidth1 = $state(0);
|
||||||
let colWidth2 = $state(0);
|
let colWidth2 = $state(0);
|
||||||
let jobFilters = $state([]);
|
let jobFilters = $state([]);
|
||||||
let metricsInHistograms = $state(ccconfig.analysis_view_histogramMetrics)
|
let metricsInHistograms = $state(ccconfig.analysisView_histogramMetrics)
|
||||||
let metricsInScatterplots = $state(ccconfig.analysis_view_scatterPlotMetrics)
|
let metricsInScatterplots = $state(ccconfig.analysisView_scatterPlotMetrics)
|
||||||
let sortSelection = $state(
|
let sortSelection = $state(
|
||||||
sortOptions.find(
|
sortOptions.find(
|
||||||
(option) =>
|
(option) =>
|
||||||
option.key ==
|
option.key ==
|
||||||
ccconfig[`analysis_view_selectedTopCategory:${filterPresets.cluster}`],
|
ccconfig[`analysisView_selectedTopCategory:${filterPresets.cluster}`],
|
||||||
) ||
|
) ||
|
||||||
sortOptions.find(
|
sortOptions.find(
|
||||||
(option) => option.key == ccconfig.analysis_view_selectedTopCategory,
|
(option) => option.key == ccconfig.analysisView_selectedTopCategory,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
let groupSelection = $state(
|
let groupSelection = $state(
|
||||||
groupOptions.find(
|
groupOptions.find(
|
||||||
(option) =>
|
(option) =>
|
||||||
option.key ==
|
option.key ==
|
||||||
ccconfig[`analysis_view_selectedTopEntity:${filterPresets.cluster}`],
|
ccconfig[`analysisView_selectedTopEntity:${filterPresets.cluster}`],
|
||||||
) ||
|
) ||
|
||||||
groupOptions.find(
|
groupOptions.find(
|
||||||
(option) => option.key == ccconfig.analysis_view_selectedTopEntity,
|
(option) => option.key == ccconfig.analysisView_selectedTopEntity,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -275,15 +275,15 @@
|
|||||||
|
|
||||||
function updateEntityConfiguration(select) {
|
function updateEntityConfiguration(select) {
|
||||||
if (
|
if (
|
||||||
ccconfig[`analysis_view_selectedTopEntity:${filterPresets.cluster}`] !=
|
ccconfig[`analysisView_selectedTopEntity:${filterPresets.cluster}`] !=
|
||||||
select
|
select
|
||||||
) {
|
) {
|
||||||
updateConfigurationMutation({
|
updateConfigurationMutation({
|
||||||
name: `analysis_view_selectedTopEntity:${filterPresets.cluster}`,
|
name: `analysisView_selectedTopEntity:${filterPresets.cluster}`,
|
||||||
value: JSON.stringify(select),
|
value: JSON.stringify(select),
|
||||||
}).subscribe((res) => {
|
}).subscribe((res) => {
|
||||||
if (res.fetching === false && !res.error) {
|
if (res.fetching === false && !res.error) {
|
||||||
// console.log(`analysis_view_selectedTopEntity:${filterPresets.cluster}` + ' -> Updated!')
|
// console.log(`analysisView_selectedTopEntity:${filterPresets.cluster}` + ' -> Updated!')
|
||||||
} else if (res.fetching === false && res.error) {
|
} else if (res.fetching === false && res.error) {
|
||||||
throw res.error;
|
throw res.error;
|
||||||
}
|
}
|
||||||
@@ -295,15 +295,15 @@
|
|||||||
|
|
||||||
function updateCategoryConfiguration(select) {
|
function updateCategoryConfiguration(select) {
|
||||||
if (
|
if (
|
||||||
ccconfig[`analysis_view_selectedTopCategory:${filterPresets.cluster}`] !=
|
ccconfig[`analysisView_selectedTopCategory:${filterPresets.cluster}`] !=
|
||||||
select
|
select
|
||||||
) {
|
) {
|
||||||
updateConfigurationMutation({
|
updateConfigurationMutation({
|
||||||
name: `analysis_view_selectedTopCategory:${filterPresets.cluster}`,
|
name: `analysisView_selectedTopCategory:${filterPresets.cluster}`,
|
||||||
value: JSON.stringify(select),
|
value: JSON.stringify(select),
|
||||||
}).subscribe((res) => {
|
}).subscribe((res) => {
|
||||||
if (res.fetching === false && !res.error) {
|
if (res.fetching === false && !res.error) {
|
||||||
// console.log(`analysis_view_selectedTopCategory:${filterPresets.cluster}` + ' -> Updated!')
|
// console.log(`analysisView_selectedTopCategory:${filterPresets.cluster}` + ' -> Updated!')
|
||||||
} else if (res.fetching === false && res.error) {
|
} else if (res.fetching === false && res.error) {
|
||||||
throw res.error;
|
throw res.error;
|
||||||
}
|
}
|
||||||
@@ -591,7 +591,7 @@
|
|||||||
numBins,
|
numBins,
|
||||||
),
|
),
|
||||||
}))}
|
}))}
|
||||||
itemsPerRow={ccconfig.plot_view_plotsPerRow}
|
itemsPerRow={ccconfig.plotConfiguration_plotsPerRow}
|
||||||
gridContent={histoGridContent}
|
gridContent={histoGridContent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
@@ -634,7 +634,7 @@
|
|||||||
(f) => f.metric == m2,
|
(f) => f.metric == m2,
|
||||||
).data,
|
).data,
|
||||||
}))}
|
}))}
|
||||||
itemsPerRow={ccconfig.plot_view_plotsPerRow}
|
itemsPerRow={ccconfig.plotConfiguration_plotsPerRow}
|
||||||
gridContent={metricsGridContent}
|
gridContent={metricsGridContent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -69,6 +69,9 @@
|
|||||||
`);
|
`);
|
||||||
const client = getContextClient();
|
const client = getContextClient();
|
||||||
const ccconfig = getContext("cc-config");
|
const ccconfig = getContext("cc-config");
|
||||||
|
const showRoofline = !!ccconfig[`jobView_showRoofline`];
|
||||||
|
const showStatsTable = !!ccconfig[`jobView_showStatTable`];
|
||||||
|
|
||||||
/* Note: Actual metric data queried in <Metric> Component, only require base infos here -> reduce backend load by requesting just stats */
|
/* Note: Actual metric data queried in <Metric> Component, only require base infos here -> reduce backend load by requesting just stats */
|
||||||
const query = gql`
|
const query = gql`
|
||||||
query ($dbid: ID!, $selectedMetrics: [String!]!, $selectedScopes: [MetricScope!]!) {
|
query ($dbid: ID!, $selectedMetrics: [String!]!, $selectedScopes: [MetricScope!]!) {
|
||||||
@@ -168,8 +171,8 @@
|
|||||||
let job = $initq.data.job;
|
let job = $initq.data.job;
|
||||||
if (!job) return;
|
if (!job) return;
|
||||||
const pendingMetrics = (
|
const pendingMetrics = (
|
||||||
ccconfig[`job_view_selectedMetrics:${job.cluster}:${job.subCluster}`] ||
|
ccconfig[`metricConfig_jobViewPlotMetrics:${job.cluster}:${job.subCluster}`] ||
|
||||||
ccconfig[`job_view_selectedMetrics:${job.cluster}`]
|
ccconfig[`metricConfig_jobViewPlotMetrics:${job.cluster}`]
|
||||||
) ||
|
) ||
|
||||||
$initq.data.globalMetrics.reduce((names, gm) => {
|
$initq.data.globalMetrics.reduce((names, gm) => {
|
||||||
if (gm.availability.find((av) => av.cluster === job.cluster && av.subClusters.includes(job.subCluster))) {
|
if (gm.availability.find((av) => av.cluster === job.cluster && av.subClusters.includes(job.subCluster))) {
|
||||||
@@ -268,7 +271,9 @@
|
|||||||
{#if $initq.error}
|
{#if $initq.error}
|
||||||
<Card body color="danger">{$initq.error.message}</Card>
|
<Card body color="danger">{$initq.error.message}</Card>
|
||||||
{:else if $initq?.data}
|
{:else if $initq?.data}
|
||||||
<JobRoofline job={$initq.data.job} clusters={$initq.data.clusters}/>
|
{#if showRoofline}
|
||||||
|
<JobRoofline job={$initq.data.job} clusters={$initq.data.clusters}/>
|
||||||
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
<Spinner secondary />
|
<Spinner secondary />
|
||||||
{/if}
|
{/if}
|
||||||
@@ -354,14 +359,14 @@
|
|||||||
groupByScope($jobMetrics.data.scopedJobStats),
|
groupByScope($jobMetrics.data.scopedJobStats),
|
||||||
selectedMetrics,
|
selectedMetrics,
|
||||||
)}
|
)}
|
||||||
itemsPerRow={ccconfig.plot_view_plotsPerRow}
|
itemsPerRow={ccconfig.plotConfiguration_plotsPerRow}
|
||||||
{gridContent}
|
{gridContent}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</CardBody>
|
</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<!-- Statistcics Table -->
|
<!-- Metadata && Statistcics Table -->
|
||||||
<Row class="mb-3">
|
<Row class="mb-3">
|
||||||
<Col>
|
<Col>
|
||||||
{#if $initq?.data}
|
{#if $initq?.data}
|
||||||
@@ -397,8 +402,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- Includes <TabPane> Statistics Table with Independent GQL Query -->
|
{#if showStatsTable}
|
||||||
<StatsTab job={$initq.data.job} clusters={$initq.data.clusters} tabActive={!somethingMissing}/>
|
<!-- Includes <TabPane> Statistics Table with Independent GQL Query -->
|
||||||
|
<StatsTab job={$initq.data.job} clusters={$initq.data.clusters} tabActive={!somethingMissing}/>
|
||||||
|
{/if}
|
||||||
<TabPane tabId="job-script" tab="Job Script">
|
<TabPane tabId="job-script" tab="Job Script">
|
||||||
<div class="pre-wrapper">
|
<div class="pre-wrapper">
|
||||||
{#if $initq.data.job.metaData?.jobScript}
|
{#if $initq.data.job.metaData?.jobScript}
|
||||||
@@ -432,7 +439,7 @@
|
|||||||
presetMetrics={selectedMetrics}
|
presetMetrics={selectedMetrics}
|
||||||
cluster={$initq.data.job.cluster}
|
cluster={$initq.data.job.cluster}
|
||||||
subCluster={$initq.data.job.subCluster}
|
subCluster={$initq.data.job.subCluster}
|
||||||
configName="job_view_selectedMetrics"
|
configName="metricConfig_jobViewPlotMetrics"
|
||||||
preInitialized
|
preInitialized
|
||||||
applyMetrics={(newMetrics) =>
|
applyMetrics={(newMetrics) =>
|
||||||
selectedMetrics = [...newMetrics]
|
selectedMetrics = [...newMetrics]
|
||||||
|
|||||||
@@ -53,13 +53,13 @@
|
|||||||
let sorting = $state({ field: "startTime", type: "col", order: "DESC" });
|
let sorting = $state({ field: "startTime", type: "col", order: "DESC" });
|
||||||
let selectedCluster = $state(filterPresets?.cluster ? filterPresets.cluster : null);
|
let selectedCluster = $state(filterPresets?.cluster ? filterPresets.cluster : null);
|
||||||
let metrics = $state(filterPresets.cluster
|
let metrics = $state(filterPresets.cluster
|
||||||
? ccconfig[`plot_list_selectedMetrics:${filterPresets.cluster}`] ||
|
? ccconfig[`metricConfig_jobListMetrics:${filterPresets.cluster}`] ||
|
||||||
ccconfig.plot_list_selectedMetrics
|
ccconfig.metricConfig_jobListMetrics
|
||||||
: ccconfig.plot_list_selectedMetrics
|
: ccconfig.metricConfig_jobListMetrics
|
||||||
);
|
);
|
||||||
let showFootprint = $state(filterPresets.cluster
|
let showFootprint = $state(filterPresets.cluster
|
||||||
? !!ccconfig[`plot_list_showFootprint:${filterPresets.cluster}`]
|
? !!ccconfig[`jobList_showFootprint:${filterPresets.cluster}`]
|
||||||
: !!ccconfig.plot_list_showFootprint
|
: !!ccconfig.jobList_showFootprint
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
bind:showFootprint
|
bind:showFootprint
|
||||||
presetMetrics={metrics}
|
presetMetrics={metrics}
|
||||||
cluster={selectedCluster}
|
cluster={selectedCluster}
|
||||||
configName="plot_list_selectedMetrics"
|
configName="metricConfig_jobListMetrics"
|
||||||
footprintSelect
|
footprintSelect
|
||||||
applyMetrics={(newMetrics) =>
|
applyMetrics={(newMetrics) =>
|
||||||
metrics = [...newMetrics]
|
metrics = [...newMetrics]
|
||||||
|
|||||||
@@ -247,7 +247,7 @@
|
|||||||
),
|
),
|
||||||
}))
|
}))
|
||||||
.sort((a, b) => a.name.localeCompare(b.name))}
|
.sort((a, b) => a.name.localeCompare(b.name))}
|
||||||
itemsPerRow={ccconfig.plot_view_plotsPerRow}
|
itemsPerRow={ccconfig.plotConfiguration_plotsPerRow}
|
||||||
{gridContent}
|
{gridContent}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
/*Const Init */
|
/*Const Init */
|
||||||
const useCbColors = getContext("cc-config")?.plot_general_colorblindMode || false
|
const useCbColors = getContext("cc-config")?.plotConfiguration_colorblindMode || false
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
Icon,
|
Icon,
|
||||||
Button,
|
Button,
|
||||||
} from "@sveltestrap/sveltestrap";
|
} from "@sveltestrap/sveltestrap";
|
||||||
|
import {
|
||||||
|
gql,
|
||||||
|
mutationStore,
|
||||||
|
} from "@urql/svelte";
|
||||||
|
|
||||||
import { init } from "./generic/utils.js";
|
import { init } from "./generic/utils.js";
|
||||||
import NodeOverview from "./systems/NodeOverview.svelte";
|
import NodeOverview from "./systems/NodeOverview.svelte";
|
||||||
@@ -65,20 +69,28 @@
|
|||||||
let hostnameFilter = $state("");
|
let hostnameFilter = $state("");
|
||||||
let pendingHostnameFilter = $state("");
|
let pendingHostnameFilter = $state("");
|
||||||
let isMetricsSelectionOpen = $state(false);
|
let isMetricsSelectionOpen = $state(false);
|
||||||
let selectedMetric = $state(ccconfig.system_view_selectedMetric || "");
|
|
||||||
let selectedMetrics = $state((
|
|
||||||
ccconfig[`node_list_selectedMetrics:${cluster}:${subCluster}`] ||
|
|
||||||
ccconfig[`node_list_selectedMetrics:${cluster}`]
|
|
||||||
) || [ccconfig.system_view_selectedMetric]);
|
|
||||||
|
|
||||||
/* Derived States */
|
/* Derived States */
|
||||||
const systemMetrics = $derived($initialized ? [...globalMetrics.filter((gm) => gm?.availability.find((av) => av.cluster == cluster))] : []);
|
const systemMetrics = $derived($initialized ? [...globalMetrics.filter((gm) => gm?.availability.find((av) => av.cluster == cluster))] : []);
|
||||||
const presetSystemUnits = $derived(loadUnits(systemMetrics));
|
const presetSystemUnits = $derived(loadUnits(systemMetrics));
|
||||||
|
let selectedMetric = $derived((
|
||||||
|
ccconfig[`nodeOverview_selectedMetric:${cluster}:${subCluster}`] ||
|
||||||
|
ccconfig[`nodeOverview_selectedMetric:${cluster}`]
|
||||||
|
) ||
|
||||||
|
systemMetrics ? systemMetrics[0] : ""
|
||||||
|
);
|
||||||
|
let selectedMetrics = $derived((
|
||||||
|
ccconfig[`nodeList_selectedMetrics:${cluster}:${subCluster}`] ||
|
||||||
|
ccconfig[`nodeList_selectedMetrics:${cluster}`]
|
||||||
|
) ||
|
||||||
|
systemMetrics ? [systemMetrics[0], systemMetrics[1], systemMetrics[2]] : []
|
||||||
|
);
|
||||||
|
|
||||||
/* Effects */
|
/* Effects */
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
// OnMount: Ping Var, without this, OVERVIEW metric select is empty (reason tbd)
|
// OnMount: Ping Var, without this, OVERVIEW metric select is empty (reason tbd)
|
||||||
systemMetrics
|
// systemMetrics
|
||||||
|
updateOverviewMetric(selectedMetric)
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
@@ -99,6 +111,37 @@
|
|||||||
hostnameFilter = pendingHostnameFilter;
|
hostnameFilter = pendingHostnameFilter;
|
||||||
}, 500);
|
}, 500);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function updateOverviewMetric(newMetric) {
|
||||||
|
let configKey;
|
||||||
|
if (subCluster) {
|
||||||
|
configKey = `nodeOverview_selectedMetric:${cluster}:${subCluster}`;
|
||||||
|
} else {
|
||||||
|
configKey = `nodeOverview_selectedMetric:${cluster}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateConfigurationMutation({
|
||||||
|
name: configKey,
|
||||||
|
value: newMetric,
|
||||||
|
}).subscribe((res) => {
|
||||||
|
if (res.fetching === false && res.error) {
|
||||||
|
throw res.error;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const updateConfigurationMutation = ({ name, value }) => {
|
||||||
|
return mutationStore({
|
||||||
|
client: client,
|
||||||
|
query: gql`
|
||||||
|
mutation ($name: String!, $value: String!) {
|
||||||
|
updateConfiguration(name: $name, value: $value)
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
variables: { name, value },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- ROW1: Tools-->
|
<!-- ROW1: Tools-->
|
||||||
@@ -213,7 +256,7 @@
|
|||||||
presetMetrics={selectedMetrics}
|
presetMetrics={selectedMetrics}
|
||||||
{cluster}
|
{cluster}
|
||||||
{subCluster}
|
{subCluster}
|
||||||
configName="node_list_selectedMetrics"
|
configName="nodeList_selectedMetrics"
|
||||||
applyMetrics={(newMetrics) =>
|
applyMetrics={(newMetrics) =>
|
||||||
selectedMetrics = [...newMetrics]
|
selectedMetrics = [...newMetrics]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,15 +65,15 @@
|
|||||||
let isMetricsSelectionOpen = $state(false);
|
let isMetricsSelectionOpen = $state(false);
|
||||||
let sorting = $state({ field: "startTime", type: "col", order: "DESC" });
|
let sorting = $state({ field: "startTime", type: "col", order: "DESC" });
|
||||||
let selectedCluster = $state(filterPresets?.cluster ? filterPresets.cluster : null);
|
let selectedCluster = $state(filterPresets?.cluster ? filterPresets.cluster : null);
|
||||||
let selectedHistogramsBuffer = $state({ all: (ccconfig['user_view_histogramMetrics'] || []) })
|
let selectedHistogramsBuffer = $state({ all: (ccconfig['userView_histogramMetrics'] || []) })
|
||||||
let metrics = $state(filterPresets.cluster
|
let metrics = $state(filterPresets.cluster
|
||||||
? ccconfig[`plot_list_selectedMetrics:${filterPresets.cluster}`] ||
|
? ccconfig[`metricConfig_jobListMetrics:${filterPresets.cluster}`] ||
|
||||||
ccconfig.plot_list_selectedMetrics
|
ccconfig.metricConfig_jobListMetrics
|
||||||
: ccconfig.plot_list_selectedMetrics
|
: ccconfig.metricConfig_jobListMetrics
|
||||||
);
|
);
|
||||||
let showFootprint = $state(filterPresets.cluster
|
let showFootprint = $state(filterPresets.cluster
|
||||||
? !!ccconfig[`plot_list_showFootprint:${filterPresets.cluster}`]
|
? !!ccconfig[`jobList_showFootprint:${filterPresets.cluster}`]
|
||||||
: !!ccconfig.plot_list_showFootprint
|
: !!ccconfig.jobList_showFootprint
|
||||||
);
|
);
|
||||||
|
|
||||||
// Histogram Vars
|
// Histogram Vars
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
/* Effect */
|
/* Effect */
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (!selectedHistogramsBuffer[selectedCluster]) {
|
if (!selectedHistogramsBuffer[selectedCluster]) {
|
||||||
selectedHistogramsBuffer[selectedCluster] = ccconfig[`user_view_histogramMetrics:${selectedCluster}`];
|
selectedHistogramsBuffer[selectedCluster] = ccconfig[`userView_histogramMetrics:${selectedCluster}`];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
filterComponent.updateFilters();
|
filterComponent.updateFilters();
|
||||||
// Why? -> `$derived(ccconfig[$cluster])` only loads array from last Backend-Query if $cluster changed reactively (without reload)
|
// Why? -> `$derived(ccconfig[$cluster])` only loads array from last Backend-Query if $cluster changed reactively (without reload)
|
||||||
if (filterPresets?.cluster) {
|
if (filterPresets?.cluster) {
|
||||||
selectedHistogramsBuffer[filterPresets.cluster] = ccconfig[`user_view_histogramMetrics:${filterPresets.cluster}`];
|
selectedHistogramsBuffer[filterPresets.cluster] = ccconfig[`userView_histogramMetrics:${filterPresets.cluster}`];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -393,7 +393,7 @@
|
|||||||
bind:showFootprint
|
bind:showFootprint
|
||||||
presetMetrics={metrics}
|
presetMetrics={metrics}
|
||||||
cluster={selectedCluster}
|
cluster={selectedCluster}
|
||||||
configName="plot_list_selectedMetrics"
|
configName="metricConfig_jobListMetrics"
|
||||||
footprintSelect
|
footprintSelect
|
||||||
applyMetrics={(newMetrics) =>
|
applyMetrics={(newMetrics) =>
|
||||||
metrics = [...newMetrics]
|
metrics = [...newMetrics]
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
cluster={selectedCluster}
|
cluster={selectedCluster}
|
||||||
bind:isOpen={isHistogramSelectionOpen}
|
bind:isOpen={isHistogramSelectionOpen}
|
||||||
presetSelectedHistograms={selectedHistograms}
|
presetSelectedHistograms={selectedHistograms}
|
||||||
configName="user_view_histogramMetrics"
|
configName="userView_histogramMetrics"
|
||||||
applyChange={(newSelection) => {
|
applyChange={(newSelection) => {
|
||||||
selectedHistogramsBuffer[selectedCluster || 'all'] = [...newSelection];
|
selectedHistogramsBuffer[selectedCluster || 'all'] = [...newSelection];
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
value={metric}
|
value={metric}
|
||||||
onchange={() => {
|
onchange={() => {
|
||||||
updateConfiguration({
|
updateConfiguration({
|
||||||
name: "analysis_view_histogramMetrics",
|
name: "analysisView_histogramMetrics",
|
||||||
value: metricsInHistograms,
|
value: metricsInHistograms,
|
||||||
});
|
});
|
||||||
applyHistograms(metricsInHistograms);
|
applyHistograms(metricsInHistograms);
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
(p) => pair != p,
|
(p) => pair != p,
|
||||||
);
|
);
|
||||||
updateConfiguration({
|
updateConfiguration({
|
||||||
name: "analysis_view_scatterPlotMetrics",
|
name: "analysisView_scatterPlotMetrics",
|
||||||
value: metricsInScatterplots,
|
value: metricsInScatterplots,
|
||||||
});
|
});
|
||||||
applyScatter(metricsInScatterplots);
|
applyScatter(metricsInScatterplots);
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
selectedMetric1 = null;
|
selectedMetric1 = null;
|
||||||
selectedMetric2 = null;
|
selectedMetric2 = null;
|
||||||
updateConfiguration({
|
updateConfiguration({
|
||||||
name: "analysis_view_scatterPlotMetrics",
|
name: "analysisView_scatterPlotMetrics",
|
||||||
value: metricsInScatterplots,
|
value: metricsInScatterplots,
|
||||||
});
|
});
|
||||||
applyScatter(metricsInScatterplots);
|
applyScatter(metricsInScatterplots);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
/* State Init */
|
/* State Init */
|
||||||
let message = $state({ msg: "", target: "", color: "#d63384" });
|
let message = $state({ msg: "", target: "", color: "#d63384" });
|
||||||
let displayMessage = $state(false);
|
let displayMessage = $state(false);
|
||||||
let cbmode = $state(ccconfig?.plot_general_colorblindMode || false);
|
let cbmode = $state(ccconfig?.plotConfiguration_colorblindMode || false);
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
async function handleSettingSubmit(event, setting) {
|
async function handleSettingSubmit(event, setting) {
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
const res = await fetch(form.action, { method: "POST", body: formData });
|
const res = await fetch(form.action, { method: "POST", body: formData });
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
let text = await res.text();
|
let text = await res.text();
|
||||||
if (formData.get("key") === "plot_general_colorblindMode") {
|
if (formData.get("key") === "plotConfiguration_colorblindMode") {
|
||||||
cbmode = JSON.parse(formData.get("value"));
|
cbmode = JSON.parse(formData.get("value"));
|
||||||
}
|
}
|
||||||
popMessage(text, target, "#048109");
|
popMessage(text, target, "#048109");
|
||||||
|
|||||||
@@ -69,10 +69,10 @@
|
|||||||
method="post"
|
method="post"
|
||||||
action="/frontend/configuration/"
|
action="/frontend/configuration/"
|
||||||
onsubmit={(e) => handleSettingSubmit(e, "#node-paging-form", "npag")}>
|
onsubmit={(e) => handleSettingSubmit(e, "#node-paging-form", "npag")}>
|
||||||
<input type="hidden" name="key" value="node_list_usePaging" />
|
<input type="hidden" name="key" value="nodeList_usePaging" />
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div>
|
<div>
|
||||||
{#if config?.node_list_usePaging}
|
{#if config?.nodeList_usePaging}
|
||||||
<input type="radio" id="nodes-true-checked" name="value" value="true" checked />
|
<input type="radio" id="nodes-true-checked" name="value" value="true" checked />
|
||||||
{:else}
|
{:else}
|
||||||
<input type="radio" id="nodes-true" name="value" value="true" />
|
<input type="radio" id="nodes-true" name="value" value="true" />
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<label for="nodes-true">Paging with selectable count of nodes.</label>
|
<label for="nodes-true">Paging with selectable count of nodes.</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{#if config?.node_list_usePaging}
|
{#if config?.nodeList_usePaging}
|
||||||
<input type="radio" id="nodes-false" name="value" value="false" />
|
<input type="radio" id="nodes-false" name="value" value="false" />
|
||||||
{:else}
|
{:else}
|
||||||
<input type="radio" id="nodes-false-checked" name="value" value="false" checked />
|
<input type="radio" id="nodes-false-checked" name="value" value="false" checked />
|
||||||
|
|||||||
@@ -29,10 +29,10 @@
|
|||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
/* State Init */
|
/* State Init */
|
||||||
let activeRow = $state(JSON.stringify(config?.plot_general_colorscheme));
|
let activeRow = $state(JSON.stringify(config?.plotConfiguration_colorScheme));
|
||||||
|
|
||||||
/* Const Init */
|
/* Const Init */
|
||||||
const colorschemes = {
|
const colorSchemes = {
|
||||||
Default: [
|
Default: [
|
||||||
"#00bfff",
|
"#00bfff",
|
||||||
"#0000ff",
|
"#0000ff",
|
||||||
@@ -266,7 +266,7 @@
|
|||||||
|
|
||||||
// https://personal.sron.nl/~pault/
|
// https://personal.sron.nl/~pault/
|
||||||
// https://tsitsul.in/blog/coloropt/
|
// https://tsitsul.in/blog/coloropt/
|
||||||
const cvdschemes = {
|
const cvdSchemes = {
|
||||||
HighContrast: [
|
HighContrast: [
|
||||||
"rgb(221,170,51)",
|
"rgb(221,170,51)",
|
||||||
"rgb(187,85,102)",
|
"rgb(187,85,102)",
|
||||||
@@ -344,11 +344,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<input type="hidden" name="key" value="plot_general_colorscheme" />
|
<input type="hidden" name="key" value="plotConfiguration_colorScheme" />
|
||||||
<Table hover>
|
<Table hover>
|
||||||
<tbody>
|
<tbody>
|
||||||
{#key activeRow}
|
{#key activeRow}
|
||||||
{#each Object.entries(cbmode ? cvdschemes : colorschemes) as [name, rgbrow]}
|
{#each Object.entries(cbmode ? cvdSchemes : colorSchemes) as [name, rgbrow]}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">{name}</th>
|
<th scope="col">{name}</th>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<input type="hidden" name="key" value="plot_general_lineWidth" />
|
<input type="hidden" name="key" value="plotConfiguration_lineWidth" />
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="value" class="form-label">Line Width</label>
|
<label for="value" class="form-label">Line Width</label>
|
||||||
<input
|
<input
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
id="lwvalue"
|
id="lwvalue"
|
||||||
name="value"
|
name="value"
|
||||||
aria-describedby="lineWidthHelp"
|
aria-describedby="lineWidthHelp"
|
||||||
value={config.plot_general_lineWidth}
|
value={config.plotConfiguration_lineWidth}
|
||||||
min="1"
|
min="1"
|
||||||
/>
|
/>
|
||||||
<div id="lineWidthHelp" class="form-text">
|
<div id="lineWidthHelp" class="form-text">
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<input type="hidden" name="key" value="plot_view_plotsPerRow" />
|
<input type="hidden" name="key" value="plotConfiguration_plotsPerRow" />
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="value" class="form-label">Plots per Row</label>
|
<label for="value" class="form-label">Plots per Row</label>
|
||||||
<input
|
<input
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
id="pprvalue"
|
id="pprvalue"
|
||||||
name="value"
|
name="value"
|
||||||
aria-describedby="plotsperrowHelp"
|
aria-describedby="plotsperrowHelp"
|
||||||
value={config.plot_view_plotsPerRow}
|
value={config.plotConfiguration_plotsPerRow}
|
||||||
min="1"
|
min="1"
|
||||||
/>
|
/>
|
||||||
<div id="plotsperrowHelp" class="form-text">
|
<div id="plotsperrowHelp" class="form-text">
|
||||||
@@ -150,10 +150,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<input type="hidden" name="key" value="plot_general_colorBackground" />
|
<input type="hidden" name="key" value="plotConfiguration_colorBackground" />
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div>
|
<div>
|
||||||
{#if config.plot_general_colorBackground}
|
{#if config.plotConfiguration_colorBackground}
|
||||||
<input type="radio" id="colb-true-checked" name="value" value="true" checked />
|
<input type="radio" id="colb-true-checked" name="value" value="true" checked />
|
||||||
{:else}
|
{:else}
|
||||||
<input type="radio" id="colb-true" name="value" value="true" />
|
<input type="radio" id="colb-true" name="value" value="true" />
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
<label for="true">Yes</label>
|
<label for="true">Yes</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{#if config.plot_general_colorBackground}
|
{#if config.plotConfiguration_colorBackground}
|
||||||
<input type="radio" id="colb-false" name="value" value="false" />
|
<input type="radio" id="colb-false" name="value" value="false" />
|
||||||
{:else}
|
{:else}
|
||||||
<input type="radio" id="colb-false-checked" name="value" value="false" checked />
|
<input type="radio" id="colb-false-checked" name="value" value="false" checked />
|
||||||
@@ -196,10 +196,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<input type="hidden" name="key" value="plot_general_colorblindMode" />
|
<input type="hidden" name="key" value="plotConfiguration_colorblindMode" />
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div>
|
<div>
|
||||||
{#if config?.plot_general_colorblindMode}
|
{#if config?.plotConfiguration_colorblindMode}
|
||||||
<input type="radio" id="cbm-true-checked" name="value" value="true" checked />
|
<input type="radio" id="cbm-true-checked" name="value" value="true" checked />
|
||||||
{:else}
|
{:else}
|
||||||
<input type="radio" id="cbm-true" name="value" value="true" />
|
<input type="radio" id="cbm-true" name="value" value="true" />
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
<label for="true">Yes</label>
|
<label for="true">Yes</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{#if config?.plot_general_colorblindMode}
|
{#if config?.plotConfiguration_colorblindMode}
|
||||||
<input type="radio" id="cbm-false" name="value" value="false" />
|
<input type="radio" id="cbm-false" name="value" value="false" />
|
||||||
{:else}
|
{:else}
|
||||||
<input type="radio" id="cbm-false-checked" name="value" value="false" checked />
|
<input type="radio" id="cbm-false-checked" name="value" value="false" checked />
|
||||||
|
|||||||
@@ -104,10 +104,10 @@
|
|||||||
>
|
>
|
||||||
</div>{/if}
|
</div>{/if}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<input type="hidden" name="key" value="job_list_usePaging" />
|
<input type="hidden" name="key" value="jobList_usePaging" />
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div>
|
<div>
|
||||||
{#if config?.job_list_usePaging}
|
{#if config?.jobList_usePaging}
|
||||||
<input type="radio" id="true-checked" name="value" value="true" checked />
|
<input type="radio" id="true-checked" name="value" value="true" checked />
|
||||||
{:else}
|
{:else}
|
||||||
<input type="radio" id="true" name="value" value="true" />
|
<input type="radio" id="true" name="value" value="true" />
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
<label for="true">Paging with selectable count of jobs.</label>
|
<label for="true">Paging with selectable count of jobs.</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{#if config?.job_list_usePaging}
|
{#if config?.jobList_usePaging}
|
||||||
<input type="radio" id="false" name="value" value="false" />
|
<input type="radio" id="false" name="value" value="false" />
|
||||||
{:else}
|
{:else}
|
||||||
<input type="radio" id="false-checked" name="value" value="false" checked />
|
<input type="radio" id="false-checked" name="value" value="false" checked />
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
/* Svelte 5 Props */
|
/* Svelte 5 Props */
|
||||||
let {
|
let {
|
||||||
matchedCompareJobs = $bindable(0),
|
matchedCompareJobs = $bindable(0),
|
||||||
metrics = getContext("cc-config")?.plot_list_selectedMetrics,
|
metrics = getContext("cc-config")?.metricConfig_jobListMetrics,
|
||||||
filterBuffer = [],
|
filterBuffer = [],
|
||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
// (Re-)query and optionally set new filters; Query will be started reactively.
|
// (Re-)query and optionally set new filters; Query will be started reactively.
|
||||||
export function queryJobs(filters) {
|
export function queryJobs(filters) {
|
||||||
if (filters != null) {
|
if (filters != null) {
|
||||||
let minRunningFor = ccconfig.plot_list_hideShortRunningJobs;
|
let minRunningFor = ccconfig.jobList_hideShortRunningJobs;
|
||||||
if (minRunningFor && minRunningFor > 0) {
|
if (minRunningFor && minRunningFor > 0) {
|
||||||
filters.push({ minRunningFor });
|
filters.push({ minRunningFor });
|
||||||
}
|
}
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
|
|
||||||
// function updateConfiguration(value, page) {
|
// function updateConfiguration(value, page) {
|
||||||
// updateConfigurationMutation({
|
// updateConfigurationMutation({
|
||||||
// name: "plot_list_jobsPerPage",
|
// name: "jobList_jobsPerPage",
|
||||||
// value: value,
|
// value: value,
|
||||||
// }).subscribe((res) => {
|
// }).subscribe((res) => {
|
||||||
// if (res.fetching === false && !res.error) {
|
// if (res.fetching === false && !res.error) {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
let {
|
let {
|
||||||
matchedListJobs = $bindable(0),
|
matchedListJobs = $bindable(0),
|
||||||
selectedJobs = $bindable([]),
|
selectedJobs = $bindable([]),
|
||||||
metrics = getContext("cc-config").plot_list_selectedMetrics,
|
metrics = getContext("cc-config").metricConfig_jobListMetrics,
|
||||||
sorting = { field: "startTime", type: "col", order: "DESC" },
|
sorting = { field: "startTime", type: "col", order: "DESC" },
|
||||||
showFootprint = false,
|
showFootprint = false,
|
||||||
filterBuffer = [],
|
filterBuffer = [],
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
const ccconfig = getContext("cc-config");
|
const ccconfig = getContext("cc-config");
|
||||||
const initialized = getContext("initialized");
|
const initialized = getContext("initialized");
|
||||||
const globalMetrics = getContext("globalMetrics");
|
const globalMetrics = getContext("globalMetrics");
|
||||||
const usePaging = ccconfig?.job_list_usePaging || false;
|
const usePaging = ccconfig?.jobList_usePaging || false;
|
||||||
const jobInfoColumnWidth = 250;
|
const jobInfoColumnWidth = 250;
|
||||||
const client = getContextClient();
|
const client = getContextClient();
|
||||||
const query = gql`
|
const query = gql`
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
let jobs = $state([]);
|
let jobs = $state([]);
|
||||||
let filter = $state([...filterBuffer]);
|
let filter = $state([...filterBuffer]);
|
||||||
let page = $state(1);
|
let page = $state(1);
|
||||||
let itemsPerPage = $state(usePaging ? (ccconfig?.plot_list_jobsPerPage || 10) : 10);
|
let itemsPerPage = $state(usePaging ? (ccconfig?.jobList_jobsPerPage || 10) : 10);
|
||||||
let triggerMetricRefresh = $state(false);
|
let triggerMetricRefresh = $state(false);
|
||||||
let tableWidth = $state(0);
|
let tableWidth = $state(0);
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
// (Re-)query and optionally set new filters; Query will be started reactively.
|
// (Re-)query and optionally set new filters; Query will be started reactively.
|
||||||
export function queryJobs(filters) {
|
export function queryJobs(filters) {
|
||||||
if (filters != null) {
|
if (filters != null) {
|
||||||
let minRunningFor = ccconfig.plot_list_hideShortRunningJobs;
|
let minRunningFor = ccconfig.jobList_hideShortRunningJobs;
|
||||||
if (minRunningFor && minRunningFor > 0) {
|
if (minRunningFor && minRunningFor > 0) {
|
||||||
filters.push({ minRunningFor });
|
filters.push({ minRunningFor });
|
||||||
}
|
}
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
|
|
||||||
function updateConfiguration(value, newPage) {
|
function updateConfiguration(value, newPage) {
|
||||||
updateConfigurationMutation({
|
updateConfigurationMutation({
|
||||||
name: "plot_list_jobsPerPage",
|
name: "jobList_jobsPerPage",
|
||||||
value: value.toString(),
|
value: value.toString(),
|
||||||
}).subscribe((res) => {
|
}).subscribe((res) => {
|
||||||
if (res.fetching === false && !res.error) {
|
if (res.fetching === false && !res.error) {
|
||||||
@@ -236,10 +236,6 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const equalsCheck = (a, b) => {
|
|
||||||
return JSON.stringify(a) === JSON.stringify(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Init Header */
|
/* Init Header */
|
||||||
stickyHeader(
|
stickyHeader(
|
||||||
".cc-table-wrapper > table.table >thead > tr > th.position-sticky:nth-child(1)",
|
".cc-table-wrapper > table.table >thead > tr > th.position-sticky:nth-child(1)",
|
||||||
|
|||||||
@@ -44,8 +44,8 @@
|
|||||||
|
|
||||||
/* Const Init */
|
/* Const Init */
|
||||||
const clusterCockpitConfig = getContext("cc-config");
|
const clusterCockpitConfig = getContext("cc-config");
|
||||||
const lineWidth = clusterCockpitConfig?.plot_general_lineWidth / window.devicePixelRatio || 2;
|
const lineWidth = clusterCockpitConfig?.plotConfiguration_lineWidth / window.devicePixelRatio || 2;
|
||||||
const cbmode = clusterCockpitConfig?.plot_general_colorblindMode || false;
|
const cbmode = clusterCockpitConfig?.plotConfiguration_colorblindMode || false;
|
||||||
|
|
||||||
// UPLOT SERIES INIT //
|
// UPLOT SERIES INIT //
|
||||||
const plotSeries = [
|
const plotSeries = [
|
||||||
|
|||||||
@@ -56,9 +56,9 @@
|
|||||||
const resampleConfig = getContext("resampling");
|
const resampleConfig = getContext("resampling");
|
||||||
const subClusterTopology = getContext("getHardwareTopology")(cluster, subCluster);
|
const subClusterTopology = getContext("getHardwareTopology")(cluster, subCluster);
|
||||||
const metricConfig = getContext("getMetricConfig")(cluster, subCluster, metric);
|
const metricConfig = getContext("getMetricConfig")(cluster, subCluster, metric);
|
||||||
const lineWidth = clusterCockpitConfig?.plot_general_lineWidth / window.devicePixelRatio || 2;
|
const lineColors = clusterCockpitConfig.plotConfiguration_colorScheme;
|
||||||
const lineColors = clusterCockpitConfig?.plot_general_colorscheme || ["#00bfff","#0000ff","#ff00ff","#ff0000","#ff8000","#ffff00","#80ff00"];
|
const lineWidth = clusterCockpitConfig.plotConfiguration_lineWidth / window.devicePixelRatio;
|
||||||
const cbmode = clusterCockpitConfig?.plot_general_colorblindMode || false;
|
const cbmode = clusterCockpitConfig?.plotConfiguration_colorblindMode || false;
|
||||||
const renderSleepTime = 200;
|
const renderSleepTime = 200;
|
||||||
const normalLineColor = "#000000";
|
const normalLineColor = "#000000";
|
||||||
const backgroundColors = {
|
const backgroundColors = {
|
||||||
@@ -416,7 +416,7 @@
|
|||||||
// RETURN BG COLOR FROM THRESHOLD
|
// RETURN BG COLOR FROM THRESHOLD
|
||||||
function backgroundColor() {
|
function backgroundColor() {
|
||||||
if (
|
if (
|
||||||
clusterCockpitConfig.plot_general_colorBackground == false ||
|
clusterCockpitConfig.plotConfiguration_colorBackground == false ||
|
||||||
!thresholds ||
|
!thresholds ||
|
||||||
!(series && series.every((s) => s.statistics != null))
|
!(series && series.every((s) => s.statistics != null))
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
/* Const Init */
|
/* Const Init */
|
||||||
const useCbColors = getContext("cc-config")?.plot_general_colorblindMode || false
|
const useCbColors = getContext("cc-config")?.plotConfiguration_colorblindMode || false
|
||||||
const options = {
|
const options = {
|
||||||
maintainAspectRatio: false,
|
maintainAspectRatio: false,
|
||||||
animation: false,
|
animation: false,
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
/* Const Init */
|
/* Const Init */
|
||||||
const lineWidth = clusterCockpitConfig?.plot_general_lineWidth || 2;
|
const lineWidth = clusterCockpitConfig.plotConfiguration_lineWidth;
|
||||||
const cbmode = clusterCockpitConfig?.plot_general_colorblindMode || false;
|
const cbmode = clusterCockpitConfig?.plotConfiguration_colorblindMode || false;
|
||||||
|
|
||||||
/* Var Init */
|
/* Var Init */
|
||||||
let timeoutId = null;
|
let timeoutId = null;
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
/* Const Init */
|
/* Const Init */
|
||||||
const lineWidth = clusterCockpitConfig?.plot_general_lineWidth || 2;
|
const lineWidth = clusterCockpitConfig.plotConfiguration_lineWidth;
|
||||||
const cbmode = clusterCockpitConfig?.plot_general_colorblindMode || false;
|
const cbmode = clusterCockpitConfig?.plotConfiguration_colorblindMode || false;
|
||||||
|
|
||||||
/* Var Init */
|
/* Var Init */
|
||||||
let timeoutId = null;
|
let timeoutId = null;
|
||||||
|
|||||||
@@ -151,8 +151,8 @@
|
|||||||
updateConfigurationMutation({
|
updateConfigurationMutation({
|
||||||
name:
|
name:
|
||||||
!cluster
|
!cluster
|
||||||
? "plot_list_showFootprint"
|
? "jobList_showFootprint"
|
||||||
: `plot_list_showFootprint:${cluster}`,
|
: `jobList_showFootprint:${cluster}`,
|
||||||
value: JSON.stringify(showFootprint),
|
value: JSON.stringify(showFootprint),
|
||||||
}).subscribe((res) => {
|
}).subscribe((res) => {
|
||||||
if (res.fetching === false && res.error) {
|
if (res.fetching === false && res.error) {
|
||||||
|
|||||||
@@ -51,4 +51,8 @@ export function formatTime(t, forNode = false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// const equalsCheck = (a, b) => {
|
||||||
|
// return JSON.stringify(a) === JSON.stringify(b);
|
||||||
|
// }
|
||||||
|
|
||||||
// export const dateToUnixEpoch = (rfc3339) => Math.floor(Date.parse(rfc3339) / 1000);
|
// export const dateToUnixEpoch = (rfc3339) => Math.floor(Date.parse(rfc3339) / 1000);
|
||||||
|
|||||||
@@ -25,20 +25,23 @@
|
|||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
/* Const Init */
|
/* Const Init */
|
||||||
const showFootprintTab = !!getContext("cc-config")[`job_view_showFootprint`];
|
const showFootprintTab = !!getContext("cc-config")[`jobView_showFootprint`];
|
||||||
|
const showPolarTab = !!getContext("cc-config")[`jobView_showPolarPlot`];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Card class="overflow-auto" style="width: {width}; height: {height}">
|
<Card class="overflow-auto" style="width: {width}; height: {height}">
|
||||||
<TabContent>
|
<TabContent>
|
||||||
{#if showFootprintTab}
|
{#if showFootprintTab}
|
||||||
<TabPane tabId="foot" tab="Footprint" active>
|
<TabPane tabId="foot" tab="Footprint" active={showFootprintTab}>
|
||||||
<!-- Bars CardBody Here-->
|
<!-- Bars CardBody Here-->
|
||||||
<JobFootprintBars {job} />
|
<JobFootprintBars {job} />
|
||||||
</TabPane>
|
</TabPane>
|
||||||
{/if}
|
{/if}
|
||||||
<TabPane tabId="polar" tab="Polar" active={!showFootprintTab}>
|
{#if showPolarTab}
|
||||||
<!-- Polar Plot CardBody Here -->
|
<TabPane tabId="polar" tab="Polar" active={showPolarTab && !showFootprintTab}>
|
||||||
<JobFootprintPolar {job} />
|
<!-- Polar Plot CardBody Here -->
|
||||||
</TabPane>
|
<JobFootprintPolar {job} />
|
||||||
|
</TabPane>
|
||||||
|
{/if}
|
||||||
</TabContent>
|
</TabContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -81,9 +81,9 @@
|
|||||||
if (!job) return;
|
if (!job) return;
|
||||||
|
|
||||||
const pendingMetrics = (
|
const pendingMetrics = (
|
||||||
getContext("cc-config")[`job_view_nodestats_selectedMetrics:${job.cluster}:${job.subCluster}`] ||
|
getContext("cc-config")[`metricConfig_jobViewTableMetrics:${job.cluster}:${job.subCluster}`] ||
|
||||||
getContext("cc-config")[`job_view_nodestats_selectedMetrics:${job.cluster}`]
|
getContext("cc-config")[`metricConfig_jobViewTableMetrics:${job.cluster}`]
|
||||||
) || getContext("cc-config")["job_view_nodestats_selectedMetrics"];
|
) || getContext("cc-config")["metricConfig_jobViewTableMetrics"];
|
||||||
|
|
||||||
// Select default Scopes to load: Check before if any metric has accelerator scope by default
|
// Select default Scopes to load: Check before if any metric has accelerator scope by default
|
||||||
const accScopeDefault = [...pendingMetrics].some(function (m) {
|
const accScopeDefault = [...pendingMetrics].some(function (m) {
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
presetMetrics={selectedMetrics}
|
presetMetrics={selectedMetrics}
|
||||||
cluster={job.cluster}
|
cluster={job.cluster}
|
||||||
subCluster={job.subCluster}
|
subCluster={job.subCluster}
|
||||||
configName="job_view_nodestats_selectedMetrics"
|
configName="metricConfig_jobViewTableMetrics"
|
||||||
preInitialized
|
preInitialized
|
||||||
applyMetrics={(newMetrics) =>
|
applyMetrics={(newMetrics) =>
|
||||||
selectedMetrics = [...newMetrics]
|
selectedMetrics = [...newMetrics]
|
||||||
|
|||||||
@@ -48,8 +48,8 @@
|
|||||||
|
|
||||||
/* Derived */
|
/* Derived */
|
||||||
let selectedHistograms = $derived(cluster
|
let selectedHistograms = $derived(cluster
|
||||||
? ccconfig[`status_view_selectedHistograms:${cluster}`] || ( ccconfig['status_view_selectedHistograms'] || [] )
|
? ccconfig[`statusView_selectedHistograms:${cluster}`] || ( ccconfig['statusView_selectedHistograms'] || [] )
|
||||||
: ccconfig['status_view_selectedHistograms'] || []);
|
: ccconfig['statusView_selectedHistograms'] || []);
|
||||||
|
|
||||||
// Note: nodeMetrics are requested on configured $timestep resolution
|
// Note: nodeMetrics are requested on configured $timestep resolution
|
||||||
const metricStatusQuery = $derived(queryStore({
|
const metricStatusQuery = $derived(queryStore({
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
{cluster}
|
{cluster}
|
||||||
bind:isOpen={isHistogramSelectionOpen}
|
bind:isOpen={isHistogramSelectionOpen}
|
||||||
presetSelectedHistograms={selectedHistograms}
|
presetSelectedHistograms={selectedHistograms}
|
||||||
configName="status_view_selectedHistograms"
|
configName="statusView_selectedHistograms"
|
||||||
applyChange={(newSelection) => {
|
applyChange={(newSelection) => {
|
||||||
selectedHistograms = [...newSelection];
|
selectedHistograms = [...newSelection];
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
/* Const Init */
|
/* Const Init */
|
||||||
const client = getContextClient();
|
const client = getContextClient();
|
||||||
const usePaging = ccconfig?.node_list_usePaging || false;
|
const usePaging = ccconfig?.nodeList_usePaging || false;
|
||||||
const nodeListQuery = gql`
|
const nodeListQuery = gql`
|
||||||
query ($cluster: String!, $subCluster: String!, $nodeFilter: String!, $metrics: [String!], $scopes: [MetricScope!]!, $from: Time!, $to: Time!, $paging: PageRequest!, $selectedResolution: Int) {
|
query ($cluster: String!, $subCluster: String!, $nodeFilter: String!, $metrics: [String!], $scopes: [MetricScope!]!, $from: Time!, $to: Time!, $paging: PageRequest!, $selectedResolution: Int) {
|
||||||
nodeMetricsList(
|
nodeMetricsList(
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
/* State Init */
|
/* State Init */
|
||||||
let nodes = $state([]);
|
let nodes = $state([]);
|
||||||
let page = $state(1);
|
let page = $state(1);
|
||||||
let itemsPerPage = $state(usePaging ? (ccconfig?.plot_list_nodesPerPage || 10) : 10);
|
let itemsPerPage = $state(usePaging ? (ccconfig?.nodeList_nodesPerPage || 10) : 10);
|
||||||
let headerPaddingTop = $state(0);
|
let headerPaddingTop = $state(0);
|
||||||
let matchedNodes = $state(0);
|
let matchedNodes = $state(0);
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
// Decouple from Job List Paging Params?
|
// Decouple from Job List Paging Params?
|
||||||
function updateConfiguration(newItems, newPage) {
|
function updateConfiguration(newItems, newPage) {
|
||||||
updateConfigurationMutation({
|
updateConfigurationMutation({
|
||||||
name: "plot_list_nodesPerPage",
|
name: "nodeList_nodesPerPage",
|
||||||
value: newItems.toString(),
|
value: newItems.toString(),
|
||||||
}).subscribe((res) => {
|
}).subscribe((res) => {
|
||||||
if (res.fetching === false && !res.error) {
|
if (res.fetching === false && !res.error) {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
</Row>
|
</Row>
|
||||||
{:else if filteredData?.length > 0}
|
{:else if filteredData?.length > 0}
|
||||||
<!-- PlotGrid flattened into this component -->
|
<!-- PlotGrid flattened into this component -->
|
||||||
<Row cols={{ xs: 1, sm: 2, md: 3, lg: ccconfig.plot_view_plotsPerRow}}>
|
<Row cols={{ xs: 1, sm: 2, md: 3, lg: ccconfig.plotConfiguration_plotsPerRow}}>
|
||||||
{#key selectedMetric}
|
{#key selectedMetric}
|
||||||
{#each filteredData as item (item.host)}
|
{#each filteredData as item (item.host)}
|
||||||
<Col class="px-1">
|
<Col class="px-1">
|
||||||
|
|||||||
15
web/web.go
15
web/web.go
@@ -109,7 +109,6 @@ var UIDefaultsMap map[string]any
|
|||||||
// "analysis_view_scatterPlotMetrics": [][]string{{"flops_any", "mem_bw"}, {"flops_any", "cpu_load"}, {"cpu_load", "mem_bw"}},
|
// "analysis_view_scatterPlotMetrics": [][]string{{"flops_any", "mem_bw"}, {"flops_any", "cpu_load"}, {"cpu_load", "mem_bw"}},
|
||||||
// "job_view_nodestats_selectedMetrics": []string{"flops_any", "mem_bw", "mem_used"},
|
// "job_view_nodestats_selectedMetrics": []string{"flops_any", "mem_bw", "mem_used"},
|
||||||
// "plot_list_jobsPerPage": 50,
|
// "plot_list_jobsPerPage": 50,
|
||||||
// "system_view_selectedMetric": "cpu_load",
|
|
||||||
// "analysis_view_selectedTopEntity": "user",
|
// "analysis_view_selectedTopEntity": "user",
|
||||||
// "analysis_view_selectedTopCategory": "totalWalltime",
|
// "analysis_view_selectedTopCategory": "totalWalltime",
|
||||||
// "status_view_selectedTopUserCategory": "totalJobs",
|
// "status_view_selectedTopUserCategory": "totalJobs",
|
||||||
@@ -129,13 +128,13 @@ func Init(rawConfig json.RawMessage) error {
|
|||||||
|
|
||||||
UIDefaultsMap = make(map[string]any)
|
UIDefaultsMap = make(map[string]any)
|
||||||
|
|
||||||
UIDefaultsMap["joblist_usePaging"] = UIDefaults.JobList.UsePaging
|
UIDefaultsMap["jobList_usePaging"] = UIDefaults.JobList.UsePaging
|
||||||
UIDefaultsMap["joblist_showFootprint"] = UIDefaults.JobList.ShowFootprint
|
UIDefaultsMap["jobList_showFootprint"] = UIDefaults.JobList.ShowFootprint
|
||||||
UIDefaultsMap["nodelist_usePaging"] = UIDefaults.NodeList.UsePaging
|
UIDefaultsMap["nodeList_usePaging"] = UIDefaults.NodeList.UsePaging
|
||||||
UIDefaultsMap["jobview_showPolarPlot"] = UIDefaults.JobView.ShowPolarPlot
|
UIDefaultsMap["jobView_showPolarPlot"] = UIDefaults.JobView.ShowPolarPlot
|
||||||
UIDefaultsMap["jobview_showFootprint"] = UIDefaults.JobView.ShowFootprint
|
UIDefaultsMap["jobView_showFootprint"] = UIDefaults.JobView.ShowFootprint
|
||||||
UIDefaultsMap["jobview_showRoofline"] = UIDefaults.JobView.ShowRoofline
|
UIDefaultsMap["jobView_showRoofline"] = UIDefaults.JobView.ShowRoofline
|
||||||
UIDefaultsMap["jobview_showStatTable"] = UIDefaults.JobView.ShowStatTable
|
UIDefaultsMap["jobView_showStatTable"] = UIDefaults.JobView.ShowStatTable
|
||||||
|
|
||||||
UIDefaultsMap["metricConfig_jobListMetrics"] = UIDefaults.MetricConfig.JobListMetrics
|
UIDefaultsMap["metricConfig_jobListMetrics"] = UIDefaults.MetricConfig.JobListMetrics
|
||||||
UIDefaultsMap["metricConfig_jobViewPlotMetrics"] = UIDefaults.MetricConfig.JobViewPlotMetrics
|
UIDefaultsMap["metricConfig_jobViewPlotMetrics"] = UIDefaults.MetricConfig.JobViewPlotMetrics
|
||||||
|
|||||||
Reference in New Issue
Block a user