|
|
@ -551,19 +551,18 @@ export class AnalyticController { |
|
|
|
if(response === null) { |
|
|
|
if(response === null) { |
|
|
|
return []; |
|
|
|
return []; |
|
|
|
} |
|
|
|
} |
|
|
|
const hsrSerie = { |
|
|
|
|
|
|
|
|
|
|
|
let series: any[] = [{ |
|
|
|
...response.hsr, |
|
|
|
...response.hsr, |
|
|
|
color: ANALYTIC_UNIT_COLORS[0], |
|
|
|
color: ANALYTIC_UNIT_COLORS[0], |
|
|
|
// TODO: render it separately from Metric series
|
|
|
|
// TODO: render it separately from Metric series
|
|
|
|
overrides: [ |
|
|
|
overrides: [ |
|
|
|
{ alias: 'HSR', linewidth: 3, fill: 0 } |
|
|
|
{ alias: 'HSR', linewidth: 3, fill: 0 } |
|
|
|
] |
|
|
|
] |
|
|
|
}; |
|
|
|
}]; |
|
|
|
|
|
|
|
if(response.lowerBound !== undefined) { |
|
|
|
if(response.lowerBound !== undefined && response.upperBound !== undefined) { |
|
|
|
|
|
|
|
// TODO: looks bad
|
|
|
|
// TODO: looks bad
|
|
|
|
return [ |
|
|
|
series.push({ |
|
|
|
{ |
|
|
|
|
|
|
|
target: '[AnomalyDetector]: lower bound', |
|
|
|
target: '[AnomalyDetector]: lower bound', |
|
|
|
datapoints: response.lowerBound.datapoints, |
|
|
|
datapoints: response.lowerBound.datapoints, |
|
|
|
color: ANALYTIC_UNIT_COLORS[1], |
|
|
|
color: ANALYTIC_UNIT_COLORS[1], |
|
|
@ -573,23 +572,25 @@ export class AnalyticController { |
|
|
|
fill: 0, |
|
|
|
fill: 0, |
|
|
|
legend: false |
|
|
|
legend: false |
|
|
|
}] |
|
|
|
}] |
|
|
|
}, |
|
|
|
}); |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(response.upperBound !== undefined) { |
|
|
|
|
|
|
|
series.push({ |
|
|
|
target: '[AnomalyDetector]: upper bound', |
|
|
|
target: '[AnomalyDetector]: upper bound', |
|
|
|
datapoints: response.upperBound.datapoints, |
|
|
|
datapoints: response.upperBound.datapoints, |
|
|
|
color: ANALYTIC_UNIT_COLORS[1], |
|
|
|
color: ANALYTIC_UNIT_COLORS[1], |
|
|
|
overrides: [{ |
|
|
|
overrides: [{ |
|
|
|
alias: '[AnomalyDetector]: upper bound', |
|
|
|
alias: '[AnomalyDetector]: upper bound', |
|
|
|
linewidth: 1, |
|
|
|
linewidth: 1, |
|
|
|
fill: 0, |
|
|
|
fill: response.lowerBound === undefined ? 1 : 0, |
|
|
|
fillBelowTo: '[AnomalyDetector]: lower bound', |
|
|
|
fillBelowTo: response.lowerBound === undefined ? '' : '[AnomalyDetector]: lower bound', |
|
|
|
legend: false |
|
|
|
legend: false |
|
|
|
}] |
|
|
|
}] |
|
|
|
}, |
|
|
|
}); |
|
|
|
hsrSerie |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return [hsrSerie]; |
|
|
|
|
|
|
|
|
|
|
|
return series; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
get inspectedAnalyticUnit(): AnalyticUnit | null { |
|
|
|
get inspectedAnalyticUnit(): AnalyticUnit | null { |
|
|
|