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 18:58:38 UTC

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

akshayrai 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_r271005342
 
 

 ##########
 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:
   I am not sure if showing 0 is ideal. Can we display "unable to fetch" or some similar text in the UI?
   
   Do you know why we have Infinity? Is the backend returning this?

----------------------------------------------------------------
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