harleyjj 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_r276763209
 
 

 ##########
 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:
   Here's an example, with appName and group seeming to have join behavior, 
based on the responses I've gotten:
   
   /userdashboard/anomalies?appName={someAppName}group={someSubGroup}

----------------------------------------------------------------
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