You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ak...@apache.org on 2019/04/11 15:38:44 UTC

[incubator-pinot] branch master updated: [TE] frontend - harleyjj/anomalies - add message for no anomaly results (#4101)

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

akshayrai09 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 ead365e  [TE] frontend - harleyjj/anomalies - add message for no anomaly results (#4101)
ead365e is described below

commit ead365ed4e5e131d2c98a8a875c9b0c6392aadbf
Author: Harley Jackson <ha...@gmail.com>
AuthorDate: Thu Apr 11 08:32:35 2019 -0700

    [TE] frontend - harleyjj/anomalies - add message for no anomaly results (#4101)
---
 .../app/pods/anomalies/controller.js               |   7 ++
 .../app/pods/anomalies/template.hbs                | 140 +++++++++++----------
 .../styles/components/range-pill-selectors.scss    |   1 +
 3 files changed, 81 insertions(+), 67 deletions(-)

diff --git a/thirdeye/thirdeye-frontend/app/pods/anomalies/controller.js b/thirdeye/thirdeye-frontend/app/pods/anomalies/controller.js
index b07e391..5e8124d 100644
--- a/thirdeye/thirdeye-frontend/app/pods/anomalies/controller.js
+++ b/thirdeye/thirdeye-frontend/app/pods/anomalies/controller.js
@@ -189,6 +189,13 @@ export default Controller.extend({
     }
   ),
 
+  noAnomalies: computed(
+    'totalAnomalies',
+    function() {
+      return (get(this, 'totalAnomalies') === 0);
+    }
+  ),
+
   paginatedSelectedAnomalies: computed(
     'selectedAnomalies.@each',
     'filtersTriggered',
diff --git a/thirdeye/thirdeye-frontend/app/pods/anomalies/template.hbs b/thirdeye/thirdeye-frontend/app/pods/anomalies/template.hbs
index 89fe486..2655dee 100644
--- a/thirdeye/thirdeye-frontend/app/pods/anomalies/template.hbs
+++ b/thirdeye/thirdeye-frontend/app/pods/anomalies/template.hbs
@@ -12,16 +12,18 @@
     </div>
   </aside>
 
-  {{range-pill-selectors
-    title="Showing"
-    uiDateFormat=pill.uiDateFormat
-    activeRangeEnd=pill.activeRangeEnd
-    activeRangeStart=pill.activeRangeStart
-    timeRangeOptions=pill.timeRangeOptions
-    timePickerIncrement=pill.timePickerIncrement
-    predefinedRanges=pill.predefinedRanges
-    selectAction=(action "onRangeSelection")
-  }}
+  <div class="col-md-9">
+      {{range-pill-selectors
+        title="Showing"
+        uiDateFormat=pill.uiDateFormat
+        activeRangeEnd=pill.activeRangeEnd
+        activeRangeStart=pill.activeRangeStart
+        timeRangeOptions=pill.timeRangeOptions
+        timePickerIncrement=pill.timePickerIncrement
+        predefinedRanges=pill.predefinedRanges
+        selectAction=(action "onRangeSelection")
+      }}
+  </div>
 
   <main class="manage-anomaly-container card-container card-container--padded col-md-9">
     {{#if isLoading}}
@@ -29,69 +31,73 @@
         {{ember-spinner}}
       </div>
     {{else}}
-      <div class="manage-anomaly-results">
-        <section class="te-search-header">
-          <span class="te-search-title">Anomalies ({{totalAnomalies}})</span>
-          {{#if allowFilterSummary}}
-            <span class="te-search-filters">{{activeFiltersString}}</span>
-            {{#if (gt activeFiltersString.length maxFilterStrngLength)}}
-              <span class="te-search-header__icon">
-                <i class="glyphicon glyphicon-resize-full"></i>
-                {{#popover-on-element side="left" class="te-search-header__tooltip te-tooltip"}}{{activeFiltersString}}{{/popover-on-element}}
+      {{#if noAnomalies}}
+        <h4>No anomalies found that match your criteria.</h4>
+      {{else}}
+        <div class="manage-anomaly-results">
+          <section class="te-search-header">
+            <span class="te-search-title">Anomalies ({{totalAnomalies}})</span>
+            {{#if allowFilterSummary}}
+              <span class="te-search-filters">{{activeFiltersString}}</span>
+              {{#if (gt activeFiltersString.length maxFilterStrngLength)}}
+                <span class="te-search-header__icon">
+                  <i class="glyphicon glyphicon-resize-full"></i>
+                  {{#popover-on-element side="left" class="te-search-header__tooltip te-tooltip"}}{{activeFiltersString}}{{/popover-on-element}}
+                </span>
+              {{/if}}
+            {{/if}}
+            {{#if paginatedSelectedAnomalies}}
+              <span class="te-search-header__displaynum pull-right">
+                Showing {{paginatedSelectedAnomalies.length}} of
+                {{totalAnomalies}} {{if (gt totalAnomalies 1) 'anomalies' 'anomaly'}}
               </span>
             {{/if}}
-          {{/if}}
-          {{#if paginatedSelectedAnomalies}}
-            <span class="te-search-header__displaynum pull-right">
-              Showing {{paginatedSelectedAnomalies.length}} of
-              {{totalAnomalies}} {{if (gt totalAnomalies 1) 'anomalies' 'anomaly'}}
-            </span>
-          {{/if}}
-        </section>
+          </section>
 
-        {{#if isLoading}}
-          <div class="spinner-wrapper-self-serve spinner-wrapper-self-serve--fixed">{{ember-spinner}}</div>
-        {{/if}}
+          {{#if isLoading}}
+            <div class="spinner-wrapper-self-serve spinner-wrapper-self-serve--fixed">{{ember-spinner}}</div>
+          {{/if}}
 
-        {{#each paginatedSelectedAnomalies as |anomaly|}}
-          <section class="te-search-results">
-            {{anomaly-summary
-              anomalyId=anomaly
-            }}
-          </section>
-        {{/each}}
+          {{#each paginatedSelectedAnomalies as |anomaly|}}
+            <section class="te-search-results">
+              {{anomaly-summary
+                anomalyId=anomaly
+              }}
+            </section>
+          {{/each}}
 
-      </div>
+        </div>
 
-    {{!--pagination--}}
-      {{#if (gt pagesNum 1)}}
-        <nav class="text-center" aria-label="Page navigation">
-          <ul class="pagination">
-            <li class={{if (eq currentPage 1) 'active disabled'}} >
-              <a href="#" {{action "onPaginationClick" 1}} aria-label="First">
-                <span aria-hidden="true">First</span>
-              </a>
-            </li>
-            <li class={{if (eq currentPage 1) 'active disabled'}}>
-              <a href="#" {{action "onPaginationClick" "previous"}} aria-label="Previous">
-                <span aria-hidden="true">Previous</span>
-              </a>
-            </li>
-            {{#each viewPages as |page|}}
-              <li class={{if (eq page currentPage) 'active'}}><a href="#" {{action "onPaginationClick" page}}>{{page}}</a></li>
-            {{/each}}
-            <li class={{if (eq currentPage pagesNum) 'disabled'}} >
-              <a href="#" {{action "onPaginationClick" "next"}} aria-label="Next">
-                <span aria-hidden="true">Next</span>
-              </a>
-            </li>
-            <li class={{if (eq currentPage pagesNum) 'disabled'}} >
-              <a href="#" {{action "onPaginationClick" pagesNum}} aria-label="Last">
-                <span aria-hidden="true">Last</span>
-              </a>
-            </li>
-          </ul>
-        </nav>
+      {{!--pagination--}}
+        {{#if (gt pagesNum 1)}}
+          <nav class="text-center" aria-label="Page navigation">
+            <ul class="pagination">
+              <li class={{if (eq currentPage 1) 'active disabled'}} >
+                <a href="#" {{action "onPaginationClick" 1}} aria-label="First">
+                  <span aria-hidden="true">First</span>
+                </a>
+              </li>
+              <li class={{if (eq currentPage 1) 'active disabled'}}>
+                <a href="#" {{action "onPaginationClick" "previous"}} aria-label="Previous">
+                  <span aria-hidden="true">Previous</span>
+                </a>
+              </li>
+              {{#each viewPages as |page|}}
+                <li class={{if (eq page currentPage) 'active'}}><a href="#" {{action "onPaginationClick" page}}>{{page}}</a></li>
+              {{/each}}
+              <li class={{if (eq currentPage pagesNum) 'disabled'}} >
+                <a href="#" {{action "onPaginationClick" "next"}} aria-label="Next">
+                  <span aria-hidden="true">Next</span>
+                </a>
+              </li>
+              <li class={{if (eq currentPage pagesNum) 'disabled'}} >
+                <a href="#" {{action "onPaginationClick" pagesNum}} aria-label="Last">
+                  <span aria-hidden="true">Last</span>
+                </a>
+              </li>
+            </ul>
+          </nav>
+        {{/if}}
       {{/if}}
     {{/if}}
   </main>
diff --git a/thirdeye/thirdeye-frontend/app/styles/components/range-pill-selectors.scss b/thirdeye/thirdeye-frontend/app/styles/components/range-pill-selectors.scss
index 22189e9..93235a5 100644
--- a/thirdeye/thirdeye-frontend/app/styles/components/range-pill-selectors.scss
+++ b/thirdeye/thirdeye-frontend/app/styles/components/range-pill-selectors.scss
@@ -1,4 +1,5 @@
 .range-pill-selectors {
+  clear: left;
   margin-top: 12px;
 
   &__list {


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