incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-2754. Update YARN and MRv2 summary sections to reflect the format with component status. (Antonenko Alexander via yusaku)
Date Mon, 29 Jul 2013 20:22:01 GMT
Updated Branches:
  refs/heads/trunk 96480991e -> 4fad13ca7


AMBARI-2754. Update YARN and MRv2 summary sections to reflect the format with component status.
(Antonenko Alexander 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/4fad13ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/4fad13ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/4fad13ca

Branch: refs/heads/trunk
Commit: 4fad13ca77df347e0df5f2084c3c3cc536e24e57
Parents: 9648099
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Mon Jul 29 13:21:47 2013 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Mon Jul 29 13:21:47 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/mappers/service_mapper.js        |  4 +--
 ambari-web/app/messages.js                      | 10 +++---
 ambari-web/app/models/service/mapreduce2.js     |  2 +-
 .../templates/main/dashboard/service/yarn.hbs   | 37 ++++++++++----------
 .../main/service/info/summary/mapreduce2.hbs    | 27 +++++---------
 .../app/views/main/dashboard/service/yarn.js    | 27 +++++++++-----
 6 files changed, 53 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fad13ca/ambari-web/app/mappers/service_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_mapper.js b/ambari-web/app/mappers/service_mapper.js
index 30f036b..ab00caf 100644
--- a/ambari-web/app/mappers/service_mapper.js
+++ b/ambari-web/app/mappers/service_mapper.js
@@ -415,7 +415,7 @@ App.servicesMapper = App.QuickDataMapper.create({
     });
     // Map
     var finalJson = this.parseIt(item, finalConfig);
-    finalJson.quick_links = [ 19, 20, 21, 22 ];
+    finalJson.quick_links = [ 23, 24, 25, 26 ];
 
     return finalJson;
   },
@@ -442,7 +442,7 @@ App.servicesMapper = App.QuickDataMapper.create({
     });
     // Map
     var finalJson = this.parseIt(item, finalConfig);
-    finalJson.quick_links = [23, 24, 25, 26];
+    finalJson.quick_links = [27, 28, 29, 30];
 
     return finalJson;
   },

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fad13ca/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 118ce6d..4dda231 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -726,6 +726,9 @@ Em.I18n.translations = {
   'services.service.summary.viewHost':'View Host',
   'services.service.summary.viewHosts':'View Hosts',
   'services.service.summary.DataNodesLive':'DataNodes Live',
+  'services.service.summary.mapreduce2.client':'MapReduce2 Client',
+  'services.service.summary.mapreduce2.clients':'MapReduce2 Clients',
+  'services.service.summary.nodeManagersLive':'NodeManagers Live',
   'services.service.summary.TrackersLive':'Trackers Live',
   'services.service.summary.RegionServersLIVE':'RegionServers Live',
   'services.service.summary.GangliaMonitorsLIVE':'Ganglia Monitors Live',
@@ -1146,12 +1149,11 @@ Em.I18n.translations = {
   'dashboard.services.yarn.summary':'{0} of {1} nodes live',
   'dashboard.services.yarn.resourceManager':'ResourceManager',
   'dashboard.services.yarn.nodeManagers':'NodeManagers',
-  'dashboard.services.yarn.yarnClients':'YARN Clients',
-  'dashboard.services.yarn.resourceManagerWebUI':'ResourceManager Web UI',
+  'dashboard.services.yarn.nodeManager':'NodeManager',
+  'dashboard.services.yarn.clients':'YARN Clients',
+  'dashboard.services.yarn.client':'YARN Client',
   'dashboard.services.yarn.resourceManager.uptime':'ResourceManager Uptime',
   'dashboard.services.resourceManager.nodes.heap':'ResourceManager Heap',
-  'dashboard.services.yarn.nodeManagers.live': 'NodeManagers Alive',
-  'dashboard.services.yarn.nodeManagers.live.msg':'{0} live / {1} total',
   'dashboard.services.yarn.nodeManagers.status': 'NodeManagers Status',
   'dashboard.services.yarn.nodeManagers.status.msg': '{0} active / {1} lost / {2} unhealthy
/ {3} rebooted / {4} decommissioned',
   'dashboard.services.yarn.containers': 'Containers',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fad13ca/ambari-web/app/models/service/mapreduce2.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service/mapreduce2.js b/ambari-web/app/models/service/mapreduce2.js
index 4f5dc04..78b4466 100644
--- a/ambari-web/app/models/service/mapreduce2.js
+++ b/ambari-web/app/models/service/mapreduce2.js
@@ -20,7 +20,7 @@ var App = require('app');
 App.MapReduce2Service = App.Service.extend({
   version: DS.attr('string'),
   jobHistoryServer: DS.belongsTo('App.Host'),
-  mapReduce2Clients: DS.hasMany('App.Host'),
+  mapReduce2Clients: DS.hasMany('App.Host')
 });
 
 App.MapReduce2Service.FIXTURES = [];

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fad13ca/ambari-web/app/templates/main/dashboard/service/yarn.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/service/yarn.hbs b/ambari-web/app/templates/main/dashboard/service/yarn.hbs
index 79d4d0c..a35b78b 100644
--- a/ambari-web/app/templates/main/dashboard/service/yarn.hbs
+++ b/ambari-web/app/templates/main/dashboard/service/yarn.hbs
@@ -42,29 +42,33 @@
       <tbody>
     {{/unless}}
 
-      <!-- Resource Manager -->
-      <tr>
-        <td>{{t dashboard.services.yarn.resourceManager}}</td>
-        <td><a href="#" {{action showDetails view.service.resourceManagerNode}}>{{view.service.resourceManagerNode.publicHostName}}</a></td>
-      </tr>
+    {{view view.dashboardMasterComponentView}}
+
       <!-- Node Managers -->
       <tr>
         <td>{{t dashboard.services.yarn.nodeManagers}}</td>
         <td>
-          <a href="#" {{action filterHosts view.nodeManagerComponent}}>{{view.service.nodeManagerNodes.length}}
{{t dashboard.services.yarn.nodeManagers}}</a>
+          <span class="green-live">{{view.nodeManagersLive}}/{{view.service.nodeManagerNodes.length}}</span>
{{t services.service.summary.nodeManagersLive}}
+          <div class="summary-view-host">
+            <a href="#" {{action filterHosts view.nodeManagerComponent}}>{{view.nodeManagerText}}</a>
+          </div>
         </td>
       </tr>
       <!-- YARN Clients -->
       <tr>
-        <td>{{t dashboard.services.yarn.yarnClients}}</td>
+        <td class="summary-label">{{t dashboard.services.yarn.clients}}</td>
         <td>
-          <a href="#" {{action filterHosts view.yarnClientComponent}}>{{view.service.yarnClientNodes.length}}
{{t dashboard.services.yarn.yarnClients}}</a>
-        </td>
-      </tr>
-      <!-- Resource Manager Web UI -->
-      <tr>
-        <td>{{t dashboard.services.yarn.resourceManagerWebUI}}</td>
-        <td><a {{bindAttr href="view.nodeWebUrl"}} target="_blank">{{view.service.resourceManagerNode.publicHostName}}:8088</a>
+          <span class="green-live">{{view.service.yarnClientNodes.length}} </span>
+          {{t dashboard.services.yarn.client}}{{#if view.hasManyYarnClients}}s{{/if}} {{t
common.installed}}
+          <div class="summary-view-host">
+             <a {{action filterHosts view.yarnClientComponent}} href="javascript:void(null)">
+              {{#if view.hasManyYarnClients}}
+                {{t services.service.summary.viewHosts}}
+              {{else}}
+                {{t services.service.summary.viewHost}}
+              {{/if}}
+             </a>
+          </div>
         </td>
       </tr>
       <!-- Resource Manager Uptime -->
@@ -77,11 +81,6 @@
         <td>{{t dashboard.services.resourceManager.nodes.heap}}</td>
         <td>{{view.nodeHeap}}</td>
       </tr>
-      <!-- NodeManagers live -->
-      <tr>
-        <td>{{t dashboard.services.yarn.nodeManagers.live}}</td>
-        <td>{{view.nodeManagersLive}}</td>
-      </tr>
       <!-- NodeManagers status -->
       <tr>
         <td>{{t dashboard.services.yarn.nodeManagers.status}}</td>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fad13ca/ambari-web/app/templates/main/service/info/summary/mapreduce2.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary/mapreduce2.hbs b/ambari-web/app/templates/main/service/info/summary/mapreduce2.hbs
index d8f6dd2..49b30a2 100644
--- a/ambari-web/app/templates/main/service/info/summary/mapreduce2.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/mapreduce2.hbs
@@ -16,25 +16,14 @@
 * limitations under the License.
 }}
 
-{{#each component in view.components}}
-  {{#if component.isMaster}}
+{{view view.sumMasterComponentView}}
 <tr>
-  <td class="summary-label">{{component.displayName}}</td>
+  <td class="summary-label">{{t services.service.summary.mapreduce2.clients}}</td>
   <td>
-      <a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a>
+    <span class="green-live">{{view.clients.length}} </span>{{t services.service.summary.mapreduce2.client}}
+    {{#if view.hasManyClients}}s{{/if}} {{t common.installed}}
+    <div class="summary-view-host">
+      <a {{action filterHosts view.clientObj}} href="javascript:void(null)" >{{view.clientsHostText}}</a>
+    </div>
   </td>
-  <tr>
-    <td class="summary-label">{{t services.service.summary.historyServer}}</td>
-    <td>
-        <a {{bindAttr href="view.historyServerUI"}} target="_blank">{{component.host.publicHostName}}:19888</a>
-    </td>
-  </tr>
-</tr>
-  {{/if}}
-{{/each}}
-<tr>
-  <td class="summary-label">{{t common.clients}}</td>
-  <td>
-      <a {{action filterHosts view.clientObj}} href="javascript:void(null)">{{view.clients.length}}
MapReduce2 client{{#if view.hasManyClients}}s{{/if}}</a>
-  </td>
-</tr>
+</tr>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fad13ca/ambari-web/app/views/main/dashboard/service/yarn.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service/yarn.js b/ambari-web/app/views/main/dashboard/service/yarn.js
index a0bf78b..a739545 100644
--- a/ambari-web/app/views/main/dashboard/service/yarn.js
+++ b/ambari-web/app/views/main/dashboard/service/yarn.js
@@ -22,11 +22,6 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
   templateName: require('templates/main/dashboard/service/yarn'),
   serviceName: 'YARN',
 
-  nodeWebUrl: function () {
-    var hostName = this.get('service.resourceManagerNode').get('publicHostName');
-    return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : hostName)  + ":8088";
-  }.property('service.resourceManagerNode'),
-
   nodeHeap: function () {
     var memUsed = this.get('service').get('jvmMemoryHeapUsed') * 1000000;
     var memCommitted = this.get('service').get('jvmMemoryHeapCommitted') * 1000000;
@@ -49,7 +44,15 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
   yarnClientComponent: function () {
     return App.HostComponent.find().findProperty('componentName', 'YARN_CLIENT');
   }.property(),
-  
+
+  hasManyYarnClients: function () {
+    if(this.get('service.yarnClientNodes') > 1){
+      return true;
+    }else{
+      return false;
+    }
+  }.property('service.yarnClientNodes'),
+
   nodeUptime: function () {
     var uptime = this.get('service').get('resourceManagerStartTime');
     if (uptime && uptime > 0){
@@ -71,11 +74,17 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
   }.property('service.jvmMemoryHeapUsed', 'service.jvmMemoryHeapCommitted'),
 
   nodeManagersLive: function () {
-    var nodeManagers = this.get('service.nodeManagerNodes.length');
-    var nodeManagersLive = this.get('service.nodeManagerLiveNodes.length');
-    return this.t('dashboard.services.yarn.nodeManagers.live.msg').format(nodeManagersLive,
nodeManagers);
+    return this.get('service.nodeManagerLiveNodes.length');
   }.property('service.nodeManagerNodes', 'service.nodeManagerLiveNodes'),
 
+  nodeManagerText: function () {
+    if(this.get("service.nodeManagerNodes") > 1){
+      return Em.I18n.t('services.service.summary.viewHosts');
+    }else{
+      return Em.I18n.t('services.service.summary.viewHost');
+    }
+  }.property("service.nodeManagerNodes"),
+
   nodeManagersStatus: function () {
     var nmActive = this.get('service.nodeManagersCountActive');
     var nmLost = this.get('service.nodeManagersCountLost');


Mime
View raw message