JoeFuentes-WebDev commented on a change in pull request #6472: URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562792975
########## File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js ########## @@ -12,9 +12,14 @@ import { formatYamlFilter, redundantParse } from 'thirdeye-frontend/utils/yaml-t import moment from 'moment'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; +const ANALYSIS_RANGE = [ + moment().add(1, 'day').subtract(30, 'day').startOf('day').valueOf(), + moment().add(1, 'day').startOf('day').valueOf() +]; + Review comment: I know it's beyond the scope of this PR, but I think this sort of constant is a good candidate for being in the `thirdeye-frontend/tests/utils/constants` file: ANALYSIS_30_DAY_RANGE (with some descriptive explanation) ... so it can be reused Also, is 30 days really what's desired? think Feb (28-day month) or 31-day months would `.subtract(1, 'months')` make more sense? ########## File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js ########## @@ -106,16 +116,16 @@ export default Route.extend(AuthenticatedRouteMixin, { notifications.error('Retrieving subscription groups failed.', error, toastOptions); } - let subscribedGroups = ""; + let subscribedGroups = ''; if (typeof get(this, 'subscriptionGroups') === 'object' && get(this, 'subscriptionGroups').length > 0) { const groups = get(this, 'subscriptionGroups'); for (let key in groups) { - if (groups.hasOwnProperty(key)) { + if (key in groups) { let group = groups[key]; Review comment: nitpic: isn't this redundant? i.e. won't `(key in groups)` always be _**true**_ inside of `for (let key in groups)`. ? ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org