Actually add file ...

This commit is contained in:
Christoph Kluge 2023-05-08 18:06:58 +02:00
parent b5a5def3a6
commit 3afcd061ef

View File

@ -25,33 +25,23 @@
let w1, w2, histogramHeight = 250 let w1, w2, histogramHeight = 250
let selectedCluster = filterPresets?.cluster ? filterPresets.cluster : null let selectedCluster = filterPresets?.cluster ? filterPresets.cluster : null
const stats = queryStore({ $: stats = queryStore({
client: getContextClient(), client: getContextClient(),
query: gql` query: gql`
query($filter: [JobFilter!]!) { query($filters: [JobFilter!]!) {
jobsStatistics(filter: $filter) { jobsStatistics(filter: $filters) {
totalJobs totalJobs
shortJobs shortJobs
totalWalltime totalWalltime
totalCoreHours totalCoreHours
histDuration { count, value } histDuration { count, value }
histNumNodes { count, value } histNumNodes { count, value }
} }}`,
}`, variables: { filters },
variables: {
filter: []
},
pause: true
}) })
// filters[filters.findIndex(filter => filter.cluster != null)] ?
// filters[filters.findIndex(filter => filter.cluster != null)].cluster.eq :
// null
// Cluster filter has to be alwas @ first index, above will throw error
$: selectedCluster = filters[0]?.cluster ? filters[0].cluster.eq : null $: selectedCluster = filters[0]?.cluster ? filters[0].cluster.eq : null
query(stats)
onMount(() => filters.update()) onMount(() => filters.update())
</script> </script>
@ -86,15 +76,12 @@
bind:this={filters} bind:this={filters}
on:update={({ detail }) => { on:update={({ detail }) => {
let jobFilters = [...detail.filters, { user: { eq: user.username } }] let jobFilters = [...detail.filters, { user: { eq: user.username } }]
$stats.variables = { filter: jobFilters }
$stats.context.pause = false
$stats.reexecute()
filters = jobFilters filters = jobFilters
jobList.update(jobFilters) jobList.update(jobFilters)
}} /> }} />
</Col> </Col>
<Col xs="auto" style="margin-left: auto;"> <Col xs="auto" style="margin-left: auto;">
<Refresher on:reload={() => jobList.update()} /> <Refresher on:reload={() => jobList.refresh()} />
</Col> </Col>
</Row> </Row>
<br/> <br/>