Rework disabled metrics, fix systems

- Unify warning card texts
- Broader use of checkMetricDisabled function
This commit is contained in:
Christoph Kluge
2023-06-19 16:11:16 +02:00
parent 10ca86e583
commit c8068f45eb
7 changed files with 62 additions and 88 deletions

View File

@@ -10,7 +10,9 @@
export let itemsPerRow
export let items
export let padding = 10
export let renderFor
let rows = []
let tableWidth = 0
const isPlaceholder = x => x._is_placeholder === true
@@ -30,8 +32,13 @@
return rows
}
// Analysis Implements PlotTable: Disable flag can not be present, add to row if not defined explicitly (Helps with systems view also)
$: rows = tile(items.filter(item => (item.disabled !== null && item.disabled === false)), itemsPerRow)
$: if (renderFor === 'job') {
rows = tile(items.filter(item => item.disabled === false), itemsPerRow)
} else {
rows = tile(items, itemsPerRow)
}
$: plotWidth = (tableWidth / itemsPerRow) - (padding * itemsPerRow)
</script>