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

 ##########
 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:
   @xiaohui-sun Thank you, I corrected it.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to