You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ji...@apache.org on 2019/04/03 17:07:15 UTC

[incubator-pinot] branch master updated: [TE] frontend - harleyjj/alert-overview - display dash and n/a when value is undefined (#4046)

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

jihao 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 8121927  [TE] frontend - harleyjj/alert-overview - display dash and n/a when value is undefined (#4046)
8121927 is described below

commit 81219272261e5c86feab83e7e7c9280c532ae846
Author: Harley Jackson <ha...@gmail.com>
AuthorDate: Wed Apr 3 10:07:10 2019 -0700

    [TE] frontend - harleyjj/alert-overview - display dash and n/a when value is undefined (#4046)
---
 .../app/pods/components/alert-details/component.js                | 8 ++++----
 1 file changed, 4 insertions(+), 4 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 e07db99..9eeffc6 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
@@ -389,7 +389,7 @@ export default Component.extend({
 
       if (anomalies) {
         anomalies.forEach(a => {
-          const change = (a.avgBaselineVal !== 0 && a.avgBaselineVal !== "Infinity" && a.avgCurrentVal !== "Infinity") ? (a.avgCurrentVal/a.avgBaselineVal - 1.0) * 100.0 : 0;
+          const change = (a.avgBaselineVal !== 0 && a.avgBaselineVal !== "Infinity" && a.avgCurrentVal !== "Infinity") ? (a.avgCurrentVal/a.avgBaselineVal - 1.0) * 100.0 : 'N/A';
           let tableRow = {
             anomalyId: a.id,
             metricUrn: a.metricUrn,
@@ -397,10 +397,10 @@ export default Component.extend({
             end: a.endTime,
             startDateStr: this._formatAnomaly(a),
             durationStr: getFormattedDuration(a.startTime, a.endTime),
-            shownCurrent: a.avgCurrentVal === "Infinity" ? 0 : humanizeFloat(a.avgCurrentVal),
-            shownBaseline: a.avgBaselineVal === "Infinity" ? 0 : humanizeFloat(a.avgBaselineVal),
+            shownCurrent: a.avgCurrentVal === "Infinity" ? '-' : humanizeFloat(a.avgCurrentVal),
+            shownBaseline: a.avgBaselineVal === "Infinity" ? '-' : humanizeFloat(a.avgBaselineVal),
             change: change,
-            shownChangeRate: humanizeFloat(change),
+            shownChangeRate: change === 'N/A' ? change : humanizeFloat(change),
             anomalyFeedback: a.feedback ? a.feedback.feedbackType : a.statusClassification,
             dimensionList: Object.keys(a.dimensions),
             dimensions: a.dimensions,


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