You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/04/01 19:02:54 UTC

[GitHub] [incubator-pinot] xiaohui-sun commented on a change in pull request #4043: [TE] frontend - harleyjj/alert-overview - handle infinity value in an…

xiaohui-sun commented on a change in pull request #4043: [TE] frontend - harleyjj/alert-overview - handle infinity value in an…
URL: https://github.com/apache/incubator-pinot/pull/4043#discussion_r271008016
 
 

 ##########
 File path: thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
 ##########
 @@ -372,16 +372,16 @@ export default Component.extend({
 
       if (anomalies) {
         anomalies.forEach(a => {
-          const change = (a.avgBaselineVal !== 0) ? (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 : 0;
           let tableRow = {
             anomalyId: a.id,
             metricUrn: a.metricUrn,
             start: a.startTime,
             end: a.endTime,
             startDateStr: this._formatAnomaly(a),
             durationStr: getFormattedDuration(a.startTime, a.endTime),
-            shownCurrent: humanizeFloat(a.avgCurrentVal),
 
 Review comment:
   E.g, for rule based detection if the previous value is 0 then the change would be infinity. @harleyjj  is it possible to show it as "n/a" or "-"?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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