You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ap...@apache.org on 2018/11/14 20:25:45 UTC
[incubator-pinot] branch master updated: [TE] frontend -
aaronucsd/home - changes to sort the application list (#3465)
This is an automated email from the ASF dual-hosted git repository.
apucher 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 d1fb928 [TE] frontend - aaronucsd/home - changes to sort the application list (#3465)
d1fb928 is described below
commit d1fb928d9eb389183c451f599ae26a61df7207fb
Author: Long Huynh <lo...@linkedin.com>
AuthorDate: Wed Nov 14 12:25:40 2018 -0800
[TE] frontend - aaronucsd/home - changes to sort the application list (#3465)
---
.../thirdeye-frontend/app/pods/home/index/controller.js | 13 +++++++++++++
thirdeye/thirdeye-frontend/app/pods/home/index/template.hbs | 11 ++++++-----
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/thirdeye/thirdeye-frontend/app/pods/home/index/controller.js b/thirdeye/thirdeye-frontend/app/pods/home/index/controller.js
index a44674f..256eea3 100644
--- a/thirdeye/thirdeye-frontend/app/pods/home/index/controller.js
+++ b/thirdeye/thirdeye-frontend/app/pods/home/index/controller.js
@@ -6,6 +6,7 @@ import moment from 'moment';
import _ from 'lodash';
import { setUpTimeRangeOptions } from 'thirdeye-frontend/utils/manage-alert-utils';
import * as anomalyUtil from 'thirdeye-frontend/utils/anomaly';
+import { inject as service } from '@ember/service';
const TIME_PICKER_INCREMENT = 5; // tells date picker hours field how granularly to display time
const DEFAULT_ACTIVE_DURATION = '1d'; // setting this date range selection as default (Last 24 Hours)
@@ -16,6 +17,7 @@ const TIME_RANGE_OPTIONS = ['today', '1d', '2d', '1w'];
export default Controller.extend({
toggleCollapsed: false, /* hide/show accordians */
isReportAnomalyEnabled: false,
+ store: service('store'),
/**
* Overrides ember-models-table's css classes
@@ -39,6 +41,17 @@ export default Controller.extend({
});
},
+ sortedApplications: computed(
+ 'model.applications',
+ function() {
+ let model = get(this, 'model');
+
+ // Iterate through each anomaly
+ let applications = this.get('store').peekAll('application').sortBy('application');
+ return applications;
+ }
+ ),
+
filteredAnomalyMapping: computed(
'model.{anomalyMapping,feedbackType}',
function() {
diff --git a/thirdeye/thirdeye-frontend/app/pods/home/index/template.hbs b/thirdeye/thirdeye-frontend/app/pods/home/index/template.hbs
index b3797cb..674f337 100644
--- a/thirdeye/thirdeye-frontend/app/pods/home/index/template.hbs
+++ b/thirdeye/thirdeye-frontend/app/pods/home/index/template.hbs
@@ -10,10 +10,11 @@
predefinedRanges=pill.predefinedRanges
selectAction=(action "onRangeSelection")
}}
-
- {{#link-to "home.share-dashboard" (query-params appName=appName duration=duration startDate=startDate endDate=endDate feedbackType=feedbackType shareId=null) tagName="button" type="button" class="pull-right te-button te-button--outline"}}
- Share
- {{/link-to}}
+ {{#if (gt anomaliesCount 0)}}
+ {{#link-to "home.share-dashboard" (query-params appName=appName duration=duration startDate=startDate endDate=endDate feedbackType=feedbackType shareId=null) tagName="button" type="button" class="pull-right te-button te-button--outline"}}
+ Share
+ {{/link-to}}
+ {{/if}}
</header>
<article class="dashboard-container__body">
@@ -21,7 +22,7 @@
<h2 class="dashboard-container__title">Application:<span>{{appName}}</span></h2>
<div class="dashboard-container__application-header-dropdown">
{{#power-select
- options=model.applications
+ options=sortedApplications
selected=appNameSelected
searchField="application"
searchEnabled=true
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org