You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2012/06/07 04:26:32 UTC
svn commit: r1347320 - in /incubator/ambari/branches/ambari-186: CHANGES.txt
hmc/js/assignMasters.js hmc/js/clustersList.js hmc/js/selectServices.js
hmc/php/frontend/fetchClusterServices.php hmc/php/frontend/selectServices.php
Author: vikram
Date: Thu Jun 7 02:26:31 2012
New Revision: 1347320
URL: http://svn.apache.org/viewvc?rev=1347320&view=rev
Log:
AMBARI-489. Call out HMC master node in the topology and node assignments (Contributed by Yusaku)
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
incubator/ambari/branches/ambari-186/hmc/js/assignMasters.js
incubator/ambari/branches/ambari-186/hmc/js/clustersList.js
incubator/ambari/branches/ambari-186/hmc/js/selectServices.js
incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php
incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php
Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347320&r1=1347319&r2=1347320&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun 7 02:26:31 2012
@@ -6,6 +6,8 @@ characters wide.
Release 0.1.x - unreleased
+ AMBARI-489. Call out HMC master node in the topology and node assignments (Yusaku via Vikram)
+
AMBARI-488. Manage service needs a way to recover from terminated browser sessions (Yusaku via Vikram)
AMBARI-487. Add nodes with external name on AWS causes issues. (Vikram)
Modified: incubator/ambari/branches/ambari-186/hmc/js/assignMasters.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/assignMasters.js?rev=1347320&r1=1347319&r2=1347320&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/assignMasters.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/assignMasters.js Thu Jun 7 02:26:31 2012
@@ -1,239 +1,250 @@
-var registeredAssignHostsEventHandlers = false;
+function AssignMasters() {
-function getNodeInfo (allHosts, nodeName) {
- // globalYui.log("nodename: " + nodeName);
- if (nodeName == null) {
+ var registeredAssignHostsEventHandlers = false;
+
+ function getNodeInfo(nodeName) {
+ // globalYui.log("nodename: " + nodeName);
+ if (nodeName == null) {
+ return null;
+ }
+ for (host in this.allHosts) {
+ if (this.allHosts[host].hostName == nodeName) {
+ // globalYui.log("Get node info: " + allHosts[host].hostName);
+ return this.allHosts[host];
+ }
+ }
+
return null;
}
- for (host in allHosts) {
- if (allHosts[host].hostName == nodeName) {
- // globalYui.log("Get node info: " + allHosts[host].hostName);
- return allHosts[host];
- }
+
+ function addCommasToInt(num) {
+ return num.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
}
-
- return null;
-}
-
-function addCommasToInt(num) {
- return num.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
-}
-
-function getTotalMemForDisplay(totalMem) {
- return Math.round(totalMem / 102.4)/10 + "GB";
-}
-
-function renderHostsToMasterServices(allHosts, hostsToMasterServices) {
- var markup = '';
- for (var host in hostsToMasterServices) {
- var hostInfo = getNodeInfo(allHosts, 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>';
- }
- markup += '</ul><div style="clear:both"></div></div>';
- }
- $('#hostsToMasterServices').html(markup);
-}
-
-function addMasterServiceToHost(masterName, hostName, hostsToMasterServices, masterServices) {
- // enforce constraints on what services can be co-hosted (unless those suggestions were made by the server initially)
- // we currently disallow:
- // 1. namenode and secondary namenode to be on the same host
- // 2. more than one zookeeper server to be on the same host
-
- if (hostsToMasterServices[hostName] != null) {
- for (var service in hostsToMasterServices[hostName]) {
- if (masterName == 'NAMENODE' && service == 'SNAMENODE' || masterName == 'SNAMENODE' && service == 'NAMENODE') {
- alert('NameNode and Secondary NameNode cannot be hosted on the same host.');
- return false;
- }
- if (masterName.indexOf('ZOOKEEPER') == 0 && service.indexOf('ZOOKEEPER') == 0) {
- alert('You cannot put more than one ZooKeeper Server on the same host.');
- return false;
+
+ function getTotalMemForDisplay(totalMem) {
+ return Math.round(totalMem / 102.4)/10 + "GB";
+ }
+
+ 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>';
+ }
+ $('#hostsToMasterServices').html(markup);
+ }
+
+ function addMasterServiceToHost(masterName, hostName, hostsToMasterServices, masterServices) {
+ // enforce constraints on what services can be co-hosted (unless those suggestions were made by the server initially)
+ // we currently disallow:
+ // 1. namenode and secondary namenode to be on the same host
+ // 2. more than one zookeeper server to be on the same host
+
+ if (hostsToMasterServices[hostName] != null) {
+ for (var service in hostsToMasterServices[hostName]) {
+ if (masterName == 'NAMENODE' && service == 'SNAMENODE' || masterName == 'SNAMENODE' && service == 'NAMENODE') {
+ alert('NameNode and Secondary NameNode cannot be hosted on the same host.');
+ return false;
+ }
+ if (masterName.indexOf('ZOOKEEPER') == 0 && service.indexOf('ZOOKEEPER') == 0) {
+ alert('You cannot put more than one ZooKeeper Server on the same host.');
+ return false;
+ }
}
}
+ if (hostsToMasterServices[hostName] == null) {
+ hostsToMasterServices[hostName] = {};
+ }
+ hostsToMasterServices[hostName][masterName] = masterServices[masterName].displayName;
+ return true;
}
- if (hostsToMasterServices[hostName] == null) {
- hostsToMasterServices[hostName] = {};
- }
- hostsToMasterServices[hostName][masterName] = masterServices[masterName].displayName;
- return true;
-}
-
-function removeMasterServiceFromHost(masterName, hostName, hostsToMasterServices) {
- for (var i in hostsToMasterServices[hostName]) {
- if (i == masterName) {
- delete hostsToMasterServices[hostName][i];
- //alert(Object.keys(hostsToMasterServices[hostName]).length);
- if (Object.keys(hostsToMasterServices[hostName]).length == 0) {
- //alert('remove');
- delete hostsToMasterServices[hostName];
- }
- return;
- }
- }
-}
-
-function getMasterHostSelect(masterName, allHosts, chosenHostName) {
- var chosenHost = getNodeInfo(allHosts, chosenHostName);
- var markup = '<select name="' + masterName + '">';
- markup += '<option selected="selected" value="' + chosenHost.hostName + '">' + chosenHost.hostName + ' - ' + getTotalMemForDisplay(chosenHost.totalMem) + ', ' + chosenHost.cpuCount + ' cores</option>';
- for (var i in allHosts) {
- var host = allHosts[i];
- if (host.hostName != chosenHost.hostName) {
- markup += '<option value="' + host.hostName + '">' + host.hostName + ' - ' + getTotalMemForDisplay(host.totalMem) + ', ' + host.cpuCount + ' cores</option>';
- }
- }
- markup += '</select><div style="clear:both"></div><input type="hidden" style="display:none" id="' + masterName + 'ChosenHost" value="' + chosenHost.hostName + '">';
- return markup;
-}
-
-var globalClusterName = '';
-
-function renderAssignHosts(clusterInfo) {
-
- hideLoadingImg();
- globalYui.log("Render assign hosts data " + globalYui.Lang.dump(clusterInfo));
- globalYui.one('#assignHostsCoreDivId').setStyle("display", "block");
- globalClusterName = clusterInfo.clusterName;
-
- if( !registeredAssignHostsEventHandlers ) {
-
- globalYui.one('#selectServiceMastersSubmitButtonId').on('click', function (e) {
- e.target.set('disabled', true);
-
- var assignHostsRequestData = {};
- for (var masterName in masterServices) {
- var hostName = $('select[name=' + masterName + ']').val();
- if (masterName.indexOf("ZOOKEEPER_SERVER") == 0) {
- if (assignHostsRequestData['ZOOKEEPER_SERVER'] == null) {
- assignHostsRequestData['ZOOKEEPER_SERVER'] = [];
- }
- assignHostsRequestData['ZOOKEEPER_SERVER'].push(hostName);
- } else {
- if (assignHostsRequestData[masterName] == null) {
- assignHostsRequestData[masterName] = [];
- }
- assignHostsRequestData[masterName].push(hostName);
- }
- // globalYui.log("Assignment for " + masterName + " is " + assignHostsRequestData[masterName]);
- };
-
- globalYui.io("../php/frontend/assignMasters.php?clusterName="+globalClusterName, {
-
- method: 'POST',
- data: globalYui.JSON.stringify(assignHostsRequestData),
- timeout : 10000,
- on: {
- start: function(x, o) {
- showLoadingImg();
- },
- complete: function(x, o) {
- e.target.set('disabled', false);
- hideLoadingImg();
- },
-
- success: function (x,o) {
- e.target.set('disabled', false);
- globalYui.log("RAW JSON DATA: " + o.responseText);
-
- // Process the JSON data returned from the server
- try {
- clusterConfigJson = globalYui.JSON.parse(o.responseText);
- }
- catch (e) {
- alert("JSON Parse failed!");
- return;
+
+ function removeMasterServiceFromHost(masterName, hostName, hostsToMasterServices) {
+ for (var i in hostsToMasterServices[hostName]) {
+ if (i == masterName) {
+ delete hostsToMasterServices[hostName][i];
+ //alert(Object.keys(hostsToMasterServices[hostName]).length);
+ if (Object.keys(hostsToMasterServices[hostName]).length == 0) {
+ //alert('remove');
+ delete hostsToMasterServices[hostName];
+ }
+ return;
+ }
+ }
+ }
+
+ function getHostInfoForDisplay(host) {
+ return host.hostName + ' - ' + getTotalMemForDisplay(host.totalMem) + ', ' + host.cpuCount + ' cores';
+ }
+
+ function getMasterHostSelect(masterName, chosenHostName) {
+ var chosenHost = getNodeInfo(chosenHostName);
+ var markup = '<select name="' + masterName + '">';
+ markup += '<option selected="selected" value="' + chosenHost.hostName + '">' + getHostInfoForDisplay(chosenHost) + '</option>';
+ for (var i in this.allHosts) {
+ var host = this.allHosts[i];
+ if (host.hostName != chosenHost.hostName) {
+ markup += '<option value="' + host.hostName + '">' + host.hostName + ' - ' + getTotalMemForDisplay(host.totalMem) + ', ' + host.cpuCount + ' cores</option>';
+ }
+ }
+ markup += '</select><div style="clear:both"></div><input type="hidden" style="display:none" id="' + masterName + 'ChosenHost" value="' + chosenHost.hostName + '">';
+ return markup;
+ }
+
+ this.render = function (clusterInfo) {
+
+ hideLoadingImg();
+ globalYui.log("Render assign hosts data " + globalYui.Lang.dump(clusterInfo));
+ globalYui.one('#assignHostsCoreDivId').setStyle("display", "block");
+ globalClusterName = clusterInfo.clusterName;
+
+ if( !registeredAssignHostsEventHandlers ) {
+
+ globalYui.one('#selectServiceMastersSubmitButtonId').on('click', function (e) {
+ e.target.set('disabled', true);
+
+ var assignHostsRequestData = {};
+ for (var masterName in masterServices) {
+ var hostName = $('select[name=' + masterName + ']').val();
+ if (masterName.indexOf("ZOOKEEPER_SERVER") == 0) {
+ if (assignHostsRequestData['ZOOKEEPER_SERVER'] == null) {
+ assignHostsRequestData['ZOOKEEPER_SERVER'] = [];
}
-
- //globalYui.log("PARSED DATA: " + globalYui.Lang.dump(clusterConfigJson));
-
- if (clusterConfigJson.result != 0) {
- // Error!
- alert("Got error!" + clusterConfigJson.error);
- return;
+ assignHostsRequestData['ZOOKEEPER_SERVER'].push(hostName);
+ } else {
+ if (assignHostsRequestData[masterName] == null) {
+ assignHostsRequestData[masterName] = [];
}
-
- clusterConfigJson = clusterConfigJson.response;
-
- /* Done with this stage, transition to the next. */
- transitionToNextStage( "#assignHostsCoreDivId", assignHostsRequestData,
- "#configureClusterCoreDivId", clusterConfigJson, renderConfigureCluster );
- },
- failure: function (x,o) {
- e.target.set('disabled', false);
- alert("Async call failed!");
+ assignHostsRequestData[masterName].push(hostName);
}
- }
- });
- });
-
- registeredAssignHostsEventHandlers = true;
- }
-
- var allHosts = clusterInfo.allHosts;
- var servicesInfo = globalYui.Array( clusterInfo.services );
- var masterServices = {};
-
- globalYui.Array.each(servicesInfo, function(serviceInfo) {
- if( serviceInfo.enabled == true ) {
- var zkIndex = 1;
- globalYui.Array.each(serviceInfo.masters, function(masterInfo) {
-
- for (var i in masterInfo.hostNames) {
- var masterHostInfo = {
- 'name' : masterInfo.name,
- 'displayName' : masterInfo.displayName,
- 'host' : masterInfo.hostNames[i]
- };
- // there could be multiple zookeepers
- if (masterInfo.name == 'ZOOKEEPER_SERVER') {
- masterHostInfo.name = 'ZOOKEEPER_SERVER_' + zkIndex;
- masterHostInfo.displayName = masterHostInfo.displayName + ' ' + zkIndex;
- zkIndex++;
+ // globalYui.log("Assignment for " + masterName + " is " + assignHostsRequestData[masterName]);
+ };
+
+ globalYui.io("../php/frontend/assignMasters.php?clusterName=" + clusterInfo.clusterName, {
+
+ method: 'POST',
+ data: globalYui.JSON.stringify(assignHostsRequestData),
+ timeout : 10000,
+ on: {
+ start: function(x, o) {
+ showLoadingImg();
+ },
+ complete: function(x, o) {
+ e.target.set('disabled', false);
+ hideLoadingImg();
+ },
+
+ success: function (x,o) {
+ e.target.set('disabled', false);
+ globalYui.log("RAW JSON DATA: " + o.responseText);
+
+ // Process the JSON data returned from the server
+ try {
+ clusterConfigJson = globalYui.JSON.parse(o.responseText);
+ }
+ catch (e) {
+ alert("JSON Parse failed!");
+ return;
+ }
+
+ //globalYui.log("PARSED DATA: " + globalYui.Lang.dump(clusterConfigJson));
+
+ if (clusterConfigJson.result != 0) {
+ // Error!
+ alert("Got error!" + clusterConfigJson.error);
+ return;
+ }
+
+ clusterConfigJson = clusterConfigJson.response;
+
+ /* Done with this stage, transition to the next. */
+ transitionToNextStage( "#assignHostsCoreDivId", assignHostsRequestData,
+ "#configureClusterCoreDivId", clusterConfigJson, renderConfigureCluster );
+ },
+ failure: function (x,o) {
+ e.target.set('disabled', false);
+ alert("Async call failed!");
+ }
}
-
- masterServices[masterHostInfo.name] = masterHostInfo;
- }
+ });
});
+
+ registeredAssignHostsEventHandlers = true;
}
- });
- var hostsToMasterServices = {};
- var markup = '';
- for (var i in masterServices) {
- markup += '<div class="masterServiceSelect"><label><b>'
- + masterServices[i].displayName
- + '</b></label>' + getMasterHostSelect(masterServices[i].name, allHosts, masterServices[i].host)
- + '</div>';
- if (hostsToMasterServices[masterServices[i].host] == null) {
- hostsToMasterServices[masterServices[i].host] = {};
- }
- hostsToMasterServices[masterServices[i].host][masterServices[i].name] = masterServices[i].displayName;
- }
-
- $('#masterServicesToHosts').html(markup);
-
- renderHostsToMasterServices(allHosts, hostsToMasterServices);
-
- // prevValue is used to undo user selection in case we prevent the user from assigning a service
- var prevValue = '';
-
- $('select').click(function() {
- prevValue = $(this).val();
- }).change(function(event) {
- var masterName = $(this).attr('name');
- // masterServices[masterName] = $(this).val();
- var prevChosenHost = $('#' + masterName + 'ChosenHost').val();
- var newChosenHost = $(this).val();
- if (addMasterServiceToHost(masterName, newChosenHost, hostsToMasterServices, masterServices)) {
- removeMasterServiceFromHost(masterName, prevChosenHost, hostsToMasterServices);
- renderHostsToMasterServices(allHosts, hostsToMasterServices);
- $('#' + masterName + 'ChosenHost').val(newChosenHost);
- } else {
- $(this).val(prevValue);
- }
- });
+ this.allHosts = clusterInfo.allHosts;
+ this.managerHostName = clusterInfo.managerHostName;
+
+ var servicesInfo = globalYui.Array( clusterInfo.services );
+ var masterServices = {};
+
+ globalYui.Array.each(servicesInfo, function(serviceInfo) {
+ if( serviceInfo.enabled == true ) {
+ var zkIndex = 1;
+ globalYui.Array.each(serviceInfo.masters, function(masterInfo) {
+
+ for (var i in masterInfo.hostNames) {
+ var masterHostInfo = {
+ 'name' : masterInfo.name,
+ 'displayName' : masterInfo.displayName,
+ 'host' : masterInfo.hostNames[i]
+ };
+ // there could be multiple zookeepers
+ if (masterInfo.name == 'ZOOKEEPER_SERVER') {
+ masterHostInfo.name = 'ZOOKEEPER_SERVER_' + zkIndex;
+ masterHostInfo.displayName = masterHostInfo.displayName + ' ' + zkIndex;
+ zkIndex++;
+ }
+
+ masterServices[masterHostInfo.name] = masterHostInfo;
+ }
+ });
+ }
+ });
+
+ var hostsToMasterServices = {};
+ var markup = '';
+ for (var i in masterServices) {
+ markup += '<div class="masterServiceSelect"><label><b>'
+ + masterServices[i].displayName
+ + '</b></label>' + getMasterHostSelect(masterServices[i].name, masterServices[i].host)
+ + '</div>';
+ if (hostsToMasterServices[masterServices[i].host] == null) {
+ hostsToMasterServices[masterServices[i].host] = {};
+ }
+ hostsToMasterServices[masterServices[i].host][masterServices[i].name] = masterServices[i].displayName;
+ }
+
+ $('#masterServicesToHosts').html(markup);
+
+ renderHostsToMasterServices(hostsToMasterServices);
+
+ // prevValue is used to undo user selection in case we prevent the user from assigning a service
+ var prevValue = '';
+
+ $('select').click(function() {
+ prevValue = $(this).val();
+ }).change(function(event) {
+ var masterName = $(this).attr('name');
+ // masterServices[masterName] = $(this).val();
+ var prevChosenHost = $('#' + masterName + 'ChosenHost').val();
+ var newChosenHost = $(this).val();
+ if (addMasterServiceToHost(masterName, newChosenHost, hostsToMasterServices, masterServices)) {
+ removeMasterServiceFromHost(masterName, prevChosenHost, hostsToMasterServices);
+ renderHostsToMasterServices(hostsToMasterServices);
+ $('#' + masterName + 'ChosenHost').val(newChosenHost);
+ } else {
+ $(this).val(prevValue);
+ }
+ });
+ }; // end render
-}
+};
Modified: incubator/ambari/branches/ambari-186/hmc/js/clustersList.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/clustersList.js?rev=1347320&r1=1347319&r2=1347320&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/clustersList.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/clustersList.js Thu Jun 7 02:26:31 2012
@@ -1,4 +1,7 @@
function ClustersList() {
+
+ var managerHostName;
+
function populateHostToMasterRoleMapping(clusterServices, hostMap) {
for (var serviceName in clusterServices) {
@@ -64,11 +67,14 @@ function ClustersList() {
markup += '<div>';
for (var hostName in hostMap) {
- markup += '<div class="hostToServices"><h3>' + hostName + '</h3>' + '<ul>';
+ markup += '<div class="hostToServices clearfix"><h3>' + hostName + '</h3>' + '<ul>';
+ if (hostName == managerHostName) {
+ markup += '<li class="master">HMC Server</li>';
+ }
for (var service in hostMap[hostName]) {
markup += '<li class="' + ((hostMap[hostName][service].isMaster) ? 'master' : 'client') + '">' + hostMap[hostName][service].serviceName + '</li>';
}
- markup += '</ul><div style="clear:both"></div></div>';
+ markup += '</ul></div>';
}
markup += '</div>';
@@ -101,8 +107,7 @@ function ClustersList() {
return;
}
- clusterListInfoJson = clusterListInfoJson.response;
-
+ clusterListInfoJson = clusterListInfoJson.response;
var numClusters = clusterListInfoJson.length;
var clustersListMarkup;
var clusterId;
@@ -155,6 +160,8 @@ function ClustersList() {
alert("JSON Parse failed");
return;
}
+
+ managerHostName = clusterServicesResponseJson.response.managerHostName;
globalYui.log(globalYui.Lang.dump(clusterServicesResponseJson));
@@ -172,7 +179,6 @@ function ClustersList() {
'</div>' +
'</div>';
- /* Link the newly-generated markup into the DOM. */
globalYui.one("#clusterHostRoleMappingDynamicRenderDivId").setContent(
markup + generateHostRoleMappingMarkup(clusterServices) );
globalYui.one("#clusterHostRoleMappingDivId").show();
@@ -199,20 +205,7 @@ function ClustersList() {
// globalYui.one("#installationWizardDivId").setStyle('display','block');
});
}
-
- if(numClusters !=0) {
- globalYui.one('#existingClusterLinkDivId').on('click',function (e) {
-
- e.target.set('disabled', true);
-
- /* Done with this stage, hide it. */
- globalYui.one("#clustersListDivId").setStyle('display','none');
-
- /* Show off our rendering. */
- globalYui.one("#displayServiceStatusCoreDivId").setStyle('display','block');
- });
- }
-
+
},
failure: function (x,o) {
// e.target.set('disabled', false);
@@ -220,7 +213,7 @@ function ClustersList() {
}
}
});
- }
+ }; // end render
};
var clustersList = new ClustersList();
Modified: incubator/ambari/branches/ambari-186/hmc/js/selectServices.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/selectServices.js?rev=1347320&r1=1347319&r2=1347320&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/selectServices.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/selectServices.js Thu Jun 7 02:26:31 2012
@@ -312,7 +312,7 @@ globalYui.one('#selectServicesSubmitButt
var submitButton = globalYui.one('#selectServicesSubmitButtonId');
var thisScreenId = "#selectServicesCoreDivId";
var nextScreenId = "#assignHostsCoreDivId";
- var nextScreenRenderFunction = renderAssignHosts;
+ var nextScreenRenderFunction = new AssignMasters().render;
submitDataAndProgressToNextScreen(url, requestData, submitButton, thisScreenId, nextScreenId, nextScreenRenderFunction);
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php?rev=1347320&r1=1347319&r2=1347320&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/fetchClusterServices.php Thu Jun 7 02:26:31 2012
@@ -187,6 +187,7 @@ $jsonOutput = array(
'error' => $error,
'response' => array(
'clusterName' => $clusterName,
+ 'managerHostName' => strtolower(exec('hostname -f')),
'services' => $services )
);
Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php?rev=1347320&r1=1347319&r2=1347320&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/selectServices.php Thu Jun 7 02:26:31 2012
@@ -156,6 +156,8 @@ foreach($allServicesArray["services"] as
}
//////////////////// End of populate service masters for the UI ///////////////////////////
+$jsonOutput['managerHostName'] = strtolower(exec('hostname -f'));
+
// Update the state of the cluster.
$result = 0;
$error = "";