ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-13902. Better Xpath needed for Mapreduce2 Client value field in Mapreduce2 summary
Date Mon, 16 Nov 2015 14:03:15 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 627e40bf4 -> af52444f7


AMBARI-13902. Better Xpath needed for Mapreduce2 Client value field in Mapreduce2 summary


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

Branch: refs/heads/trunk
Commit: af52444f7d07d44de85df4f4d32d7c8980262775
Parents: 627e40b
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Mon Nov 16 16:00:29 2015 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Mon Nov 16 16:03:11 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/models/client_component.js                    | 7 +++++++
 ambari-web/app/models/host_component.js                      | 8 ++++++++
 .../main/service/info/summary/client_components.hbs          | 4 ++--
 .../main/service/info/summary/master_components.hbs          | 4 ++--
 .../templates/main/service/info/summary/slave_components.hbs | 4 ++--
 5 files changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/af52444f/ambari-web/app/models/client_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/client_component.js b/ambari-web/app/models/client_component.js
index c63ebe1..816950c 100644
--- a/ambari-web/app/models/client_component.js
+++ b/ambari-web/app/models/client_component.js
@@ -28,6 +28,13 @@ App.ClientComponent = DS.Model.extend({
   stackInfo: DS.belongsTo('App.StackServiceComponent'),
   hostNames: DS.attr('array'),
 
+  summaryLabelClassName:function(){
+    return 'label_for_'+this.get('componentName').toLowerCase();
+  }.property('componentName'),
+
+  summaryValueClassName:function(){
+    return 'value_for_'+this.get('componentName').toLowerCase();
+  }.property('componentName'),
 
   displayName: function() {
     var displayName = App.format.role(this.get('componentName'));

http://git-wip-us.apache.org/repos/asf/ambari/blob/af52444f/ambari-web/app/models/host_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index 14ca7d6..1ef23db 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -29,6 +29,14 @@ App.HostComponent = DS.Model.extend({
   hostName: DS.attr('string'),
   service: DS.belongsTo('App.Service'),
   adminState: DS.attr('string'),
+
+  summaryLabelClassName:function(){
+    return 'label_for_'+this.get('componentName').toLowerCase();
+  }.property('componentName'),
+
+  summaryValueClassName:function(){
+    return 'value_for_'+this.get('componentName').toLowerCase();
+  }.property('componentName'),
   /**
    * Determine if component is client
    * @returns {bool}

http://git-wip-us.apache.org/repos/asf/ambari/blob/af52444f/ambari-web/app/templates/main/service/info/summary/client_components.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary/client_components.hbs b/ambari-web/app/templates/main/service/info/summary/client_components.hbs
index 42bdd44..c91adf8 100644
--- a/ambari-web/app/templates/main/service/info/summary/client_components.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/client_components.hbs
@@ -18,12 +18,12 @@
 <tr class="hidden"><td></td></tr>
 {{#each clientComponent in view.clientsObj}}
   <tr>
-    <td class="summary-label">
+    <td {{bindAttr class=":summary-label clientComponent.summaryLabelClassName"}}>
       <a {{action filterHosts clientComponent}} href="javascript:void(null)" >
         {{clientComponent.displayNamePluralized}}
       </a>
     </td>
-    <td class="summary-label">
+    <td {{bindAttr class=":summary-value clientComponent.summaryValueClassName"}}>
       <span class="green-live">{{clientComponent.installedCount}}</span> {{clientComponent.displayNamePluralized}}
{{t common.installed}}
     </td>
   </tr>

http://git-wip-us.apache.org/repos/asf/ambari/blob/af52444f/ambari-web/app/templates/main/service/info/summary/master_components.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary/master_components.hbs b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
index 0f7553b..b4ef0af 100644
--- a/ambari-web/app/templates/main/service/info/summary/master_components.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
@@ -18,7 +18,7 @@
 <tr class="hidden"><td></td></tr>
 {{#each comp in view.mastersComp}}
   <tr {{bindAttr class="comp.isSubComponent:component-small :component comp.componentName"}}>
-    <td class="summary-label">
+    <td {{bindAttr class=":summary-label comp.summaryLabelClassName"}}>
       <a href="#" {{action showDetails comp.host}} title="{{unbound comp.host.publicHostName}}"
rel="UsageTooltip">
         {{#if comp.displayNameAdvanced}}
           {{comp.displayNameAdvanced}}
@@ -27,7 +27,7 @@
         {{/if}}
       </a>
     </td>
-    <td class="summary-value">
+    <td {{bindAttr class=":summary-value comp.summaryValueClassName"}}>
       <span rel='SummaryComponentHealthTooltip' {{bindAttr class="comp.statusClass comp.statusIconClass"
data-original-title="comp.passiveTooltip"}}></span>
       {{comp.componentTextStatus}}
     </td>

http://git-wip-us.apache.org/repos/asf/ambari/blob/af52444f/ambari-web/app/templates/main/service/info/summary/slave_components.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary/slave_components.hbs b/ambari-web/app/templates/main/service/info/summary/slave_components.hbs
index d37c783..a164cde 100644
--- a/ambari-web/app/templates/main/service/info/summary/slave_components.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/slave_components.hbs
@@ -19,9 +19,9 @@
 
 {{#each slaveComponent in view.slavesObj}}
   <tr {{bindAttr class=":component slaveComponent.componentName"}}>
-    <td class="summary-label"><a href="#" {{action filterHosts slaveComponent}}>{{slaveComponent.displayNamePluralized}}</a>
+    <td {{bindAttr class=":summary-label slaveComponent.summaryLabelClassName"}}><a
href="#" {{action filterHosts slaveComponent}}>{{slaveComponent.displayNamePluralized}}</a>
     </td>
-    <td class="summary-value">
+    <td {{bindAttr class=":summary-value slaveComponent.summaryValueClassName"}}>
       <span>
         {{#view App.ComponentLiveTextView liveComponentsBinding="slaveComponent.startedCount"
totalComponentsBinding="slaveComponent.totalCount"}}
           {{view.liveComponents}}/{{view.totalComponents}}


Mime
View raw message