harleyjj commented on a change in pull request #5607: URL: https://github.com/apache/incubator-pinot/pull/5607#discussion_r445317016
########## File path: thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js ########## @@ -1449,32 +1449,13 @@ export default Component.extend({ * @method onRangeSelection * @param {Object} rangeOption - the user-selected time range to load */ - onRangeSelection(timeRangeOptions) { - const { - start, - end, - value: duration - } = timeRangeOptions; - + onRangeSelection(start, end) { const startDate = moment(start).valueOf(); const endDate = moment(end).valueOf(); + //Update the time range option selected set(this, 'analysisRange', [startDate, endDate]); set(this, 'displayRange', [startDate, endDate]); - set(this, 'duration', duration); - // This makes sure we don't fetch if the preview is collapsed - if(get(this, 'showDetails') && get(this, 'dataIsCurrent')){ - // With a new date range, we should reset the state of time series and anomalies for comparison - if (get(this, 'isPreviewMode')) { - this.setProperties({ - anomaliesOld: [], - anomaliesOldSet: false, - anomaliesCurrent: [], - anomaliesCurrentSet: false - }); - } - this._fetchAnomalies(); - } Review comment: Here, I removed duration since it's no longer needed. Old lines 1468-1475 were duplicate logic, so I condensed it to one check (new lines 1460-1467). The fetchAnomalies check is now on lines 1468-1471 (new lines). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org