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:04:45 UTC

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

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

 ##########
 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:
   This particular part is fed into the table on the Alert-Preview component (displayed in Preview and Alert Overview).  I could put some other kind of text, but it should probably be small since the field is usually a number.  And yes, the backend is returning it in the anomaly response.

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