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 2e221e6 [TE] frontend - harleyjj/preview - disable preview button
instead of removing from DOM (#4485)
2e221e6 is described below
commit 2e221e64cc9c511672844d71574c3cc919654f5d
Author: Harley Jackson <[email protected]>
AuthorDate: Wed Nov 13 19:41:50 2019 -0800
[TE] frontend - harleyjj/preview - disable preview button instead of
removing from DOM (#4485)
---
.../app/pods/components/alert-details/component.js | 8 ++++++++
.../app/pods/components/alert-details/template.hbs | 18 ++++++++----------
2 files changed, 16 insertions(+), 10 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 a310762..3eebb29 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/component.js
@@ -328,6 +328,14 @@ export default Component.extend({
}
}),
+ disableRerunButton: computed(
+ 'alertYaml',
+ 'isLoading',
+ 'dataIsCurrent',
+ function() {
+ return (!get(this, 'alertYaml')|| get(this, 'isLoading') || get(this,
'dataIsCurrent'));
+ }
+ ),
disablePreviewButton: computed(
'alertYaml',
'_getAnomalies.isIdle',
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 ea330ba..5c9aaab 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
+++ b/thirdeye/thirdeye-frontend/app/pods/components/alert-details/template.hbs
@@ -3,16 +3,14 @@
<div class="pull-right">
{{#if isPreviewMode}}
{{#if showDetails}}
- {{#unless dataIsCurrent}}
- {{bs-button
- defaultText=(if showDetails "Rerun Preview" "Preview Alert")
- disabled=disablePreviewButton
- type="outline-primary"
- buttonType="refresh"
- onClick=(action "getPreview")
- class="te-button te-button--cancel"
- }}
- {{/unless}}
+ {{bs-button
+ defaultText=(if showDetails "Rerun Preview" "Preview Alert")
+ disabled=disableRerunButton
+ type="outline-primary"
+ buttonType="refresh"
+ onClick=(action "getPreview")
+ class="te-button te-button--cancel"
+ }}
{{else}}
{{bs-button
defaultText="Preview Alert"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]