Repository: ambari Updated Branches: refs/heads/trunk 1a262a0dc -> 82eae43a5
AMBARI-5556. Flume service and component status should be shown correctly. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82eae43a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82eae43a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82eae43a Branch: refs/heads/trunk Commit: 82eae43a545fc02f52b7d69708e275592ae148de Parents: 1a262a0 Author: Aleksandr Kovalenko <[email protected]> Authored: Thu Apr 24 15:16:56 2014 +0300 Committer: Aleksandr Kovalenko <[email protected]> Committed: Thu Apr 24 15:19:21 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/main/service/info/summary.js | 2 +- ambari-web/app/models/service/flume.js | 6 ++---- ambari-web/app/views/main/service/services/flume.js | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/82eae43a/ambari-web/app/controllers/main/service/info/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js index 5e90b11..ff6a718 100644 --- a/ambari-web/app/controllers/main/service/info/summary.js +++ b/ambari-web/app/controllers/main/service/info/summary.js @@ -28,7 +28,7 @@ App.MainServiceInfoSummaryController = Em.Controller.extend({ */ startFlumeAgent: function () { var selectedFlumeAgent = this.get('selectedFlumeAgent'); - if (selectedFlumeAgent && selectedFlumeAgent.get('status') === 'INSTALLED') { + if (selectedFlumeAgent && selectedFlumeAgent.get('status') === 'NOT_RUNNING') { var self = this; App.showConfirmationPopup(function () { var state = 'STARTED'; http://git-wip-us.apache.org/repos/asf/ambari/blob/82eae43a/ambari-web/app/models/service/flume.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/service/flume.js b/ambari-web/app/models/service/flume.js index ebd1f4c..392a9b3 100644 --- a/ambari-web/app/models/service/flume.js +++ b/ambari-web/app/models/service/flume.js @@ -30,7 +30,7 @@ App.FlumeAgent = DS.Model.extend({ id: DS.attr('string'), name: DS.attr('string'), /** - * Status of agent. One of 'STARTED', 'INSTALLED', 'UNKNOWN'. + * Status of agent. One of 'RUNNING', 'NOT_RUNNING', 'UNKNOWN'. */ status: DS.attr('string'), host: DS.belongsTo('App.Host'), @@ -42,11 +42,9 @@ App.FlumeAgent = DS.Model.extend({ healthClass : function() { switch (this.get('status')) { case 'RUNNING': - case 'STARTING': return App.healthIconClassGreen; break; - case 'INSTALLED': - case 'STOPPING': + case 'NOT_RUNNING': return App.healthIconClassRed; break; case 'UNKNOWN': http://git-wip-us.apache.org/repos/asf/ambari/blob/82eae43a/ambari-web/app/views/main/service/services/flume.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/services/flume.js b/ambari-web/app/views/main/service/services/flume.js index 03019c5..df63f79 100644 --- a/ambari-web/app/views/main/service/services/flume.js +++ b/ambari-web/app/views/main/service/services/flume.js @@ -113,7 +113,7 @@ App.MainDashboardServiceFlumeView = App.TableView.extend({ var selectedFlumeAgent = this.get('controller.selectedFlumeAgent'); this.set('isActionsDisabled', !selectedFlumeAgent); if (selectedFlumeAgent) { - this.set('isStartAgentDisabled', selectedFlumeAgent.get('status') !== 'INSTALLED'); + this.set('isStartAgentDisabled', selectedFlumeAgent.get('status') !== 'NOT_RUNNING'); this.set('isStopAgentDisabled', selectedFlumeAgent.get('status') !== 'RUNNING'); } }.observes('controller.selectedFlumeAgent', 'controller.selectedFlumeAgent.status'), @@ -123,7 +123,7 @@ App.MainDashboardServiceFlumeView = App.TableView.extend({ * Highlight selected row and show metrics graphs of selected agent. * * @method showAgentInfo - * @param {object} event + * @param {object} agent */ showAgentInfo: function (agent) { this.set('controller.selectedFlumeAgent', agent);
