Browse Source

AMBARI-8619. Remove experimental flag for Alerts when the feature is stabilized

Srimanth Gunturi 10 years ago
parent
commit
1a04f7c7d0

+ 0 - 1
ambari-web/app/config.js

@@ -59,7 +59,6 @@ App.enableExperimental = false;
 App.supports = {
   stackUpgrade: false,
   autoRollbackHA: false,
-  alerts: true,
   alwaysEnableManagedMySQLForHive: false,
   automatedKerberos: false,
   customizeAgentUserAccount: false

+ 8 - 15
ambari-web/app/controllers/global/cluster_controller.js

@@ -347,24 +347,17 @@ App.ClusterController = Em.Controller.extend({
           });
           self.updateLoadStatus('serviceMetrics');
 
-          if (App.get('supports.alerts')) {
-            updater.updateAlertGroups(function () {
-              updater.updateAlertDefinitions(function() {
-                updater.updateAlertDefinitionSummary(function () {
-                  updater.updateUnhealthyAlertInstances(function () {
-                    self.updateLoadStatus('alertGroups');
-                    self.updateLoadStatus('alertDefinitions');
-                    self.updateLoadStatus('alertInstancesUnhealthy');
-                  });
+          updater.updateAlertGroups(function () {
+            updater.updateAlertDefinitions(function() {
+              updater.updateAlertDefinitionSummary(function () {
+                updater.updateUnhealthyAlertInstances(function () {
+                  self.updateLoadStatus('alertGroups');
+                  self.updateLoadStatus('alertDefinitions');
+                  self.updateLoadStatus('alertInstancesUnhealthy');
                 });
               });
             });
-          }
-          else {
-            self.updateLoadStatus('alertGroups');
-            self.updateLoadStatus('alertDefinitions');
-            self.updateLoadStatus('alertInstancesUnhealthy');
-          }
+          });
         });
       });
       self.loadRootService().done(function (data) {

+ 5 - 6
ambari-web/app/controllers/global/update_controller.js

@@ -128,12 +128,11 @@ App.UpdateController = Em.Controller.extend({
       App.updater.run(this, 'updateComponentsState', 'isWorking', App.componentsUpdateInterval);
       App.updater.run(this, 'graphsUpdate', 'isWorking');
       App.updater.run(this, 'updateComponentConfig', 'isWorking');
-      if (App.get('supports.alerts')) {
-        App.updater.run(this, 'updateAlertGroups', 'isWorking', App.alertGroupsUpdateInterval);
-        App.updater.run(this, 'updateAlertDefinitions', 'isWorking', App.alertDefinitionsUpdateInterval);
-        App.updater.run(this, 'updateAlertDefinitionSummary', 'isWorking', App.alertDefinitionsUpdateInterval);
-        App.updater.run(this, 'updateUnhealthyAlertInstances', 'isWorking', App.alertInstancesUpdateInterval);
-      }
+
+      App.updater.run(this, 'updateAlertGroups', 'isWorking', App.alertGroupsUpdateInterval);
+      App.updater.run(this, 'updateAlertDefinitions', 'isWorking', App.alertDefinitionsUpdateInterval);
+      App.updater.run(this, 'updateAlertDefinitionSummary', 'isWorking', App.alertDefinitionsUpdateInterval);
+      App.updater.run(this, 'updateUnhealthyAlertInstances', 'isWorking', App.alertInstancesUpdateInterval);
     }
   }.observes('isWorking'),
   /**

+ 6 - 8
ambari-web/app/views/main/host/menu.js

@@ -40,14 +40,12 @@ App.MainHostMenuView = Em.CollectionView.extend({
         routing: 'stackVersions'
       });
     }
-    if (App.get('supports.alerts')) {
-      array.push({
-        label: 'Alerts',
-        routing: 'alerts',
-        badgeText: '0',
-        badgeClasses: 'label '
-      });
-    }
+    array.push({
+      label: 'Alerts',
+      routing: 'alerts',
+      badgeText: '0',
+      badgeClasses: 'label '
+    });
     return array;
   }.property(''),
 

+ 3 - 6
ambari-web/app/views/main/menu.js

@@ -39,13 +39,10 @@ App.MainMenuView = Em.CollectionView.extend({
         result.push(
           { label: Em.I18n.t('menu.item.dashboard'), routing: 'dashboard', active: 'active'},
           { label: Em.I18n.t('menu.item.services'), routing: 'services'},
-          { label: Em.I18n.t('menu.item.hosts'), routing: 'hosts', hasAlertsLabel: true}
+          { label: Em.I18n.t('menu.item.hosts'), routing: 'hosts', hasAlertsLabel: true},
+          { label: Em.I18n.t('menu.item.alerts'), routing: 'alerts'}
         );
 
-        if (App.get('supports.alerts')) {
-          result.push({ label: Em.I18n.t('menu.item.alerts'), routing: 'alerts'});
-        }
-
         if (!App.get('isHadoop2Stack')) {
           result.push({ label: Em.I18n.t('menu.item.jobs'), routing: 'apps'});
         }
@@ -58,7 +55,7 @@ App.MainMenuView = Em.CollectionView.extend({
     }
     return result;
   }.property('App.router.loggedIn', 'views.length',
-    'App.router.clusterController.isLoaded', 'App.router.clusterInstallCompleted', 'App.supports.alerts'),
+    'App.router.clusterController.isLoaded', 'App.router.clusterInstallCompleted'),
 
   itemViewClass: Em.View.extend({