ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhew...@apache.org
Subject ambari git commit: AMBARI-16725 Alert type = RECOVERY does not have connection timeout (zhewang)
Date Thu, 19 May 2016 05:04:28 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 234438442 -> accda5c15


AMBARI-16725 Alert type = RECOVERY does not have connection timeout (zhewang)


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

Branch: refs/heads/trunk
Commit: accda5c15ce6dca917ea09cda486e6d889f857d9
Parents: 2344384
Author: Zhe (Joe) Wang <zhewang@apache.org>
Authored: Thu May 19 01:03:42 2016 -0400
Committer: Zhe (Joe) Wang <zhewang@apache.org>
Committed: Thu May 19 01:03:42 2016 -0400

----------------------------------------------------------------------
 .../alerts/definition_configs_controller.js     | 44 +++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/accda5c1/ambari-web/app/controllers/main/alerts/definition_configs_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js
index b58ced9..9b48b35 100644
--- a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js
+++ b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js
@@ -159,7 +159,7 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({
       	configs = this.renderServerConfigs();
       	break;
       case 'RECOVERY':
-      	configs = this.renderWebConfigs();
+        configs = this.renderRecoveryConfigs();
       	break;
       case 'AMS':
       	configs = this.renderAmsConfigs();
@@ -328,6 +328,48 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({
     return result;
   },
 
+  /**
+   * Render config properties for recovery-type alert definition
+   * @method renderRecoveryConfigs
+   * @returns {App.AlertConfigProperty[]}
+   */
+  renderRecoveryConfigs: function () {
+    var result = [];
+    var alertDefinition = this.get('content');
+    var isWizard = this.get('isWizard');
+
+    if (this.get('isWizard')) {
+      result = result.concat(this.renderCommonWizardConfigs());
+    }
+
+    result = result.concat([
+      App.AlertConfigProperties.Description.create({
+        value: isWizard ? '' : alertDefinition.get('description')
+      }),
+      App.AlertConfigProperties.Interval.create({
+        value: isWizard ? '' : alertDefinition.get('interval')
+      }),
+      App.AlertConfigProperties.Thresholds.OkThreshold.create({
+        label: 'Thresholds',
+        showInputForValue: false,
+        text: isWizard ? '' : this.getThresholdsProperty('ok', 'text'),
+        value: isWizard ? '' : this.getThresholdsProperty('ok', 'value')
+      }),
+      App.AlertConfigProperties.Thresholds.WarningThreshold.create({
+        showInputForValue: false,
+        text: isWizard ? '' : this.getThresholdsProperty('warning', 'text'),
+        value: isWizard ? '' : this.getThresholdsProperty('warning', 'value')
+      }),
+      App.AlertConfigProperties.Thresholds.CriticalThreshold.create({
+        showInputForValue: false,
+        text: isWizard ? '' : this.getThresholdsProperty('critical', 'text'),
+        value: isWizard ? '' : this.getThresholdsProperty('critical', 'value')
+      })
+    ]);
+
+    return result;
+  },
+
   renderAmsConfigs: function () {
     var result = [];
     var alertDefinition = this.get('content');


Mime
View raw message