You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xh...@apache.org on 2020/03/05 16:34:54 UTC

[incubator-pinot] branch master updated: [TE] frontend - harleyjj/alert-details - put correct tail value in anomaly for graphing (#5110)

This is an automated email from the ASF dual-hosted git repository.

xhsun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new dd768ea  [TE] frontend - harleyjj/alert-details - put correct tail value in anomaly for graphing (#5110)
dd768ea is described below

commit dd768ea7384eac964704b5a3486a36d4613789e8
Author: Xiaohui Sun <xh...@linkedin.com>
AuthorDate: Thu Mar 5 08:34:47 2020 -0800

    [TE] frontend - harleyjj/alert-details - put correct tail value in anomaly for graphing (#5110)
---
 .../thirdeye-frontend/app/pods/components/alert-details/component.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
index 879c2ea..5a62b1f 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
@@ -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);
           }
@@ -1130,7 +1131,7 @@ export default Component.extend({
    * @param anomalies - an array of anomaly objects
    * @param metricUrn - the metricUrn currently selected for time series chart
    * @param showRules - whether we are showing detection rules and bounds in time series chart
-   * @param selectedRule - which detection rule selected for time series chart 
+   * @param selectedRule - which detection rule selected for time series chart
    * @return {Array}
    */
   _filterAnomalies(anomalies, metricUrn, showRules, selectedRule) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org