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 2019/04/01 18:36:37 UTC
[incubator-pinot] branch master updated: [TE] frontend -
harleyjj/alert-overview - handle infinity value in anomalies (#4043)
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 55839b4 [TE] frontend - harleyjj/alert-overview - handle infinity value in anomalies (#4043)
55839b4 is described below
commit 55839b446691139625f702093ffaf1ec6851e6fc
Author: Harley Jackson <ha...@gmail.com>
AuthorDate: Mon Apr 1 11:36:31 2019 -0700
[TE] frontend - harleyjj/alert-overview - handle infinity value in anomalies (#4043)
---
.../app/pods/components/alert-details/component.js | 6 +++---
1 file changed, 3 insertions(+), 3 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 978eb61..abcc8ad 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
@@ -372,7 +372,7 @@ 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,
@@ -380,8 +380,8 @@ export default Component.extend({
end: a.endTime,
startDateStr: this._formatAnomaly(a),
durationStr: getFormattedDuration(a.startTime, a.endTime),
- shownCurrent: humanizeFloat(a.avgCurrentVal),
- shownBaseline: humanizeFloat(a.avgBaselineVal),
+ shownCurrent: a.avgCurrentVal === "Infinity" ? 0 : humanizeFloat(a.avgCurrentVal),
+ shownBaseline: a.avgBaselineVal === "Infinity" ? 0 : humanizeFloat(a.avgBaselineVal),
change: change,
shownChangeRate: humanizeFloat(change),
anomalyFeedback: a.feedback ? a.feedback.feedbackType : a.statusClassification,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org