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'
|
||||
|
||||
export let dbid
|
||||
export let authlevel
|
||||
export let roles
|
||||
|
||||
const { query: initq } = init(`
|
||||
job(id: "${dbid}") {
|
||||
@ -103,14 +105,21 @@
|
||||
</Col>
|
||||
{#if $jobMetrics.data && $initq.data}
|
||||
{#if $initq.data.job.concurrentJobs != null}
|
||||
<Col>
|
||||
<h5>Concurrent Jobs <Icon name="info-circle" style="cursor:help;" title="Shared jobs running on the same node with overlapping runtimes"/></h5>
|
||||
<ul>
|
||||
{#each $initq.data.job.concurrentJobs.items as pjob, index}
|
||||
<li><a href="/monitoring/job/{pjob.id}" target="_blank">{pjob.jobId}</a></li>
|
||||
{/each}
|
||||
</ul>
|
||||
</Col>
|
||||
{#if authlevel > roles.manager}
|
||||
<Col>
|
||||
<h5>Concurrent Jobs <Icon name="info-circle" style="cursor:help;" title="Shared jobs running on the same node with overlapping runtimes"/></h5>
|
||||
<ul>
|
||||
{#each $initq.data.job.concurrentJobs.items as pjob, index}
|
||||
<li><a href="/monitoring/job/{pjob.id}" target="_blank">{pjob.jobId}</a></li>
|
||||
{/each}
|
||||
</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}
|
||||
<Col>
|
||||
<PolarPlot
|
||||
|
@ -4,7 +4,9 @@ import Job from './Job.root.svelte'
|
||||
new Job({
|
||||
target: document.getElementById('svelte-app'),
|
||||
props: {
|
||||
dbid: jobInfos.id
|
||||
dbid: jobInfos.id,
|
||||
authlevel: authlevel,
|
||||
roles: roles
|
||||
},
|
||||
context: new Map([
|
||||
['cc-config', clusterCockpitConfig]
|
||||
|
@ -13,6 +13,8 @@
|
||||
clusterId: "{{ .Infos.clusterId }}"
|
||||
};
|
||||
const clusterCockpitConfig = {{ .Config }};
|
||||
const authlevel = {{ .User.GetAuthLevel }};
|
||||
const roles = {{ .Roles }};
|
||||
</script>
|
||||
<script src='/build/job.js'></script>
|
||||
{{end}}
|
||||
|
Loading…
Reference in New Issue
Block a user