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_r235208565
##########
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')) {
Review comment:
Yes, this date range checker is in place because 'newCurrent' comes from
_getAggregate, which will be updated if the user changes the date range. So we
make sure that the date range can't trigger the warning (In one case, the
anomaly doesn't have the warning, but when the user slides the date picker, it
activates the warning - 'isRangeChanged' is checked here to prevent this
behavior).
----------------------------------------------------------------
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]