ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject ambari git commit: AMBARI-9684. Alerts UI: Unable to edit all configs of Alert definition (Web UI type).(xiwang)
Date Wed, 18 Feb 2015 00:56:32 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f7d97c74b -> a8ede908b


AMBARI-9684. Alerts UI: Unable to edit all configs of Alert definition (Web UI type).(xiwang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a8ede908
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a8ede908
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a8ede908

Branch: refs/heads/trunk
Commit: a8ede908b40d5a4a49e356d5352633ad00b97b24
Parents: f7d97c7
Author: Xi Wang <xiwang@apache.org>
Authored: Tue Feb 17 16:05:35 2015 -0800
Committer: Xi Wang <xiwang@apache.org>
Committed: Tue Feb 17 16:05:35 2015 -0800

----------------------------------------------------------------------
 ambari-web/app/models/alert_config.js | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a8ede908/ambari-web/app/models/alert_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/alert_config.js b/ambari-web/app/models/alert_config.js
index 440ee52..0ba04c6 100644
--- a/ambari-web/app/models/alert_config.js
+++ b/ambari-web/app/models/alert_config.js
@@ -491,6 +491,7 @@ App.AlertConfigProperties.Thresholds = {
 
     isValid: function () {
       var value = this.get('displayValue');
+      if (!value && this.get('type') === 'WEB') return true;
       if (!value) return false;
       value = ('' + value).trim();
       if (this.get('type') === 'AGGREGATE') {
@@ -523,6 +524,7 @@ App.AlertConfigProperties.Thresholds = {
 
     isValid: function () {
       var value = this.get('displayValue');
+      if (!value && this.get('type') === 'WEB') return true;
       if (!value) return false;
       value = ('' + value).trim();
         if (this.get('type') === 'AGGREGATE') {


Mime
View raw message