mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-10 08:57:25 +01:00
Fix Polar sizing
- Note: Not adaptive to viewport size, but will snap to grid
This commit is contained in:
parent
b42a11d30e
commit
bbd8637ca6
@ -120,7 +120,6 @@
|
|||||||
jobTags,
|
jobTags,
|
||||||
fullWidth,
|
fullWidth,
|
||||||
statsTable;
|
statsTable;
|
||||||
$: polarPlotSize = Math.min(fullWidth / 3 - 10, 300);
|
|
||||||
$: document.title = $initq.fetching
|
$: document.title = $initq.fetching
|
||||||
? "Loading..."
|
? "Loading..."
|
||||||
: $initq.error
|
: $initq.error
|
||||||
@ -233,8 +232,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<Col>
|
<Col>
|
||||||
<Polar
|
<Polar
|
||||||
width={polarPlotSize}
|
size={fullWidth / 4.1}
|
||||||
height={polarPlotSize}
|
|
||||||
metrics={ccconfig[
|
metrics={ccconfig[
|
||||||
`job_view_polarPlotMetrics:${$initq.data.job.cluster}`
|
`job_view_polarPlotMetrics:${$initq.data.job.cluster}`
|
||||||
] || ccconfig[`job_view_polarPlotMetrics`]}
|
] || ccconfig[`job_view_polarPlotMetrics`]}
|
||||||
@ -245,7 +243,7 @@
|
|||||||
<Col>
|
<Col>
|
||||||
<Roofline
|
<Roofline
|
||||||
width={fullWidth / 3 - 10}
|
width={fullWidth / 3 - 10}
|
||||||
height={polarPlotSize + 20}
|
height={fullWidth / 5}
|
||||||
cluster={clusters
|
cluster={clusters
|
||||||
.find((c) => c.name == $initq.data.job.cluster)
|
.find((c) => c.name == $initq.data.job.cluster)
|
||||||
.subClusters.find(
|
.subClusters.find(
|
||||||
|
@ -22,8 +22,7 @@
|
|||||||
LineElement
|
LineElement
|
||||||
);
|
);
|
||||||
|
|
||||||
export let width
|
export let size
|
||||||
export let height
|
|
||||||
export let metrics
|
export let metrics
|
||||||
export let cluster
|
export let cluster
|
||||||
export let jobMetrics
|
export let jobMetrics
|
||||||
@ -88,8 +87,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// No custom defined options but keep for clarity
|
// No custom defined options but keep for clarity
|
||||||
const options = {}
|
const options = {
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Radar {data} {options} {width} {height}/>
|
<div class="chart-container">
|
||||||
|
<Radar {data} {options} width={size} height={size}/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.chart-container {
|
||||||
|
margin: auto;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user