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

xhsun 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 fc2b2b7  [TE] frontend - harleyjj/alert-details - show blob in place 
of graph when loading and to display error when no time series returned (#5231)
fc2b2b7 is described below

commit fc2b2b74f3c508d81db861968e83df8dcb7c9cc0
Author: Harley Jackson <[email protected]>
AuthorDate: Mon Apr 13 10:25:07 2020 -0700

    [TE] frontend - harleyjj/alert-details - show blob in place of graph when 
loading and to display error when no time series returned (#5231)
---
 .../app/pods/components/alert-details/component.js | 17 +++++++++-
 .../app/pods/components/alert-details/template.hbs | 36 ++++++++++++++--------
 2 files changed, 40 insertions(+), 13 deletions(-)

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 c63c6fc..3b14190 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
@@ -179,6 +179,21 @@ export default Component.extend({
   ),
 
   /**
+   * Value to display in placeholder blob
+   * @type {String}
+   */
+  blobMessage: computed(
+    'getAnomaliesError',
+    function() {
+      let message = "Loading time series.";
+      if (this.get('getAnomaliesError')) {
+        message = "Error: can't get data.";
+      }
+      return message;
+    }
+  ),
+
+  /**
    * Rules to display in rules dropdown
    * @type {Array}
    */
@@ -901,7 +916,7 @@ export default Component.extend({
     } catch (error) {
       const previewErrorMsg = (error.body && typeof error.body === 'object') ? 
error.body.message : error.message;
       const previewErrorInfo = (error.body && typeof error.body === 'object') 
? error.body['more-info'] : error['more-info'];
-      notifications.error('Failed to get anomalies, please check warning above 
detection configuration', 'Error', toastOptions);
+      notifications.error('Failed to get anomalies', 'Error', toastOptions);
       this.set('getAnomaliesError', true);
       if (this.get('isPreviewMode')) {
         this.get('sendPreviewError')({
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 7b1982f..b622e43 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
@@ -255,19 +255,31 @@
 
             <div class="col-xs-12 te-graph-container">
               {{#if isDataLoading}}
-                <div class="spinner-wrapper spinner-wrapper--card">
-                  {{ember-spinner lines=30 radius=20 length=0 width=10 
opacity=0 trail=75 color='blue'}}
-                </div>
+                {{rootcause-placeholder
+                  message=blobMessage
+                  iconClass="glyphicon glyphicon-equalizer"}}
+                {{#unless getAnomaliesError}}
+                  <div class="spinner-wrapper spinner-wrapper--card">
+                    {{ember-spinner lines=30 radius=20 length=0 width=10 
opacity=0 trail=75 color='blue'}}
+                  </div>
+                {{/unless}}
+              {{else}}
+                {{#if getAnomaliesError}}
+                  {{rootcause-placeholder
+                    message=blobMessage
+                    iconClass="glyphicon glyphicon-equalizer"}}
+                {{else}}
+                  {{timeseries-chart
+                    series=series
+                    colorMapping=colorMapping
+                    axis=axis
+                    zoom=zoom
+                    legend=legend
+                    point=point
+                    order=order
+                  }}
+                {{/if}}
               {{/if}}
-              {{timeseries-chart
-                series=series
-                colorMapping=colorMapping
-                axis=axis
-                zoom=zoom
-                legend=legend
-                point=point
-                order=order
-              }}
               {{#unless isPreviewMode}}
                 <div class="te-form__note">
                   NOTE: If you find the metric shown above is inconsistent, 
please email <a class="thirdeye-link-secondary" target="_blank" 
href="{{graphMailtoLink}}">ask_thirdeye</a>.


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

Reply via email to