Updated Branches: refs/heads/trunk e17c52989 -> a6b4a81be
AMBARI-2875. 0/x NodeManagers shown in green color. This is a patch to fix the color coding for MapReduce service. (xiwang via yusaku) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/a6b4a81b Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/a6b4a81b Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/a6b4a81b Branch: refs/heads/trunk Commit: a6b4a81be3564b2b96486683244b913ed1ee73b8 Parents: e17c529 Author: Yusaku Sako <[email protected]> Authored: Fri Sep 13 15:57:27 2013 -0700 Committer: Yusaku Sako <[email protected]> Committed: Fri Sep 13 15:57:27 2013 -0700 ---------------------------------------------------------------------- .../app/templates/main/dashboard/service/mapreduce.hbs | 7 +++++-- ambari-web/app/views/main/dashboard/service/mapreduce.js | 9 +++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a6b4a81b/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs b/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs index e1e41c7..f49645e 100644 --- a/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs +++ b/ambari-web/app/templates/main/dashboard/service/mapreduce.hbs @@ -48,8 +48,11 @@ <tr> <td>{{t dashboard.services.mapreduce.taskTrackers}}</td> <td> - - <span class="green-live">{{view.trackersSummary}}</span> {{t services.service.summary.TrackersLive}} + <span> + {{#view view.trackersLiveTextView}} + {{view.liveComponents}}/{{view.totalComponents}} + {{/view}} + </span> {{t services.service.summary.TrackersLive}} <div class="summary-view-host"> <a href="#" {{action filterHosts view.taskTrackerComponent}}>{{view.trackersText}}</a> </div> http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a6b4a81b/ambari-web/app/views/main/dashboard/service/mapreduce.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/service/mapreduce.js b/ambari-web/app/views/main/dashboard/service/mapreduce.js index 2a9b04a..326850a 100644 --- a/ambari-web/app/views/main/dashboard/service/mapreduce.js +++ b/ambari-web/app/views/main/dashboard/service/mapreduce.js @@ -74,6 +74,15 @@ App.MainDashboardServiceMapreduceView = App.MainDashboardServiceView.extend({ return template.format(liveCount, totalCount); }.property('service.aliveTrackers.length', 'service.taskTrackers.length'), + trackersLiveTextView: App.ComponentLiveTextView.extend({ + liveComponents: function() { + return App.HostComponent.find().filterProperty('componentName', 'TASKTRACKER').filterProperty("workStatus","STARTED").get("length"); + }.property("service.hostComponents.@each", "service.aliveTrackers.length"), + totalComponents: function() { + return this.get("service.taskTrackers.length"); + }.property('service.taskTrackers.length') + }), + trackersHeapSummary: function () { var heapUsed = this.get('service').get('jobTrackerHeapUsed'); var heapMax = this.get('service').get('jobTrackerHeapMax');
