Remove comments

This commit is contained in:
Christoph Kluge
2023-03-30 15:23:31 +02:00
parent 0c1b66aad9
commit 68a839bf1c
4 changed files with 2 additions and 45 deletions

View File

@@ -18,23 +18,11 @@
let selectedHost = null, plot, fetching = false, error = null
let selectedScope = minScope(scopes)
let selectedScopeIndex = scopes.findIndex(s => s == selectedScope)
// console.log('- Inputs -')
// console.log(metricName)
// console.log(scopes)
// console.log(rawData)
// console.log('- Prep Scopes -')
// console.log(selectedScope)
// console.log(selectedScopeIndex)
$: avaliableScopes = scopes
$: data = rawData[selectedScopeIndex]
$: series = data?.series.filter(series => selectedHost == null || series.hostname == selectedHost)
// console.log('- Prep Data -')
// console.log(rawData[selectedScopeIndex])
// console.log(rawData[selectedScopeIndex].series.filter(series => selectedHost == null || series.hostname == selectedHost))
let from = null, to = null
export function setTimeRange(f, t) {
from = f, to = t

View File

@@ -60,19 +60,13 @@
// SubCluster Config present: Check if remove flag is set
if (thisConfig.subClusters[thisSCIndex].remove == true) {
// Return null data and informational flag
// console.log('Case 1.1 -> Returned')
// console.log({removed: true, data: null})
return {removed: true, data: null}
} else {
// load and return metric, if data available
let thisMetric = jobMetrics.filter(jobMetric => jobMetric.name == name) // Returns Array
if (thisMetric.length > 0) {
// console.log('Case 1.2.1 -> Returned')
// console.log({removed: false, data: thisMetric})
return {removed: false, data: thisMetric}
} else {
// console.log('Case 1.2.2 -> Returned:')
// console.log({removed: false, data: null})
return {removed: false, data: null}
}
}
@@ -80,26 +74,15 @@
// No specific subCluster config: 'remove' flag not set, deemed false -> load and return metric, if data available
let thisMetric = jobMetrics.filter(jobMetric => jobMetric.name == name) // Returns Array
if (thisMetric.length > 0) {
// console.log('Case 2.1 -> Returned')
// console.log({removed: false, data: thisMetric})
return {removed: false, data: thisMetric}
} else {
// console.log('Case 2.2 -> Returned')
// console.log({removed: false, data: null})
return {removed: false, data: null}
}
}
})
.map(function(jobMetrics) {
if (jobMetrics.data != null && jobMetrics.data.length > 0) {
// console.log('Before')
// console.log(jobMetrics.data)
// console.log('After')
// console.log(selectScope(jobMetrics.data))
let res = {removed: jobMetrics.removed, data: selectScope(jobMetrics.data)}
// console.log('Packed')
// console.log(res)
return res
return {removed: jobMetrics.removed, data: selectScope(jobMetrics.data)}
} else {
return jobMetrics
}