Repository: ambari Updated Branches: refs/heads/branch-2.4 cb69417eb -> cdb8a7132
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/cdb8a713 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cdb8a713 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cdb8a713 Branch: refs/heads/branch-2.4 Commit: cdb8a7132448fbf3fdf7e44fe28591bd6274eda7 Parents: cb69417 Author: Zhe (Joe) Wang <[email protected]> Authored: Thu May 19 01:03:42 2016 -0400 Committer: Zhe (Joe) Wang <[email protected]> Committed: Thu May 19 01:04:59 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/cdb8a713/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');
