You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/11/07 19:49:00 UTC

[GitHub] [incubator-pinot] xiaohui-sun commented on a change in pull request #4794: [TE] frontend - harleyjj/homepage - homepage facelift and default to …

xiaohui-sun commented on a change in pull request #4794: [TE] frontend - harleyjj/homepage - homepage facelift and default to …
URL: https://github.com/apache/incubator-pinot/pull/4794#discussion_r343841021
 
 

 ##########
 File path: thirdeye/thirdeye-frontend/app/pods/home/index/route.js
 ##########
 @@ -61,18 +62,28 @@ export default Route.extend(AuthenticatedRouteMixin, {
       applications,
       subscriptionGroups,
       feedbackType,
-      subGroup
+      subGroup,
+      getAnomaliesTask
     });
   },
 
   afterModel(model) {
     // Overrides with params if exists
-    const appName = model.appName || null;//model.applications.get('firstObject.application');
-    const startDate = Number(model.startDate) || this.get('startDate');//TODO: we can use ember transform here
-    const endDate = Number(model.endDate) || this.get('endDate');
-    const duration = model.duration || this.get('duration');
+    let appName = model.appName || null;//model.applications.get('firstObject.application');
+    let startDate = Number(model.startDate) || this.get('startDate');//TODO: we can use ember transform here
+    let endDate = Number(model.endDate) || this.get('endDate');
+    let duration = model.duration || this.get('duration');
     const feedbackType = model.feedbackType || this.get('feedbackType');
     const subGroup = model.subGroup || null;
+
+    // if there are no selections made, set to tier0-tier1 application by default
+    if (!appName && !subGroup) {
+      appName = 'tier0-tier1';
+      startDate = moment().startOf('day').subtract(1, 'week').utc().valueOf();
 
 Review comment:
   Are we using utc()? I remember we pinned pst for frontend.

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


With regards,
Apache Git Services

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