You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/06/19 21:50:28 UTC

git commit: AMBARI-6208. Nagios 'Restart all components' button does not work (Buzhor Denys via alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 12dd8bd51 -> 297ccb1b0


AMBARI-6208. Nagios 'Restart all components' button does not work (Buzhor Denys via alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/297ccb1b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/297ccb1b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/297ccb1b

Branch: refs/heads/trunk
Commit: 297ccb1b0a7e4ec41c7cd34b48de55c0aecd7bd0
Parents: 12dd8bd
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Jun 19 22:47:06 2014 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Jun 19 22:47:06 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/item.js |  3 ++-
 ambari-web/app/models/service.js                | 12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/297ccb1b/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index 9d20edc..2066ab1 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -196,8 +196,9 @@ App.MainServiceItemController = Em.Controller.extend({
       confirmButton: Em.I18n.t('services.service.restartAll.confirmButton'),
       additionalWarningMsg: this.get('content.passiveState') === 'OFF' ? Em.I18n.t('services.service.restartAll.warningMsg.turnOnMM').format(serviceDisplayName): null
      });
+    var staleConfigsOnly = App.Service.find(serviceName).get('serviceTypes').contains('MONITORING');
     return App.showConfirmationFeedBackPopup(function(query) {
-      batchUtils.restartAllServiceHostComponents(serviceName, false, query);
+      batchUtils.restartAllServiceHostComponents(serviceName, staleConfigsOnly, query);
     }, bodyMessage);
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/297ccb1b/ambari-web/app/models/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js
index 3e87b9f..a01330b 100644
--- a/ambari-web/app/models/service.js
+++ b/ambari-web/app/models/service.js
@@ -101,6 +101,18 @@ App.Service = DS.Model.extend({
     return configurableServices.contains(this.get('serviceName'));
   }.property('serviceName'),
 
+  /**
+   * Service Tagging by their type.
+   * @type {String[]}
+   **/
+  serviceTypes: function() {
+    var typeServiceMap = {
+      GANGLIA: ['MONITORING'],
+      NAGIOS:  ['MONITORING']
+    };
+    return typeServiceMap[this.get('serviceName')] || [];
+  }.property('serviceName'),
+
   displayName: function () {
     return App.Service.DisplayNames[this.get('serviceName')];
   }.property('serviceName'),