You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pinot.apache.org by GitBox <gi...@apache.org> on 2018/11/26 23:20:31 UTC

[GitHub] harleyjj commented on a change in pull request #3551: [TE] Alerts created by YAML to show up in the alert list

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pinot.apache.org
For additional commands, e-mail: dev-help@pinot.apache.org