You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pinot.apache.org by GitBox <gi...@apache.org> on 2018/11/20 22:48:01 UTC

[GitHub] xiaohui-sun commented on a change in pull request #3532: [TE] frontend - harleyjj/rootcause - fix data inconsistency warning t…

xiaohui-sun commented on a change in pull request #3532: [TE] frontend - harleyjj/rootcause - fix data inconsistency warning t…
URL: https://github.com/apache/incubator-pinot/pull/3532#discussion_r235198008
 
 

 ##########
 File path: thirdeye/thirdeye-frontend/app/pods/components/rootcause-anomaly/component.js
 ##########
 @@ -330,16 +359,27 @@ export default Component.extend({
    * Checks if param values and displayed values differ by 5% or more
    * @type {Boolean}
    */
-  isWarning: computed('anomalyInfo', function () {
-    const anomalyInfo = get(this, 'anomalyInfo');
-    let oldCurrent = parseFloat(get(this, 'current'));
-    const newCurrent = this._getAggregate('current');
-
-    if (newCurrent && oldCurrent){
-      const diffCurrent = Math.abs((newCurrent-oldCurrent)/newCurrent);
-      return (diffCurrent > 0.01);
+  isWarning: computed('anomalyInfo', 'isRangeChanged', function () {
+    if(!get(this, 'isRangeChanged')) {
+      let oldCurrent = parseFloat(get(this, 'current'));
+      const newCurrent = this._getAggregate('current');
+      if (newCurrent && oldCurrent){
+        const diffCurrent = Math.abs((newCurrent-oldCurrent)/newCurrent);
+        if (diffCurrent > 0.01) {
 
 Review comment:
   This is 1% but your comment says 5%.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: dev-unsubscribe@pinot.apache.org
For additional commands, e-mail: dev-help@pinot.apache.org