mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-24 12:29:05 +01:00
Mark shared metrics on shared jobs
- show [shared] in plots in JobList - other plot locations Todo - Relates to issue #107
This commit is contained in:
parent
a8980c7a5e
commit
e9301a5d39
@ -128,7 +128,8 @@
|
|||||||
statisticsSeries={metric.data.metric.statisticsSeries}
|
statisticsSeries={metric.data.metric.statisticsSeries}
|
||||||
metric={metric.data.name}
|
metric={metric.data.name}
|
||||||
cluster={cluster}
|
cluster={cluster}
|
||||||
subCluster={job.subCluster} />
|
subCluster={job.subCluster}
|
||||||
|
isShared={(job.exclusive != 1)}/>
|
||||||
{:else if metric.removed == true && metric.data == null}
|
{:else if metric.removed == true && metric.data == null}
|
||||||
<Card body color="info">Metric disabled for subcluster '{ job.subCluster }'</Card>
|
<Card body color="info">Metric disabled for subcluster '{ job.subCluster }'</Card>
|
||||||
{:else}
|
{:else}
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
export let metric
|
export let metric
|
||||||
export let useStatsSeries = null
|
export let useStatsSeries = null
|
||||||
export let scope = 'node'
|
export let scope = 'node'
|
||||||
|
export let isShared = false
|
||||||
|
|
||||||
if (useStatsSeries == null)
|
if (useStatsSeries == null)
|
||||||
useStatsSeries = statisticsSeries != null
|
useStatsSeries = statisticsSeries != null
|
||||||
@ -142,13 +143,17 @@
|
|||||||
hooks: {
|
hooks: {
|
||||||
draw: [(u) => {
|
draw: [(u) => {
|
||||||
// Draw plot type label:
|
// Draw plot type label:
|
||||||
let text = `${scope}${plotSeries.length > 2 ? 's' : ''}${
|
let textl = `${scope}${plotSeries.length > 2 ? 's' : ''}${
|
||||||
useStatsSeries ? ': min/avg/max' : (metricConfig != null && scope != metricConfig.scope ? ` (${metricConfig.aggregation})` : '')}`
|
useStatsSeries ? ': min/avg/max' : (metricConfig != null && scope != metricConfig.scope ? ` (${metricConfig.aggregation})` : '')}`
|
||||||
|
let textr = `${(isShared && (scope != 'core' && scope != 'accelerator')) ? '[Shared]' : '' }`
|
||||||
u.ctx.save()
|
u.ctx.save()
|
||||||
u.ctx.textAlign = 'start' // 'end'
|
u.ctx.textAlign = 'start' // 'end'
|
||||||
u.ctx.fillStyle = 'black'
|
u.ctx.fillStyle = 'black'
|
||||||
u.ctx.fillText(text, u.bbox.left + 10, u.bbox.top + 10)
|
u.ctx.fillText(textl, u.bbox.left + 10, u.bbox.top + 10)
|
||||||
// u.ctx.fillText(text, u.bbox.left + u.bbox.width - 10, u.bbox.top + u.bbox.height - 10)
|
u.ctx.textAlign = 'end'
|
||||||
|
u.ctx.fillStyle = 'black'
|
||||||
|
u.ctx.fillText(textr, u.bbox.left + u.bbox.width - 10, u.bbox.top + 10)
|
||||||
|
// u.ctx.fillText(text, u.bbox.left + u.bbox.width - 10, u.bbox.top + u.bbox.height - 10) // Recipe for bottom right
|
||||||
|
|
||||||
if (!thresholds) {
|
if (!thresholds) {
|
||||||
u.ctx.restore()
|
u.ctx.restore()
|
||||||
|
Loading…
Reference in New Issue
Block a user