subcluster in metricSelect, add infobox to systems

- Default: Show Clusters next to Metrics
- New: If Cluster filter activem show subclusters instead (reactive)
- add note to analysis view
- systems view now with info boxes if metric is removed for subcluster
This commit is contained in:
Christoph Kluge
2023-03-31 17:18:16 +02:00
parent 68a839bf1c
commit adc1d94e3f
6 changed files with 77 additions and 22 deletions

View File

@@ -95,7 +95,7 @@
<Modal isOpen={isOpen} toggle={() => (isOpen = !isOpen)}>
<ModalHeader>
Configure columns
Configure columns (Metric availability shown)
</ModalHeader>
<ModalBody>
<ListGroup>
@@ -113,9 +113,26 @@
{/if}
{metric}
<span style="float: right;">
{cluster == null ? clusters
{cluster == null ?
clusters // No single cluster specified: List Clusters with Metric
.filter(cluster => cluster.metricConfig.find(m => m.name == metric) != null)
.map(cluster => cluster.name).join(', ') : ''}
.map(cluster => cluster.name).join(', ') :
clusters // Single cluster requested: List Subclusters with do not have metric remove flag
.filter(cluster => cluster.metricConfig.find(m => m.name == metric) != null)
.map(function(cluster) {
let scNames = cluster.subClusters.map(sc => sc.name)
scNames.forEach(function(scName){
let met = cluster.metricConfig.find(m => m.name == metric)
let msc = met.subClusters.find(msc => msc.name == scName)
if (msc != null) {
if (msc.remove == true) {
scNames = scNames.filter(scn => scn != msc.name)
}
}
})
return scNames
})
.join(', ')}
</span>
</li>
{/each}