harleyjj commented on a change in pull request #3551: [TE] Alerts created by
YAML to show up in the alert list
URL: https://github.com/apache/incubator-pinot/pull/3551#discussion_r236466277
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/alerts/index/route.js
##########
@@ -49,6 +51,35 @@ export default Route.extend({
}
}
+ // format Yaml configs
+ const yamlAlerts = model.detectionYaml;
+ for (let yamlAlert of yamlAlerts) {
+ Object.assign(yamlAlert, {
+ functionName: yamlAlert.detectionName,
+ collection: yamlAlert.dataset,
+ type: yamlAlert.pipelineType,
+ exploreDimensions: yamlAlert.dimensions,
+ filters: this._formatYamlFilter(yamlAlert.filters)
+ })
+ }
+
+ // Itereate through detection alerter to enhance all yaml alert with extra
properties (group name, application)
+ for (let detectionAlert of model.detectionAlertConfig){
+ const detectionConfigIds = Object.keys(detectionAlert.vectorClocks);
+ for (let id of detectionConfigIds) {
+ let foundAlert = yamlAlerts.find(yamlAlert => yamlAlert.id.toString()
=== id);
+ if (foundAlert) {
+ Object.assign(foundAlert, {
+ application: detectionAlert.application,
+ group: detectionAlert.name
+ })
+ }
+ }
+ }
+
+ // concat legacy alerts and yaml alerts
+ alerts = alerts.concat(yamlAlerts);
+ debugger;
Review comment:
Is debugger supposed to stay?
----------------------------------------------------------------
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]