Browse Source

AMBARI-588. Externalize the manager service name and point the Help link to a valid URL (Contributed by yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1356873 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 13 years ago
parent
commit
9d1d25afd9
6 changed files with 24 additions and 15 deletions
  1. 3 0
      CHANGES.txt
  2. 10 10
      hmc/js/assignMasters.js
  3. 1 1
      hmc/js/clustersList.js
  4. 3 3
      hmc/js/deployProgress.js
  5. 6 0
      hmc/js/utils.js
  6. 1 1
      hmc/php/conf/MessageResources-en.inc

+ 3 - 0
CHANGES.txt

@@ -6,6 +6,9 @@ characters wide.
 
 Release 1.0.0 - unreleased
 
+  AMBARI-588. Externalize the manager service name and point the Help link to
+  a valid URL (yusaku)
+
   AMBARI-587. Rat compliance patch. (vikram)
 
   AMBARI-583. UI allows io_sort_spill_percent value to be set to over 1.0

+ 10 - 10
hmc/js/assignMasters.js

@@ -49,16 +49,16 @@ function AssignMasters() {
   function renderHostsToMasterServices(hostsToMasterServices) {
   	var markup = '';
   	for (var host in hostsToMasterServices) {
-  		  var hostInfo = getNodeInfo(host);
-  		  markup += '<div class="hostToMasterServices"><h3>' + host + '<span class="hostInfo">' + getTotalMemForDisplay(hostInfo.totalMem) + ', ' + hostInfo.cpuCount + ' cores</span></h3><ul>';
-  		  for (var j in hostsToMasterServices[host]) {
-  			  markup += '<li>' + hostsToMasterServices[host][j] + '</li>';
-  		  }
-  		  // add HMC Server
-  		  if (host == this.managerHostName) {
-          markup += '<li>HMC Server</li>';	    
-  		  }
-        markup += '</ul><div style="clear:both"></div></div>';
+  	  var hostInfo = getNodeInfo(host);
+  	  markup += '<div class="hostToMasterServices"><h3>' + host + '<span class="hostInfo">' + getTotalMemForDisplay(hostInfo.totalMem) + ', ' + hostInfo.cpuCount + ' cores</span></h3><ul>';
+  	  for (var j in hostsToMasterServices[host]) {
+  	    markup += '<li>' + hostsToMasterServices[host][j] + '</li>';
+  	  }
+  	  // add manager server
+  	  if (host == this.managerHostName) {
+  	    markup += '<li>' + App.Props.managerServiceName + ' Server</li>';	    
+  	  }
+  	  markup += '</ul><div style="clear:both"></div></div>';
   	}
   	$('#hostsToMasterServices').html(markup);
   }

+ 1 - 1
hmc/js/clustersList.js

@@ -90,7 +90,7 @@ function ClustersList() {
     for (var hostName in hostMap) {
       markup += '<div class="hostToServices clearfix"><h3>' + hostName + '</h3>' + '<ul>';
       if (hostName == managerHostName) {
-        markup += '<li class="master">HMC Server</li>';
+        markup += '<li class="master">' + App.Props.managerServiceName + ' Server</li>';
       }
       for (var service in hostMap[hostName]) {
         markup += '<li class="' + ((hostMap[hostName][service].isMaster) ? 'master' : 'client') + '">' + hostMap[hostName][service].serviceName + '</li>';

+ 3 - 3
hmc/js/deployProgress.js

@@ -79,9 +79,9 @@ function renderDeployProgress (deployProgressInfo) {
   var hmcRestartMsg = '';
   if (deployProgressInfo.nagiosGangliaCoHosted != null
       && deployProgressInfo.nagiosGangliaCoHosted) {
-    hmcRestartMsg = '<span style="color:red"><strong>Note:</strong> You need to restart HMC as'
-        + ' Nagios/Ganglia are co-hosted on this server.<br>Please restart'
-        + ' HMC using \"service ambari restart\".</span><br>After that is done, ';
+    hmcRestartMsg = '<span style="color:red"><strong>Note:</strong> You need to restart ' + App.Props.managerServiceName + ' as'
+        + ' Nagios/Ganglia are co-hosted on this server.<br>Please restart '
+        + App.Props.managerServiceName + ' using \"service ' + App.Props.managerServiceName.toLowerCase() + ' restart\".</span><br>After that is done, ';
   } else {
     hmcRestartMsg = 'Please ';
   }

+ 6 - 0
hmc/js/utils.js

@@ -434,3 +434,9 @@ function generateHMCUrl( uriPath ) {
 
   return url;
 }
+
+var App = App || {
+  Props: {
+    managerServiceName: 'Ambari'
+  }
+};

+ 1 - 1
hmc/php/conf/MessageResources-en.inc

@@ -23,7 +23,7 @@
 $RES['app.name']="Ambari";
 $RES['page.title']="Ambari";
 $RES['page.footer.body']="";
-$RES['topnav.help.link']="";
+$RES['topnav.help.link']="http://incubator.apache.org/ambari/install.html";
 $RES['welcome.header']="Welcome to Ambari!";
 $RES['welcome.body']="";
 $RES['welcome.note']="Before you proceed, make sure you have performed all the pre-installation steps.";