tejasajmera commented on a change in pull request #6568:
URL: https://github.com/apache/incubator-pinot/pull/6568#discussion_r573969478



##########
File path: 
thirdeye/thirdeye-frontend/app/pods/components/rootcause-custom-baseline/component.js
##########
@@ -26,10 +22,11 @@ export default Component.extend({
 
   selectedBaselineType: 'Unit over x units',
 
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
   baselineTypes: [UNIT_OVER_UNIT, MEAN_UNIT, MEDIAN_UNIT, MAX_UNIT, MIN_UNIT],
 
   selectedTimeUnit: 'Week',
-
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects

Review comment:
       You can set a `TIME_UNITS` constant above the component declaration and 
reference it here so you don't have to bypass eslint.

##########
File path: 
thirdeye/thirdeye-frontend/app/pods/components/rootcause-custom-baseline/component.js
##########
@@ -26,10 +22,11 @@ export default Component.extend({
 
   selectedBaselineType: 'Unit over x units',
 
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects

Review comment:
       You can set a `BASELINE_TYPES` constant above the component declaration 
and reference it here so you don't have to bypass eslint.

##########
File path: 
thirdeye/thirdeye-frontend/app/pods/components/rootcause-select-comparison-range/component.js
##########
@@ -40,58 +37,64 @@ export default Component.extend({
   showBaselineModal: false,
   showForecastTimeRanges: false,
   customBaselineValue: 'wo1w',
-
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects

Review comment:
       This entire object can be defined outside the component as a const and 
referenced here so as to avoid bypassing eslint.

##########
File path: 
thirdeye/thirdeye-frontend/app/pods/components/rootcause-select-comparison-range/component.js
##########
@@ -40,58 +37,64 @@ export default Component.extend({
   showBaselineModal: false,
   showForecastTimeRanges: false,
   customBaselineValue: 'wo1w',
-
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
   rangeOptions: {
     'Last hour': [makeTime().subtract(1, 'hours').startOf('hour'), 
makeTime().startOf('hours').add(1, 'hours')],
     'Last 3 hours': [makeTime().subtract(3, 'hours').startOf('hour'), 
makeTime().startOf('hours').add(1, 'hours')],
     'Last 6 hours': [makeTime().subtract(6, 'hours').startOf('hour'), 
makeTime().startOf('hours').add(1, 'hours')],
     'Last 24 hours': [makeTime().subtract(24, 'hours').startOf('hour'), 
makeTime().startOf('hours').add(1, 'hours')]
   },
-
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
   compareModeOptions: [

Review comment:
       same as above.

##########
File path: 
thirdeye/thirdeye-frontend/app/pods/components/range-pill-selectors/component.js
##########
@@ -50,46 +50,35 @@ export default Component.extend({
   /**
    * A set of arbitrary time ranges to help user with quick selection in 
date-time-picker
    */
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
   predefinedRanges: {

Review comment:
       You can define this object as a constant outside the component and then 
reference it here to avoid having to bypass eslint.

##########
File path: 
thirdeye/thirdeye-frontend/app/pods/components/rootcause-chart-toolbar/component.js
##########
@@ -44,9 +37,9 @@ export default Component.extend({
    * @type {String[]} - array of string values of options
    */
   granularityOptions: Object.keys(granularityMapping),
-
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects

Review comment:
       Lets define these arrays outside the component as constants and 
reference them here to avoid having to bypass eslint.

##########
File path: 
thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-details/component.js
##########
@@ -38,6 +39,7 @@ export default Component.extend({
     }
   },
 
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects

Review comment:
       Lets define the object outside the component as a const to avoid 
bypassing the eslint.

##########
File path: 
thirdeye/thirdeye-frontend/app/pods/components/filter-bar-input/component.js
##########
@@ -26,31 +26,26 @@ import { computed } from '@ember/object';
 import Component from '@ember/component';
 
 export default Component.extend({
-
   /**
    * @type Array
    * Default value for selected values in the filter bar input
    */
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects

Review comment:
       Same as above.

##########
File path: 
thirdeye/thirdeye-frontend/app/pods/components/entity-filter/component.js
##########
@@ -110,42 +106,42 @@ export default Component.extend({
    * Array containing the running list of all user-selected filters
    * @type {Array}
    */
+  // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects

Review comment:
       You can do this to avoid having to bypass eslint here-
   
   ```suggestion
    import { A as EmberArray } from '@ember/array';
    alertFilters: EmberArray()
   ```




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

Reply via email to