Browse Source

AMBARI-13030. Alerts are automatically added to newly created alert group if some alert group was chosen (alexantonenko)

Alex Antonenko 9 years ago
parent
commit
efb10fb026

+ 1 - 1
ambari-web/app/controllers/main/alerts/manage_alert_groups_controller.js

@@ -757,7 +757,7 @@ App.ManageAlertGroupsController = Em.Controller.extend({
           label: function () {
           label: function () {
             return this.get('displayName') + ' (' + this.get('definitions.length') + ')';
             return this.get('displayName') + ' (' + this.get('definitions.length') + ')';
           }.property('displayName', 'definitions.length'),
           }.property('displayName', 'definitions.length'),
-          definitions: self.get('selectedAlertGroup.definitions').slice(0),
+          definitions: duplicated ? self.get('selectedAlertGroup.definitions').slice(0) : [],
           notifications: self.get('alertGlobalNotifications'),
           notifications: self.get('alertGlobalNotifications'),
           isAddDefinitionsDisabled: false
           isAddDefinitionsDisabled: false
         });
         });