mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-12-31 18:56:16 +01:00
adapt frontend for new uiConfig keys, add nodeOverview mutation
This commit is contained in:
@@ -25,20 +25,23 @@
|
||||
} = $props();
|
||||
|
||||
/* 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>
|
||||
|
||||
<Card class="overflow-auto" style="width: {width}; height: {height}">
|
||||
<TabContent>
|
||||
{#if showFootprintTab}
|
||||
<TabPane tabId="foot" tab="Footprint" active>
|
||||
<TabPane tabId="foot" tab="Footprint" active={showFootprintTab}>
|
||||
<!-- Bars CardBody Here-->
|
||||
<JobFootprintBars {job} />
|
||||
</TabPane>
|
||||
{/if}
|
||||
<TabPane tabId="polar" tab="Polar" active={!showFootprintTab}>
|
||||
<!-- Polar Plot CardBody Here -->
|
||||
<JobFootprintPolar {job} />
|
||||
</TabPane>
|
||||
{#if showPolarTab}
|
||||
<TabPane tabId="polar" tab="Polar" active={showPolarTab && !showFootprintTab}>
|
||||
<!-- Polar Plot CardBody Here -->
|
||||
<JobFootprintPolar {job} />
|
||||
</TabPane>
|
||||
{/if}
|
||||
</TabContent>
|
||||
</Card>
|
||||
|
||||
@@ -81,9 +81,9 @@
|
||||
if (!job) return;
|
||||
|
||||
const pendingMetrics = (
|
||||
getContext("cc-config")[`job_view_nodestats_selectedMetrics:${job.cluster}:${job.subCluster}`] ||
|
||||
getContext("cc-config")[`job_view_nodestats_selectedMetrics:${job.cluster}`]
|
||||
) || getContext("cc-config")["job_view_nodestats_selectedMetrics"];
|
||||
getContext("cc-config")[`metricConfig_jobViewTableMetrics:${job.cluster}:${job.subCluster}`] ||
|
||||
getContext("cc-config")[`metricConfig_jobViewTableMetrics:${job.cluster}`]
|
||||
) || getContext("cc-config")["metricConfig_jobViewTableMetrics"];
|
||||
|
||||
// Select default Scopes to load: Check before if any metric has accelerator scope by default
|
||||
const accScopeDefault = [...pendingMetrics].some(function (m) {
|
||||
@@ -152,7 +152,7 @@
|
||||
presetMetrics={selectedMetrics}
|
||||
cluster={job.cluster}
|
||||
subCluster={job.subCluster}
|
||||
configName="job_view_nodestats_selectedMetrics"
|
||||
configName="metricConfig_jobViewTableMetrics"
|
||||
preInitialized
|
||||
applyMetrics={(newMetrics) =>
|
||||
selectedMetrics = [...newMetrics]
|
||||
|
||||
Reference in New Issue
Block a user