Forráskód Böngészése

AMBARI-16040. Popups ignore enter and escape key presses (akovalenko)

Aleksandr Kovalenko 9 éve
szülő
commit
cc5aded3b5
24 módosított fájl, 31 hozzáadás és 20 törlés
  1. 1 5
      ambari-web/app/controllers/main/alerts/alert_definitions_actions_controller.js
  2. 3 8
      ambari-web/app/controllers/main/alerts/definition_details_controller.js
  3. 2 0
      ambari-web/app/controllers/main/host/bulk_operations_controller.js
  4. 4 6
      ambari-web/app/controllers/main/service/manage_config_groups_controller.js
  5. 1 0
      ambari-web/app/mixins/main/dashboard/widgets/editable.js
  6. 1 0
      ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js
  7. 1 0
      ambari-web/app/routes/activate_hawq_standby_routes.js
  8. 1 0
      ambari-web/app/routes/add_alert_definition_routes.js
  9. 1 0
      ambari-web/app/routes/add_hawq_standby_routes.js
  10. 1 0
      ambari-web/app/routes/add_host_routes.js
  11. 1 0
      ambari-web/app/routes/add_kerberos_routes.js
  12. 1 0
      ambari-web/app/routes/add_service_routes.js
  13. 1 0
      ambari-web/app/routes/create_widget.js
  14. 1 0
      ambari-web/app/routes/edit_widget.js
  15. 1 0
      ambari-web/app/routes/high_availability_routes.js
  16. 1 0
      ambari-web/app/routes/main.js
  17. 1 0
      ambari-web/app/routes/ra_high_availability_routes.js
  18. 1 0
      ambari-web/app/routes/reassign_master_routes.js
  19. 1 0
      ambari-web/app/routes/remove_hawq_standby_routes.js
  20. 1 0
      ambari-web/app/routes/rm_high_availability_routes.js
  21. 1 0
      ambari-web/app/routes/rollbackHA_routes.js
  22. 2 1
      ambari-web/app/routes/stack_upgrade_routes.js
  23. 1 0
      ambari-web/app/views/common/modal_popups/select_groups_popup.js
  24. 1 0
      ambari-web/app/views/main/dashboard/widget.js

+ 1 - 5
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')
 
     });
   },

+ 3 - 8
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({

+ 2 - 0
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() {

+ 4 - 6
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')
     });
   }
 

+ 1 - 0
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
 

+ 1 - 0
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
 

+ 1 - 0
ambari-web/app/routes/activate_hawq_standby_routes.js

@@ -66,6 +66,7 @@ module.exports = App.WizardRoute.extend({
           }
         },
         didInsertElement: function () {
+          this._super();
           this.fitHeight();
         }
       });

+ 1 - 0
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();
           }
         });

+ 1 - 0
ambari-web/app/routes/add_hawq_standby_routes.js

@@ -69,6 +69,7 @@ module.exports = App.WizardRoute.extend({
           }
         },
         didInsertElement: function () {
+          this._super();
           this.fitHeight();
         }
       });

+ 1 - 0
ambari-web/app/routes/add_host_routes.js

@@ -62,6 +62,7 @@ module.exports = App.WizardRoute.extend({
             }
           },
           didInsertElement: function () {
+            this._super();
             this.fitHeight();
           }
         });

+ 1 - 0
ambari-web/app/routes/add_kerberos_routes.js

@@ -63,6 +63,7 @@ module.exports = App.WizardRoute.extend({
           }
         },
         didInsertElement: function () {
+          this._super();
           this.fitHeight();
         },
 

+ 1 - 0
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();
               }
             });

+ 1 - 0
ambari-web/app/routes/create_widget.js

@@ -38,6 +38,7 @@ module.exports = App.WizardRoute.extend({
         },
 
         didInsertElement: function () {
+          this._super();
           this.fitHeight();
         }
 

+ 1 - 0
ambari-web/app/routes/edit_widget.js

@@ -37,6 +37,7 @@ module.exports = App.WizardRoute.extend({
         },
 
         didInsertElement: function () {
+          this._super();
           this.fitHeight();
         }
 

+ 1 - 0
ambari-web/app/routes/high_availability_routes.js

@@ -70,6 +70,7 @@ module.exports = App.WizardRoute.extend({
             }
           },
           didInsertElement: function () {
+            this._super();
             this.fitHeight();
           }
         });

+ 1 - 0
ambari-web/app/routes/main.js

@@ -455,6 +455,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
                 });
               },
               didInsertElement: function () {
+                this._super();
                 this.fitHeight();
               }
             });

+ 1 - 0
ambari-web/app/routes/ra_high_availability_routes.js

@@ -51,6 +51,7 @@ module.exports = App.WizardRoute.extend({
           }
         },
         didInsertElement: function () {
+          this._super();
           this.fitHeight();
         }
       });

+ 1 - 0
ambari-web/app/routes/reassign_master_routes.js

@@ -75,6 +75,7 @@ module.exports = App.WizardRoute.extend({
               }
             },
             didInsertElement: function () {
+              this._super();
               this.fitHeight();
             }
           });

+ 1 - 0
ambari-web/app/routes/remove_hawq_standby_routes.js

@@ -80,6 +80,7 @@ module.exports = App.WizardRoute.extend({
           }
         },
         didInsertElement: function () {
+          this._super();
           this.fitHeight();
         }
       });

+ 1 - 0
ambari-web/app/routes/rm_high_availability_routes.js

@@ -49,6 +49,7 @@ module.exports = App.WizardRoute.extend({
           }
         },
         didInsertElement: function () {
+          this._super();
           this.fitHeight();
         }
       });

+ 1 - 0
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();
         }
       });

+ 2 - 1
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');

+ 1 - 0
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({

+ 1 - 0
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