mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-24 12:29:05 +01:00
Users/Managers only display number of shared jobs
This commit is contained in:
parent
5bb5e5ed24
commit
541d54aa7c
@ -14,6 +14,8 @@
|
|||||||
import { getContext } from 'svelte'
|
import { getContext } from 'svelte'
|
||||||
|
|
||||||
export let dbid
|
export let dbid
|
||||||
|
export let authlevel
|
||||||
|
export let roles
|
||||||
|
|
||||||
const { query: initq } = init(`
|
const { query: initq } = init(`
|
||||||
job(id: "${dbid}") {
|
job(id: "${dbid}") {
|
||||||
@ -102,15 +104,22 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</Col>
|
</Col>
|
||||||
{#if $jobMetrics.data && $initq.data}
|
{#if $jobMetrics.data && $initq.data}
|
||||||
{#if $initq.data.job.concurrentJobs != null}
|
{#if $initq.data.job.concurrentJobs != null}
|
||||||
<Col>
|
{#if authlevel > roles.manager}
|
||||||
<h5>Concurrent Jobs <Icon name="info-circle" style="cursor:help;" title="Shared jobs running on the same node with overlapping runtimes"/></h5>
|
<Col>
|
||||||
<ul>
|
<h5>Concurrent Jobs <Icon name="info-circle" style="cursor:help;" title="Shared jobs running on the same node with overlapping runtimes"/></h5>
|
||||||
{#each $initq.data.job.concurrentJobs.items as pjob, index}
|
<ul>
|
||||||
<li><a href="/monitoring/job/{pjob.id}" target="_blank">{pjob.jobId}</a></li>
|
{#each $initq.data.job.concurrentJobs.items as pjob, index}
|
||||||
{/each}
|
<li><a href="/monitoring/job/{pjob.id}" target="_blank">{pjob.jobId}</a></li>
|
||||||
</ul>
|
{/each}
|
||||||
</Col>
|
</ul>
|
||||||
|
</Col>
|
||||||
|
{:else}
|
||||||
|
<Col>
|
||||||
|
<h5>{$initq.data.job.concurrentJobs.items.length} Concurrent Jobs</h5>
|
||||||
|
<p>Number of shared jobs on the same node with overlapping runtimes.</p>
|
||||||
|
</Col>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
<Col>
|
<Col>
|
||||||
<PolarPlot
|
<PolarPlot
|
||||||
|
@ -4,7 +4,9 @@ import Job from './Job.root.svelte'
|
|||||||
new Job({
|
new Job({
|
||||||
target: document.getElementById('svelte-app'),
|
target: document.getElementById('svelte-app'),
|
||||||
props: {
|
props: {
|
||||||
dbid: jobInfos.id
|
dbid: jobInfos.id,
|
||||||
|
authlevel: authlevel,
|
||||||
|
roles: roles
|
||||||
},
|
},
|
||||||
context: new Map([
|
context: new Map([
|
||||||
['cc-config', clusterCockpitConfig]
|
['cc-config', clusterCockpitConfig]
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
clusterId: "{{ .Infos.clusterId }}"
|
clusterId: "{{ .Infos.clusterId }}"
|
||||||
};
|
};
|
||||||
const clusterCockpitConfig = {{ .Config }};
|
const clusterCockpitConfig = {{ .Config }};
|
||||||
|
const authlevel = {{ .User.GetAuthLevel }};
|
||||||
|
const roles = {{ .Roles }};
|
||||||
</script>
|
</script>
|
||||||
<script src='/build/job.js'></script>
|
<script src='/build/job.js'></script>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
Loading…
Reference in New Issue
Block a user