[TE] frontend - harleyjj/alert-details - put correct tail value in anomaly for graphing
@@ -935,6 +935,7 @@ export default Component.extend({
let anomalyEdgeTimestamps = [];
for (let i = 0; i < series.Current.timestamps.length; ++i) {
const anomalyValue = useValue ? series.Current.values[i] : 1.0;
+ const anomalyValueMinusOne = useValue ? series.Current.values[i-1] : 1.0;
if (!inAnomalyRange) {
currentAnomaly = filteredAnomalies.find(anomaly => {
return anomaly.startTime === series.Current.timestamps[i];
@@ -959,7 +960,7 @@ export default Component.extend({
anomalyEdgeValues.push(anomalyValue);
anomalyEdgeTimestamps.push(series.Current.timestamps[i]);
} else if (i > 0) {
- anomalyEdgeValues.push(series.Current.values[i-1]);
+ anomalyEdgeValues.push(anomalyValueMinusOne);
anomalyEdgeTimestamps.push(series.Current.timestamps[i-1]);
valuesCurrent.push(null);
}
