mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-07 08:37:30 +01:00
svelte state_referenced_locally warning fixes
- change to derived where possible - suppress warning elsewhere - discussion here: sveltejs/svelte/issues/17289
This commit is contained in:
@@ -56,8 +56,6 @@
|
||||
/* Const Init */
|
||||
const clusterCockpitConfig = getContext("cc-config");
|
||||
const resampleConfig = getContext("resampling");
|
||||
const subClusterTopology = getContext("getHardwareTopology")(cluster, subCluster);
|
||||
const metricConfig = getContext("getMetricConfig")(cluster, subCluster, metric);
|
||||
const lineColors = clusterCockpitConfig.plotConfiguration_colorScheme;
|
||||
const lineWidth = clusterCockpitConfig.plotConfiguration_lineWidth / window.devicePixelRatio;
|
||||
const cbmode = clusterCockpitConfig?.plotConfiguration_colorblindMode || false;
|
||||
@@ -77,6 +75,8 @@
|
||||
let uplot = $state(null);
|
||||
|
||||
/* Derived */
|
||||
const subClusterTopology = $derived(getContext("getHardwareTopology")(cluster, subCluster));
|
||||
const metricConfig = $derived(getContext("getMetricConfig")(cluster, subCluster, metric));
|
||||
const usesMeanStatsSeries = $derived((statisticsSeries?.mean && statisticsSeries.mean.length != 0));
|
||||
const resampleTrigger = $derived(resampleConfig?.trigger ? Number(resampleConfig.trigger) : null);
|
||||
const resampleResolutions = $derived(resampleConfig?.resolutions ? [...resampleConfig.resolutions] : null);
|
||||
|
||||
Reference in New Issue
Block a user