apucher commented on a change in pull request #3548: [TE] frontend -
harleyjj/rootcause - warning value uses aggregate mul…
URL: https://github.com/apache/incubator-pinot/pull/3548#discussion_r236414849
##########
File path:
thirdeye/thirdeye-frontend/app/pods/components/rootcause-anomaly/component.js
##########
@@ -356,12 +355,16 @@ export default Component.extend({
*/
isWarning: computed('anomalyInfo', 'isRangeChanged', function () {
if(!get(this, 'isRangeChanged')) {
- let oldCurrent = parseFloat(get(this, 'current'));
- const newCurrent = this._getAggregate('current');
- if (newCurrent && oldCurrent){
+ const oldCurrent = parseFloat(get(this, 'current'));
+ let newCurrent = this._getAggregate('current');
+ const aggregateMultiplier = parseFloat(get(this, 'aggregateMultiplier'));
+ if (newCurrent && oldCurrent && aggregateMultiplier){
+ newCurrent = newCurrent * aggregateMultiplier;
const diffCurrent = Math.abs((newCurrent-oldCurrent)/newCurrent);
if (diffCurrent > 0.01) {
set(this, 'warningValue', true);
+ } else {
+ set(this, 'warningValue', false);
Review comment:
this really shouldn't have side-effects
----------------------------------------------------------------
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]