This is an automated email from the ASF dual-hosted git repository.

jihao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 85b07f3  [TE] frontend - harleyjj/preview - provide custom time range 
before previewing (#4437)
85b07f3 is described below

commit 85b07f3d109132a8e089e7af7752e46463a4478b
Author: Harley Jackson <[email protected]>
AuthorDate: Thu Jul 18 16:03:15 2019 -0700

    [TE] frontend - harleyjj/preview - provide custom time range before 
previewing (#4437)
---
 .../app/pods/components/alert-details/component.js  |  5 ++++-
 .../app/pods/components/alert-details/template.hbs  | 21 +++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git 
a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js 
b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
index 528db3d..a7c1239 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
@@ -1088,7 +1088,10 @@ export default Component.extend({
       //Update the time range option selected
       set(this, 'analysisRange', [startDate, endDate]);
       set(this, 'duration', duration);
-      this._fetchAnomalies();
+      // This makes sure we don't fetch if the preview is collapsed
+      if(get(this, 'showDetails') && get(this, 'dataIsCurrent')){
+        this._fetchAnomalies();
+      }
     },
 
     /**
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs 
b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
index a2f1ea0..2976e10 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
@@ -419,11 +419,32 @@
                 </div>
         {{else}}
         <div class="yaml-editor-msg">Alert configuration has changed.</div>
+          {{range-pill-selectors
+            title="Show me"
+            uiDateFormat=pill.uiDateFormat
+            activeRangeEnd=pill.activeRangeEnd
+            activeRangeStart=pill.activeRangeStart
+            timeRangeOptions=pill.timeRangeOptions
+            timePickerIncrement=pill.timePickerIncrement
+            predefinedRanges=pill.predefinedRanges
+            selectAction=(action "onRangeSelection")
+          }}
         {{/if}}
       {{/if}}
     {{else}}
       {{#if disablePreviewButton}}
         <p>Enter YAML configuration to enable preview.</p>
+      {{else}}
+        {{range-pill-selectors
+          title="Show me"
+          uiDateFormat=pill.uiDateFormat
+          activeRangeEnd=pill.activeRangeEnd
+          activeRangeStart=pill.activeRangeStart
+          timeRangeOptions=pill.timeRangeOptions
+          timePickerIncrement=pill.timePickerIncrement
+          predefinedRanges=pill.predefinedRanges
+          selectAction=(action "onRangeSelection")
+        }}
       {{/if}}
     {{/if}}
   {{/unless}}


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

Reply via email to