|
|
@ -551,45 +551,46 @@ 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], |
|
|
|
overrides: [{ |
|
|
|
overrides: [{ |
|
|
|
alias: '[AnomalyDetector]: lower bound', |
|
|
|
alias: '[AnomalyDetector]: lower bound', |
|
|
|
linewidth: 1, |
|
|
|
linewidth: 1, |
|
|
|
fill: 0, |
|
|
|
fill: 0, |
|
|
|
legend: false |
|
|
|
legend: false |
|
|
|
}] |
|
|
|
}] |
|
|
|
}); |
|
|
|
}, |
|
|
|
} |
|
|
|
{ |
|
|
|
|
|
|
|
target: '[AnomalyDetector]: upper bound', |
|
|
|
if(response.upperBound !== undefined) { |
|
|
|
datapoints: response.upperBound.datapoints, |
|
|
|
series.push({ |
|
|
|
color: ANALYTIC_UNIT_COLORS[1], |
|
|
|
target: '[AnomalyDetector]: upper bound', |
|
|
|
overrides: [{ |
|
|
|
datapoints: response.upperBound.datapoints, |
|
|
|
alias: '[AnomalyDetector]: upper bound', |
|
|
|
color: ANALYTIC_UNIT_COLORS[1], |
|
|
|
linewidth: 1, |
|
|
|
overrides: [{ |
|
|
|
fill: 0, |
|
|
|
alias: '[AnomalyDetector]: upper bound', |
|
|
|
fillBelowTo: '[AnomalyDetector]: lower bound', |
|
|
|
linewidth: 1, |
|
|
|
legend: false |
|
|
|
fill: response.lowerBound === undefined ? 1 : 0, |
|
|
|
}] |
|
|
|
fillBelowTo: response.lowerBound === undefined ? '' : '[AnomalyDetector]: lower bound', |
|
|
|
}, |
|
|
|
legend: false |
|
|
|
hsrSerie |
|
|
|
}] |
|
|
|
]; |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
return [hsrSerie]; |
|
|
|
|
|
|
|
|
|
|
|
return series; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
get inspectedAnalyticUnit(): AnalyticUnit | null { |
|
|
|
get inspectedAnalyticUnit(): AnalyticUnit | null { |
|
|
|