mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-01-28 15:01:46 +01:00
Review polar plot scaling, make tabbing dependent on config
- remove polar min data
This commit is contained in:
@@ -29,19 +29,30 @@
|
||||
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={showFootprintTab}>
|
||||
<Card style="width: {width}; height: {height}">
|
||||
{#if showFootprintTab && !showPolarTab}
|
||||
<JobFootprintBars {job} />
|
||||
{:else if !showFootprintTab && showPolarTab}
|
||||
<JobFootprintPolar {job}/>
|
||||
{:else if showFootprintTab && showPolarTab}
|
||||
<TabContent>
|
||||
<TabPane tabId="foot" tab="Footprint" active>
|
||||
<!-- Bars CardBody Here-->
|
||||
<JobFootprintBars {job} />
|
||||
</TabPane>
|
||||
{/if}
|
||||
{#if showPolarTab}
|
||||
<TabPane tabId="polar" tab="Polar" active={showPolarTab && !showFootprintTab}>
|
||||
<TabPane tabId="polar" tab="Polar">
|
||||
<!-- Polar Plot CardBody Here -->
|
||||
<JobFootprintPolar {job} />
|
||||
<JobFootprintPolar {job} showLegend={false}/>
|
||||
</TabPane>
|
||||
{/if}
|
||||
</TabContent>
|
||||
</TabContent>
|
||||
{:else}
|
||||
<Card color="info" class="m-2">
|
||||
<CardHeader class="mb-0">
|
||||
<b>Config</b>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<p class="mb-1">Footprint and PolarPlot Display Disabled.</p>
|
||||
</CardBody>
|
||||
</Card>
|
||||
{/if}
|
||||
</Card>
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<CardBody>
|
||||
<CardBody class="overflow-auto">
|
||||
{#if jobFootprintData.length === 0}
|
||||
<div class="text-center">No footprint data for job available.</div>
|
||||
{:else}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
Properties:
|
||||
- `job Object`: The GQL job object
|
||||
- `showLegend Bool?`: Polar Legend Display
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -22,7 +23,8 @@
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let {
|
||||
job
|
||||
job,
|
||||
showLegend
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
@@ -47,8 +49,8 @@
|
||||
jobStats(id: $dbid, metrics: $selectedMetrics) {
|
||||
name
|
||||
data {
|
||||
min
|
||||
avg
|
||||
## min
|
||||
max
|
||||
}
|
||||
}
|
||||
@@ -63,7 +65,7 @@
|
||||
}));
|
||||
</script>
|
||||
|
||||
<CardBody>
|
||||
<CardBody class="py-0 overflow-hidden">
|
||||
{#if $polarData.fetching}
|
||||
<Spinner />
|
||||
{:else if $polarData.error}
|
||||
@@ -71,6 +73,7 @@
|
||||
{:else}
|
||||
<Polar
|
||||
{polarMetrics}
|
||||
{showLegend}
|
||||
polarData={$polarData.data.jobStats}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user