aaronucsd commented on a change in pull request #3787: [TE] frontend - harleyjj/yaml-editor - implements simple graph for pr… URL: https://github.com/apache/incubator-pinot/pull/3787#discussion_r254465281
########## File path: thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js ########## @@ -31,24 +37,203 @@ export default Component.extend({ anomaliesApiService: service('services/api/anomalies'), notifications: service('toast'), anomalyMapping: {}, + timeseries: null, + isLoading: false, analysisRange: [moment().subtract(1, 'month').startOf('hour').valueOf(), moment().startOf('hour').valueOf()], displayRange: [moment().subtract(2, 'month').startOf('hour').valueOf(), moment().startOf('hour').valueOf()], isPendingData: false, + colorMapping: colorMapping, + zoom: { + enabled: true, + rescale: true + }, - alertYamlChanged: observer('alertYaml', 'analysisRange', 'disableYamlSave', async function() { - set(this, 'isPendingData', true); - // deal with the change - const alertYaml = get(this, 'alertYaml'); - if(alertYaml) { - try { - const anomalyMapping = await this.get('_getAnomalyMapping').perform(alertYaml); - set(this, 'isPendingData', false); - set(this, 'anomalyMapping', anomalyMapping); - } catch (error) { - throw new Error(`Unable to retrieve anomaly data. ${error}`); + legend: { + show: true, + position: 'right' + }, + errorTimeseries: null, + metricUrn: null, + errorBaseline: null, + compareMode: 'wo1w', + baseline: null, + errorAnomalies: null, + showPreview: false, + componentId: 'timeseries-chart', + anomalies: null, + baselineOptions: [ + { name: 'wo1w', isActive: true}, + { name: 'wo2w', isActive: false}, + { name: 'wo3w', isActive: false}, + { name: 'wo4w', isActive: false}, + { name: 'mean4w', isActive: false}, + { name: 'median4w', isActive: false}, + { name: 'min4w', isActive: false}, + { name: 'max4w', isActive: false}, + { name: 'none', isActive: false} + ], + sortColumnStartUp: false, + sortColumnScoreUp: false, + sortColumnChangeUp: false, + sortColumnNumberUp: true, + sortColumnResolutionUp: false, + selectedSortMode: '', + selectedBaseline: 'wo1w', + + // alertYamlChanged: observer('alertYaml', 'analysisRange', 'disableYamlSave', async function() { Review comment: ``` alertYamlChanged: observer('alertYaml', 'analysisRange', 'disableYamlSave', async function() { const isPendingData = get(this, 'isPendingData'); if(!isPendingData){ set(this, 'isPendingData', true); // deal with the change const alertYaml = get(this, 'alertYaml'); if(alertYaml) { try { const anomalyMapping = await this.get('_getAnomalyMapping').perform(alertYaml); set(this, 'isPendingData', false); set(this, 'anomalyMapping', anomalyMapping); } catch (error) { throw new Error(`Unable to retrieve anomaly data. ${error}`); } } } }), ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pinot.apache.org For additional commands, e-mail: dev-h...@pinot.apache.org