mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 13:29:05 +01:00
First optical layout Iteration
This commit is contained in:
parent
21b03d02b2
commit
46baa6e534
@ -2,7 +2,7 @@
|
|||||||
import Refresher from './joblist/Refresher.svelte'
|
import Refresher from './joblist/Refresher.svelte'
|
||||||
import Roofline, { transformPerNodeData } from './plots/Roofline.svelte'
|
import Roofline, { transformPerNodeData } from './plots/Roofline.svelte'
|
||||||
import Histogram from './plots/Histogram.svelte'
|
import Histogram from './plots/Histogram.svelte'
|
||||||
import { Row, Col, Spinner, Card, Table, Progress } from 'sveltestrap'
|
import { Row, Col, Spinner, Card, CardHeader, CardTitle, CardBody, Table, Progress, Icon } from 'sveltestrap'
|
||||||
import { init } from './utils.js'
|
import { init } from './utils.js'
|
||||||
import { operationStore, query } from '@urql/svelte'
|
import { operationStore, query } from '@urql/svelte'
|
||||||
|
|
||||||
@ -60,7 +60,12 @@
|
|||||||
query(mainQuery)
|
query(mainQuery)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- Loading indicator & Refresh -->
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
|
<Col xs="auto" style="align-self: flex-end;">
|
||||||
|
<h4 class="mb-0" >Current usage of cluster "{cluster}"</h4>
|
||||||
|
</Col>
|
||||||
<Col xs="auto">
|
<Col xs="auto">
|
||||||
{#if $initq.fetching || $mainQuery.fetching}
|
{#if $initq.fetching || $mainQuery.fetching}
|
||||||
<Spinner/>
|
<Spinner/>
|
||||||
@ -89,54 +94,71 @@
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- Gauges & Roofline per Subcluster-->
|
||||||
|
|
||||||
{#if $initq.data && $mainQuery.data}
|
{#if $initq.data && $mainQuery.data}
|
||||||
{#each $initq.data.clusters.find(c => c.name == cluster).subClusters as subCluster, i}
|
{#each $initq.data.clusters.find(c => c.name == cluster).subClusters as subCluster, i}
|
||||||
<Row>
|
<Row cols={2} class="mb-3 justify-content-center">
|
||||||
<Col xs="3">
|
<Col xs="3" class="px-3">
|
||||||
<Table>
|
<Card class="h-auto mt-1">
|
||||||
<tr>
|
<CardHeader>
|
||||||
<th scope="col">SubCluster</th>
|
<CardTitle class="mb-0">SubCluster "{subCluster.name}"</CardTitle>
|
||||||
<td colspan="2">{subCluster.name}</td>
|
</CardHeader>
|
||||||
</tr>
|
<CardBody>
|
||||||
<tr>
|
<Table>
|
||||||
<th scope="col">Allocated Nodes</th>
|
<tr>
|
||||||
<td style="min-width: 75px;"><div class="col"><Progress value={allocatedNodes[subCluster.name]} max={subCluster.numberOfNodes}/></div></td>
|
<th scope="col">Allocated Nodes</th>
|
||||||
<td>({allocatedNodes[subCluster.name]} / {subCluster.numberOfNodes})</td>
|
<td style="min-width: 75px;"><div class="col"><Progress value={allocatedNodes[subCluster.name]} max={subCluster.numberOfNodes}/></div></td>
|
||||||
</tr>
|
<td>({allocatedNodes[subCluster.name]} / {subCluster.numberOfNodes})</td>
|
||||||
<tr>
|
</tr>
|
||||||
<th scope="col">Flop Rate</th>
|
<tr>
|
||||||
<td style="min-width: 75px;"><div class="col"><Progress value={flopRate[subCluster.name]} max={subCluster.flopRateSimd * subCluster.numberOfNodes}/></div></td>
|
<th scope="col">Flop Rate (Any) <Icon name="info-circle" class="p-1" style="cursor: help;" title="Flops[Any] = (Flops[Double] x 2) + Flops[Single]"/></th>
|
||||||
<td>({flopRate[subCluster.name]} / {subCluster.flopRateSimd * subCluster.numberOfNodes})</td>
|
<td style="min-width: 75px;"><div class="col"><Progress value={flopRate[subCluster.name]} max={subCluster.flopRateSimd * subCluster.numberOfNodes}/></div></td>
|
||||||
</tr>
|
<td>({flopRate[subCluster.name]} / {subCluster.flopRateSimd * subCluster.numberOfNodes})</td>
|
||||||
<tr>
|
</tr>
|
||||||
<th scope="col">MemBw Rate</th>
|
<tr>
|
||||||
<td style="min-width: 75px;"><div class="col"><Progress value={memBwRate[subCluster.name]} max={subCluster.memoryBandwidth * subCluster.numberOfNodes}/></div></td>
|
<th scope="col">MemBw Rate</th>
|
||||||
<td>({memBwRate[subCluster.name]} / {subCluster.memoryBandwidth * subCluster.numberOfNodes})</td>
|
<td style="min-width: 75px;"><div class="col"><Progress value={memBwRate[subCluster.name]} max={subCluster.memoryBandwidth * subCluster.numberOfNodes}/></div></td>
|
||||||
</tr>
|
<td>({memBwRate[subCluster.name]} / {subCluster.memoryBandwidth * subCluster.numberOfNodes})</td>
|
||||||
</Table>
|
</tr>
|
||||||
|
</Table>
|
||||||
|
</CardBody>
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
|
<Col class="px-3">
|
||||||
|
<div bind:clientWidth={plotWidths[i]}>
|
||||||
|
{#key $mainQuery.data.nodeMetrics}
|
||||||
|
<Roofline
|
||||||
|
width={plotWidths[i] - 10} height={300} colorDots={false} cluster={subCluster}
|
||||||
|
data={transformPerNodeData($mainQuery.data.nodeMetrics.filter(data => data.subCluster == subCluster.name))} />
|
||||||
|
{/key}
|
||||||
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
<div class="col-9" bind:clientWidth={plotWidths[i]}>
|
|
||||||
{#key $mainQuery.data.nodeMetrics}
|
|
||||||
<Roofline
|
|
||||||
width={plotWidths[i] - 10} height={300} colorDots={false} cluster={subCluster}
|
|
||||||
data={transformPerNodeData($mainQuery.data.nodeMetrics.filter(data => data.subCluster == subCluster.name))} />
|
|
||||||
{/key}
|
|
||||||
</div>
|
|
||||||
</Row>
|
</Row>
|
||||||
{/each}
|
{/each}
|
||||||
<Row>
|
|
||||||
<div class="col-4" bind:clientWidth={colWidth1}>
|
<hr style="margin-top: -1em;">
|
||||||
<h4>Top Users</h4>
|
|
||||||
{#key $mainQuery.data}
|
<!-- Usage Stats as Histograms -->
|
||||||
<Histogram
|
|
||||||
width={colWidth1 - 25} height={300}
|
<Row cols={4}>
|
||||||
data={$mainQuery.data.topUsers.sort((a, b) => b.count - a.count).map(({ count }, idx) => ({ count, value: idx }))}
|
<Col class="p-2">
|
||||||
label={(x) => x < $mainQuery.data.topUsers.length ? $mainQuery.data.topUsers[Math.floor(x)].name : '0'} />
|
<div bind:clientWidth={colWidth1}>
|
||||||
{/key}
|
<h4 class="mb-3 text-center">Top Users</h4>
|
||||||
</div>
|
{#key $mainQuery.data}
|
||||||
<div class="col-2">
|
<Histogram
|
||||||
|
width={colWidth1 - 25} height={300}
|
||||||
|
data={$mainQuery.data.topUsers.sort((a, b) => b.count - a.count).map(({ count }, idx) => ({ count, value: idx }))}
|
||||||
|
label={(x) => x < $mainQuery.data.topUsers.length ? $mainQuery.data.topUsers[Math.floor(x)].name : '0'} />
|
||||||
|
{/key}
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col class="px-4 py-2">
|
||||||
<Table>
|
<Table>
|
||||||
<tr><th>Name</th><th>Number of Nodes</th></tr>
|
<tr class="mb-2"><th>User Name</th><th>Number of Nodes</th></tr>
|
||||||
{#each $mainQuery.data.topUsers.sort((a, b) => b.count - a.count) as { name, count }}
|
{#each $mainQuery.data.topUsers.sort((a, b) => b.count - a.count) as { name, count }}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><a href="/monitoring/user/{name}">{name}</a></th>
|
<th scope="col"><a href="/monitoring/user/{name}">{name}</a></th>
|
||||||
@ -144,41 +166,43 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</Col>
|
||||||
<div class="col-4">
|
<Col class="p-2">
|
||||||
<h4>Top Projects</h4>
|
<h4 class="mb-3 text-center">Top Projects</h4>
|
||||||
{#key $mainQuery.data}
|
{#key $mainQuery.data}
|
||||||
<Histogram
|
<Histogram
|
||||||
width={colWidth1 - 25} height={300}
|
width={colWidth1 - 25} height={300}
|
||||||
data={$mainQuery.data.topProjects.sort((a, b) => b.count - a.count).map(({ count }, idx) => ({ count, value: idx }))}
|
data={$mainQuery.data.topProjects.sort((a, b) => b.count - a.count).map(({ count }, idx) => ({ count, value: idx }))}
|
||||||
label={(x) => x < $mainQuery.data.topProjects.length ? $mainQuery.data.topProjects[Math.floor(x)].name : '0'} />
|
label={(x) => x < $mainQuery.data.topProjects.length ? $mainQuery.data.topProjects[Math.floor(x)].name : '0'} />
|
||||||
{/key}
|
{/key}
|
||||||
</div>
|
</Col>
|
||||||
<div class="col-2">
|
<Col class="px-4 py-2">
|
||||||
<Table>
|
<Table>
|
||||||
<tr><th>Name</th><th>Number of Nodes</th></tr>
|
<tr class="mb-2"><th>Project Code</th><th>Number of Nodes</th></tr>
|
||||||
{#each $mainQuery.data.topProjects.sort((a, b) => b.count - a.count) as { name, count }}
|
{#each $mainQuery.data.topProjects.sort((a, b) => b.count - a.count) as { name, count }}
|
||||||
<tr><th scope="col">{name}</th><td>{count}</td></tr>
|
<tr><th scope="col">{name}</th><td>{count}</td></tr>
|
||||||
{/each}
|
{/each}
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row cols={2} class="mt-3">
|
||||||
<div class="col" bind:clientWidth={colWidth2}>
|
<Col class="p-2">
|
||||||
<h4>Duration Distribution</h4>
|
<div bind:clientWidth={colWidth2}>
|
||||||
{#key $mainQuery.data.stats}
|
<h4 class="mb-3 text-center">Duration Distribution</h4>
|
||||||
<Histogram
|
{#key $mainQuery.data.stats}
|
||||||
width={colWidth2 - 25} height={300}
|
<Histogram
|
||||||
data={$mainQuery.data.stats[0].histDuration} />
|
width={colWidth2 - 25} height={300}
|
||||||
{/key}
|
data={$mainQuery.data.stats[0].histDuration} />
|
||||||
</div>
|
{/key}
|
||||||
<div class="col">
|
</div>
|
||||||
<h4>Number of Nodes Distribution</h4>
|
</Col>
|
||||||
|
<Col class="p-2">
|
||||||
|
<h4 class="mb-3 text-center">Number of Nodes Distribution</h4>
|
||||||
{#key $mainQuery.data.stats}
|
{#key $mainQuery.data.stats}
|
||||||
<Histogram
|
<Histogram
|
||||||
width={colWidth2 - 25} height={300}
|
width={colWidth2 - 25} height={300}
|
||||||
data={$mainQuery.data.stats[0].histNumNodes} />
|
data={$mainQuery.data.stats[0].histNumNodes} />
|
||||||
{/key}
|
{/key}
|
||||||
</div>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user