Repository: ambari Updated Branches: refs/heads/trunk 5d92271a6 -> cc5aded3b
AMBARI-16040. Popups ignore enter and escape key presses (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cc5aded3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cc5aded3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cc5aded3 Branch: refs/heads/trunk Commit: cc5aded3b5ff25f9918b101e20fc1234fe773096 Parents: 5d92271 Author: Aleksandr Kovalenko <[email protected]> Authored: Fri Apr 22 16:38:41 2016 +0300 Committer: Aleksandr Kovalenko <[email protected]> Committed: Fri Apr 22 16:38:41 2016 +0300 ---------------------------------------------------------------------- .../main/alerts/alert_definitions_actions_controller.js | 6 +----- .../main/alerts/definition_details_controller.js | 11 +++-------- .../controllers/main/host/bulk_operations_controller.js | 2 ++ .../main/service/manage_config_groups_controller.js | 10 ++++------ ambari-web/app/mixins/main/dashboard/widgets/editable.js | 1 + .../mixins/main/dashboard/widgets/editable_with_limit.js | 1 + ambari-web/app/routes/activate_hawq_standby_routes.js | 1 + ambari-web/app/routes/add_alert_definition_routes.js | 1 + ambari-web/app/routes/add_hawq_standby_routes.js | 1 + ambari-web/app/routes/add_host_routes.js | 1 + ambari-web/app/routes/add_kerberos_routes.js | 1 + ambari-web/app/routes/add_service_routes.js | 1 + ambari-web/app/routes/create_widget.js | 1 + ambari-web/app/routes/edit_widget.js | 1 + ambari-web/app/routes/high_availability_routes.js | 1 + ambari-web/app/routes/main.js | 1 + ambari-web/app/routes/ra_high_availability_routes.js | 1 + ambari-web/app/routes/reassign_master_routes.js | 1 + ambari-web/app/routes/remove_hawq_standby_routes.js | 1 + ambari-web/app/routes/rm_high_availability_routes.js | 1 + ambari-web/app/routes/rollbackHA_routes.js | 1 + ambari-web/app/routes/stack_upgrade_routes.js | 3 ++- .../app/views/common/modal_popups/select_groups_popup.js | 1 + ambari-web/app/views/main/dashboard/widget.js | 1 + 24 files changed, 31 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js b/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js index 51d8c42..f3f0387 100644 --- a/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js +++ b/ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js @@ -176,11 +176,7 @@ App.MainAlertDefinitionActionsController = Em.ArrayController.extend({ return App.router.get('manageAlertGroupsController'); }.property('App.router.manageAlertGroupsController'), - disablePrimary: Em.computed.not('subViewController.isDefsModified'), - - didInsertElement: function () { - this.fitZIndex(); - } + disablePrimary: Em.computed.not('subViewController.isDefsModified') }); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/controllers/main/alerts/definition_details_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/alerts/definition_details_controller.js b/ambari-web/app/controllers/main/alerts/definition_details_controller.js index 15e09a4..ea9b5b7 100644 --- a/ambari-web/app/controllers/main/alerts/definition_details_controller.js +++ b/ambari-web/app/controllers/main/alerts/definition_details_controller.js @@ -293,9 +293,7 @@ App.MainAlertDefinitionDetailsController = Em.Controller.extend({ return this.get('inputValue') !== 'DEBUG' && (!validator.isValidInt(intValue) || intValue < 1 || intValue > 99); }.property('inputValue'), isChanged: function () { - var intValue = Number(this.get('inputValue')); - var isValueChanged = intValue != alertsRepeatTolerance; - return isValueChanged; + return Number(this.get('inputValue')) != alertsRepeatTolerance; }.property('inputValue'), doRestoreDefaultValue: function () { this.set('inputValue', alertsRepeatTolerance); @@ -308,11 +306,7 @@ App.MainAlertDefinitionDetailsController = Em.Controller.extend({ } var input = this.get('inputValue'); self.set('content.repeat_tolerance', input); - if (input == alertsRepeatTolerance) { - self.enableRepeatTolerance(false); - } else { - self.enableRepeatTolerance(true); - } + self.enableRepeatTolerance(input != alertsRepeatTolerance); App.ajax.send({ name: 'alerts.update_alert_definition', sender: self, @@ -326,6 +320,7 @@ App.MainAlertDefinitionDetailsController = Em.Controller.extend({ this.hide(); }, didInsertElement: function () { + this._super(); App.tooltip(this.$('[data-toggle=tooltip]')); }, bodyClass: Ember.View.extend({ http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/controllers/main/host/bulk_operations_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host/bulk_operations_controller.js b/ambari-web/app/controllers/main/host/bulk_operations_controller.js index 6714231..09d6a52 100644 --- a/ambari-web/app/controllers/main/host/bulk_operations_controller.js +++ b/ambari-web/app/controllers/main/host/bulk_operations_controller.js @@ -352,6 +352,7 @@ App.BulkOperationsController = Em.Controller.extend({ }.property(), didInsertElement: function() { + this._super(); this.set('expanded', hostsWithOutComponent.length <= minShown); }, @@ -807,6 +808,7 @@ App.BulkOperationsController = Em.Controller.extend({ }.property(), didInsertElement: function() { + this._super(); this.set('expanded', hostNames.length <= 3); }, onPrimary: function() { http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/controllers/main/service/manage_config_groups_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js index c3ac5aa..fb47c80 100644 --- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js +++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js @@ -671,9 +671,9 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { warningMessage: '', didInsertElement: function(){ + this._super(); this.validate(); this.$('input').focus(); - this.fitZIndex(); }, validate: function () { @@ -773,6 +773,8 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { primary: Em.I18n.t('common.save'), + autoHeight: false, + subViewController: configsController, /** @@ -955,11 +957,7 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { updateButtons: function () { var modified = this.get('subViewController.isHostsModified'); this.set('disablePrimary', !modified); - }.observes('subViewController.isHostsModified'), - - didInsertElement: function () { - this.fitZIndex(); - } + }.observes('subViewController.isHostsModified') }); } http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/mixins/main/dashboard/widgets/editable.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/main/dashboard/widgets/editable.js b/ambari-web/app/mixins/main/dashboard/widgets/editable.js index 9081ee8..c5d3bb4 100644 --- a/ambari-web/app/mixins/main/dashboard/widgets/editable.js +++ b/ambari-web/app/mixins/main/dashboard/widgets/editable.js @@ -97,6 +97,7 @@ App.EditableWidgetMixin = Em.Mixin.create({ }, didInsertElement: function () { + this._super(); var colors = [App.healthStatusGreen, App.healthStatusOrange, App.healthStatusRed]; //color green, orange ,red var handlers = [33, 66]; //fixed value http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js b/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js index 203bf11..97b6330 100644 --- a/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js +++ b/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js @@ -104,6 +104,7 @@ App.EditableWithLimitWidgetMixin = Em.Mixin.create({ }, didInsertElement: function () { + this._super(); var handlers = [configObj.get('thresh1'), configObj.get('thresh2')]; var colors = [App.healthStatusRed, App.healthStatusOrange, App.healthStatusGreen]; //color red, orange, green http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/activate_hawq_standby_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/activate_hawq_standby_routes.js b/ambari-web/app/routes/activate_hawq_standby_routes.js index c7631ca..8ab19db 100644 --- a/ambari-web/app/routes/activate_hawq_standby_routes.js +++ b/ambari-web/app/routes/activate_hawq_standby_routes.js @@ -66,6 +66,7 @@ module.exports = App.WizardRoute.extend({ } }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/add_alert_definition_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/add_alert_definition_routes.js b/ambari-web/app/routes/add_alert_definition_routes.js index c211954..15d0103 100644 --- a/ambari-web/app/routes/add_alert_definition_routes.js +++ b/ambari-web/app/routes/add_alert_definition_routes.js @@ -48,6 +48,7 @@ module.exports = App.WizardRoute.extend({ this.hide(); }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/add_hawq_standby_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/add_hawq_standby_routes.js b/ambari-web/app/routes/add_hawq_standby_routes.js index 9748ede..d802808 100644 --- a/ambari-web/app/routes/add_hawq_standby_routes.js +++ b/ambari-web/app/routes/add_hawq_standby_routes.js @@ -69,6 +69,7 @@ module.exports = App.WizardRoute.extend({ } }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/add_host_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/add_host_routes.js b/ambari-web/app/routes/add_host_routes.js index 4b9f79a..53ca9bc 100644 --- a/ambari-web/app/routes/add_host_routes.js +++ b/ambari-web/app/routes/add_host_routes.js @@ -62,6 +62,7 @@ module.exports = App.WizardRoute.extend({ } }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/add_kerberos_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/add_kerberos_routes.js b/ambari-web/app/routes/add_kerberos_routes.js index 074f821..4291394 100644 --- a/ambari-web/app/routes/add_kerberos_routes.js +++ b/ambari-web/app/routes/add_kerberos_routes.js @@ -63,6 +63,7 @@ module.exports = App.WizardRoute.extend({ } }, didInsertElement: function () { + this._super(); this.fitHeight(); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/add_service_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js index 2aaf1c1..ad256f5 100644 --- a/ambari-web/app/routes/add_service_routes.js +++ b/ambari-web/app/routes/add_service_routes.js @@ -55,6 +55,7 @@ module.exports = App.WizardRoute.extend({ addServiceController.resetOnClose(addServiceController, exitPath); }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/create_widget.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/create_widget.js b/ambari-web/app/routes/create_widget.js index 7975811..805b572 100644 --- a/ambari-web/app/routes/create_widget.js +++ b/ambari-web/app/routes/create_widget.js @@ -38,6 +38,7 @@ module.exports = App.WizardRoute.extend({ }, didInsertElement: function () { + this._super(); this.fitHeight(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/edit_widget.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/edit_widget.js b/ambari-web/app/routes/edit_widget.js index 38f0e53..adf3d75 100644 --- a/ambari-web/app/routes/edit_widget.js +++ b/ambari-web/app/routes/edit_widget.js @@ -37,6 +37,7 @@ module.exports = App.WizardRoute.extend({ }, didInsertElement: function () { + this._super(); this.fitHeight(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/high_availability_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/high_availability_routes.js b/ambari-web/app/routes/high_availability_routes.js index 47bfc30..d7641cd 100644 --- a/ambari-web/app/routes/high_availability_routes.js +++ b/ambari-web/app/routes/high_availability_routes.js @@ -70,6 +70,7 @@ module.exports = App.WizardRoute.extend({ } }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/main.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index c9f8590..c27ef54 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -455,6 +455,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, { }); }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/ra_high_availability_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/ra_high_availability_routes.js b/ambari-web/app/routes/ra_high_availability_routes.js index 10bf3a0..9995937 100644 --- a/ambari-web/app/routes/ra_high_availability_routes.js +++ b/ambari-web/app/routes/ra_high_availability_routes.js @@ -51,6 +51,7 @@ module.exports = App.WizardRoute.extend({ } }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/reassign_master_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/reassign_master_routes.js b/ambari-web/app/routes/reassign_master_routes.js index 8f57d8a..f079432 100644 --- a/ambari-web/app/routes/reassign_master_routes.js +++ b/ambari-web/app/routes/reassign_master_routes.js @@ -75,6 +75,7 @@ module.exports = App.WizardRoute.extend({ } }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/remove_hawq_standby_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/remove_hawq_standby_routes.js b/ambari-web/app/routes/remove_hawq_standby_routes.js index 44d88dd..8eb39d9 100644 --- a/ambari-web/app/routes/remove_hawq_standby_routes.js +++ b/ambari-web/app/routes/remove_hawq_standby_routes.js @@ -80,6 +80,7 @@ module.exports = App.WizardRoute.extend({ } }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/rm_high_availability_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/rm_high_availability_routes.js b/ambari-web/app/routes/rm_high_availability_routes.js index 8166650..af99c13 100644 --- a/ambari-web/app/routes/rm_high_availability_routes.js +++ b/ambari-web/app/routes/rm_high_availability_routes.js @@ -49,6 +49,7 @@ module.exports = App.WizardRoute.extend({ } }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/rollbackHA_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/rollbackHA_routes.js b/ambari-web/app/routes/rollbackHA_routes.js index 43a4eb8..17d3599 100644 --- a/ambari-web/app/routes/rollbackHA_routes.js +++ b/ambari-web/app/routes/rollbackHA_routes.js @@ -50,6 +50,7 @@ module.exports = App.WizardRoute.extend({ App.router.transitionTo('main.services'); }, didInsertElement: function () { + this._super(); this.fitHeight(); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/routes/stack_upgrade_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/stack_upgrade_routes.js b/ambari-web/app/routes/stack_upgrade_routes.js index b10a89b..abe5a6b 100644 --- a/ambari-web/app/routes/stack_upgrade_routes.js +++ b/ambari-web/app/routes/stack_upgrade_routes.js @@ -46,12 +46,13 @@ module.exports = App.WizardRoute.extend({ primary: Em.I18n.t('common.dismiss'), secondary: null, didInsertElement: function () { + this._super(); this.fitHeight(); this.fitInnerHeight(); }, /** - * fir height of scrollable block inside of modal body + * fit height of scrollable block inside of modal body */ fitInnerHeight: function () { var block = this.$().find('#modal > .modal-body'); http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/views/common/modal_popups/select_groups_popup.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/modal_popups/select_groups_popup.js b/ambari-web/app/views/common/modal_popups/select_groups_popup.js index 33c72a2..f33cd9e 100644 --- a/ambari-web/app/views/common/modal_popups/select_groups_popup.js +++ b/ambari-web/app/views/common/modal_popups/select_groups_popup.js @@ -36,6 +36,7 @@ App.showSelectGroupsPopup = function (selectedServiceName, selectedConfigGroup, dependentStepConfigs: dependentStepConfigs, selectedGroups: {}, didInsertElement: function() { + this._super(); this.set('selectedGroups', $.extend({},selectedConfigGroup.get('dependentConfigGroups'))); }, bodyClass: Em.CollectionView.extend({ http://git-wip-us.apache.org/repos/asf/ambari/blob/cc5aded3/ambari-web/app/views/main/dashboard/widget.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widget.js b/ambari-web/app/views/main/dashboard/widget.js index ba7c59d..6d83151 100644 --- a/ambari-web/app/views/main/dashboard/widget.js +++ b/ambari-web/app/views/main/dashboard/widget.js @@ -256,6 +256,7 @@ App.DashboardWidgetView = Em.View.extend({ }, didInsertElement: function () { + this._super(); var browserVersion = self.getInternetExplorerVersion(); var handlers = [configObj.get('thresh1'), configObj.get('thresh2')]; var colors = [App.healthStatusGreen, App.healthStatusOrange, App.healthStatusRed]; //color green, orange ,red
