jihaozh commented on a change in pull request #4132: [TE] frontend - 
harleyjj/share-dashboard - extend anomalies by subscr…
URL: https://github.com/apache/incubator-pinot/pull/4132#discussion_r276759497
 
 

 ##########
 File path: thirdeye/thirdeye-frontend/app/pods/home/share-dashboard/route.js
 ##########
 @@ -97,17 +104,25 @@ export default Route.extend(AuthenticatedRouteMixin, {
 
   _getAnomalyMapping: task (function * () {//TODO: need to add to anomaly util 
- LH
     let anomalyMapping = {};
+    let anomalies;
     //fetch the anomalies from the onion wrapper cache.
-    const applicationAnomalies = yield get(this, 
'anomaliesApiService').queryAnomaliesByAppName(get(this, 'appName'), get(this, 
'startDate'), get(this, 'endDate'));
+    if (this.get('appName') && this.get('subGroup')) {
+      //this functionality is not provided in the UI, but the user can 
manually type the params into URL simultaneously
+      anomalies = yield 
this.get('anomaliesApiService').queryAnomaliesByJoin(this.get('appName'), 
this.get('subGroup'), this.get('startDate'), this.get('endDate'));
+    } else if (this.get('appName')) {
+      anomalies = yield 
this.get('anomaliesApiService').queryAnomaliesByAppName(this.get('appName'), 
this.get('startDate'), this.get('endDate'));
+    } else {
+      anomalies = yield 
this.get('anomaliesApiService').queryAnomaliesBySubGroup(this.get('subGroup'), 
this.get('startDate'), this.get('endDate'));
 
 Review comment:
   Which endpoint is this calling? So that I can double check the backend to 
see if it's correct.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to