You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/01/11 01:51:26 UTC

svn commit: r1431767 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/messages.js ambari-web/app/templates/main/service/info/summary.hbs ambari-web/app/views/main/service/info/summary.js

Author: yusaku
Date: Fri Jan 11 00:51:26 2013
New Revision: 1431767

URL: http://svn.apache.org/viewvc?rev=1431767&view=rev
Log:
AMBARI-1099. Hive Service Summary needs to show service components better. (Srimanth Gunturi via yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/messages.js
    incubator/ambari/trunk/ambari-web/app/templates/main/service/info/summary.hbs
    incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1431767&r1=1431766&r2=1431767&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Jan 11 00:51:26 2013
@@ -458,6 +458,9 @@ AMBARI-666 branch (unreleased changes)
 
   IMPROVEMENTS
 
+  AMBARI-1099. Hive Service Summary needs to show service components better.
+  (Srimanth Gunturi via yusaku)
+
   AMBARI-1097.  Restrict user to proceed ahead of step 7 (Service configuration)
   when properties specified in custom-box are already exposed on the page.
   (Jaimin Jetly via yusaku)

Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1431767&r1=1431766&r2=1431767&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Fri Jan 11 00:51:26 2013
@@ -44,6 +44,7 @@ Em.I18n.translations = {
   'services.oozie.description':'System for workflow coordination and execution of Apache Hadoop jobs',
   'services.zookeeper.description':'ZooKeeper desc',
   'services.hbase.description':'Non-relational distributed database and centralized service for configuration management & synchronization',
+  'services.hive.databaseComponent':'Database Server',
   
   'services.alerts.OK.timePrefix': 'OK for ',
   'services.alerts.WARN.timePrefix': 'WARN for ',

Modified: incubator/ambari/trunk/ambari-web/app/templates/main/service/info/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/service/info/summary.hbs?rev=1431767&r1=1431766&r2=1431767&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/service/info/summary.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/service/info/summary.hbs Fri Jan 11 00:51:26 2013
@@ -90,26 +90,16 @@
         {{template "templates/main/service/info/summary/ganglia"}}
       {{/if}}
       {{#if view.serviceStatus.hive}}
-        <tr>
-          <td class="summary-label">Host</td>
-          <td>
-            {{#each component in controller.content.components}}
-              <a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a>
-           {{/each}}
-          </td>
-        </tr>
-        <tr>
-          <td>Database</td>
-          <td>{{view.data.hive.database}}</td>
-        </tr>
-        <tr>
-          <td>Database Name</td>
-          <td>{{view.data.hive.databaseName}}</td>
-        </tr>
-        <tr>
-          <td>User</td>
-          <td>{{view.data.hive.user}}</td>
-        </tr>
+		    {{#each component in view.hiveComponentsInfo}}
+		    <tr>
+		      <td>
+		        {{component.label}}
+		      </td>
+		      <td>
+	          <a href="#" {{action selectHost component.host}}>{{component.host.publicHostName}}</a>
+		      </td>
+		    </tr>
+		    {{/each}}
       {{/if}}
       </tbody>
     </table>

Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js?rev=1431767&r1=1431766&r2=1431767&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js Fri Jan 11 00:51:26 2013
@@ -197,6 +197,35 @@ App.MainServiceInfoSummaryView = Em.View
       return "";
     }
   }.property('controller.content'),
+  /**
+   * Returns hive components information in 
+   * the following format:
+   * {
+   *  label: "Component Name",
+   *  host: Host,
+   *  
+   */
+  hiveComponentsInfo: function(){
+    var componentInfos = [];
+    var service=this.get('controller.content');
+    if(service.get("id") == "HIVE"){
+      var self = this;
+      var components = service.get("components");
+      if(components){
+        components.forEach(function(component){
+          var ci = {
+              label: component.get('displayName'),
+              host: component.get('host')
+          };
+          if(component.get('id')=='MYSQL_SERVER'){
+            ci.label = self.t('services.hive.databaseComponent');
+          }
+          componentInfos.push(ci);
+        });
+      }
+    }
+    return componentInfos;
+  }.property('controller.content'),
   service:function () {
     var svc = this.get('controller.content');
     var svcName = svc.get('serviceName');