mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-08-29 21:32:59 +02:00
Adds persistance to showfootprint selection
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
let newMetricsOrder = []
|
||||
let unorderedMetrics = [...metrics]
|
||||
let pendingShowFootprint = showFootprint || false
|
||||
let pendingShowFootprint = !!showFootprint
|
||||
|
||||
onInit(() => {
|
||||
if (allMetrics == null) allMetrics = new Set()
|
||||
@@ -92,7 +92,7 @@
|
||||
metrics = newMetricsOrder.filter(m => unorderedMetrics.includes(m))
|
||||
isOpen = false
|
||||
|
||||
showFootprint = pendingShowFootprint ? true : false
|
||||
showFootprint = !!pendingShowFootprint
|
||||
|
||||
updateConfigurationMutation({
|
||||
name: cluster == null ? configName : `${configName}:${cluster}`,
|
||||
@@ -103,6 +103,16 @@
|
||||
// console.log('Error on subscription: ' + res.error)
|
||||
}
|
||||
})
|
||||
|
||||
updateConfigurationMutation({
|
||||
name: cluster == null ? 'plot_list_showFootprint' : `plot_list_showFootprint:${cluster}`,
|
||||
value: JSON.stringify(showFootprint)
|
||||
}).subscribe(res => {
|
||||
if (res.fetching === false && res.error) {
|
||||
console.log('Error on footprint subscription: ' + res.error)
|
||||
throw res.error
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user