diff --git a/xCAT-UI/css/style.css b/xCAT-UI/css/style.css
index db8804686..d1117c89b 100644
--- a/xCAT-UI/css/style.css
+++ b/xCAT-UI/css/style.css
@@ -233,11 +233,15 @@ body {
border-left: medium solid #E6E6F2;
}
-#nodes .summarypie {
+.summarypie {
width: 370px;
height: 280px;
}
+#summaryTab td{
+ border: 0px;
+ padding: 0px;
+}
/*--------------- Info/warning bar ---------------*/
span.ui-icon-info {
float: left;
diff --git a/xCAT-UI/js/nodes/mtm.js b/xCAT-UI/js/nodes/mtm.js
index d5bd26017..a8df10f3d 100644
--- a/xCAT-UI/js/nodes/mtm.js
+++ b/xCAT-UI/js/nodes/mtm.js
@@ -31,7 +31,7 @@ var hardwareInfo = {
'8233-E8B' : [ 'P7-750', '4' ],
'8236-E8C' : [ 'P7-755', '4' ],
'9117-MMB' : [ 'P7-770', '4' ],
- '9119-FHB' : [ 'P7-795', '42' ],
+ '9119-FHB' : [ 'P7-795', '4' ],
'9179-MHB' : [ 'P7-780', '42' ],
'9125-F2C' : [ 'Power 775', '2'],
'78AC-100' : [ 'Power 775', '2'] //fsp
diff --git a/xCAT-UI/js/nodes/nodes.js b/xCAT-UI/js/nodes/nodes.js
index 508014fd6..e190273ee 100644
--- a/xCAT-UI/js/nodes/nodes.js
+++ b/xCAT-UI/js/nodes/nodes.js
@@ -87,8 +87,8 @@ function loadNodesPage() {
success : function(data){
loadGroups(data);
- // draw cluster's summary by group names
- loadPieSummary();
+ // triggle the first group click event
+ $('#groups .groupdiv div').eq(0).trigger('click');
}
});
}
@@ -99,20 +99,19 @@ function loadNodesPage() {
*
* @return Nothing
*/
-function loadPieSummary(){
- $('#nodes').append('
Cluster Summary
');
- var summaryTable = '' +
+function loadPieSummary(groupname){
+ var summaryTable = '' +
'' +
- ' | ' +
- ' | ' +
+ ' | ' +
+ ' | ' +
'
' +
'' +
- ' | ' +
- ' | ' +
+ ' | ' +
+ ' | ' +
'
';
- $('#nodes').append(summaryTable);
+ $('#summaryTab').append(summaryTable);
- $('#nodes .summarypie').append(createLoader());
+ $('#summaryTab .summarypie').append(createLoader());
$.ajax({
url : 'lib/cmd.php',
@@ -120,7 +119,7 @@ function loadPieSummary(){
data : {
cmd : 'webrun',
tgt : '',
- args : 'summary',
+ args : 'summary;' + groupname,
msg : ''
},
success:function(data){
@@ -143,7 +142,7 @@ function drawPieSummary(index, valuepair){
var chattitle = '';
var dataArray = [];
var tempArray = [];
- var container = $('#nodes .summarypie').eq(index);
+ var container = $('#summaryTab .summarypie').eq(index);
position = valuepair.indexOf('=');
chattitle = valuepair.substr(0, position);
@@ -179,9 +178,9 @@ function drawPieSummary(index, valuepair){
location: 'e'
}
});
- container.bind('jqplotDataClick',loadSummaryDetail);
- container.bind('jqplotDataHighlight',function(){this.style.cursor='pointer';});
- container.bind('jqplotDataUnhighlight',function(){this.style.cursor='';});
+ //container.bind('jqplotDataClick',loadSummaryDetail);
+ //container.bind('jqplotDataHighlight',function(){this.style.cursor='pointer';});
+ //container.bind('jqplotDataUnhighlight',function(){this.style.cursor='';});
}
function loadSummaryDetail(ev, seriesIndex, pointIndex, data){
@@ -229,7 +228,7 @@ function loadGroups(data) {
$('#groups').append('Groups
');
var grouplist= $('');
// Create a link for each group
- for (var i = groups.length; i--;) {
+ for (var i = 0; i < groups.length; i++) {
grouplist.append('' + groups[i] + '
');
}
@@ -270,15 +269,18 @@ function drawNodesArea(targetgroup, cmdargs, message){
setNodesTab(tab);
tab.init();
$('#nodes').append(tab.object());
- tab.add('nodesTab', 'Table', loader, false);
+ tab.add('summaryTab', 'Summary', '', false);
+ tab.add('nodesTab', 'Nodes', loader, false);
tab.add('graphTab', 'Graphic', '', false);
$('#nodesPageTabs').bind('tabsselect', function(event, ui){
// for the graphical tab, we should check the graphical data first
- if (1 == ui.index){
+ if (2 == ui.index){
createPhysicalLayout(nodesList);
}
});
+
+ loadPieSummary(targetgroup);
// To improve performance, get all nodes within selected group
// Get node definitions only for first 50 nodes
$.ajax( {
@@ -1003,19 +1005,21 @@ function loadNodes(data) {
statCol.find('img').hide();
}
- // Get definable node attributes
- $.ajax( {
- url : 'lib/cmd.php',
- dataType : 'json',
- data : {
- cmd : 'lsdef',
- tgt : '',
- args : '-t;node;-h',
- msg : ''
- },
+ if (undefined == nodeAttrs){
+ // Get definable node attributes
+ $.ajax( {
+ url : 'lib/cmd.php',
+ dataType : 'json',
+ data : {
+ cmd : 'lsdef',
+ tgt : '',
+ args : '-t;node;-h',
+ msg : ''
+ },
- success : setNodeAttrs
- });
+ success : setNodeAttrs
+ });
+ }
/**
* Additional ajax requests need to be made for zVM
diff --git a/xCAT-UI/js/nodes/physical.js b/xCAT-UI/js/nodes/physical.js
index aedadc4eb..2c41c7864 100644
--- a/xCAT-UI/js/nodes/physical.js
+++ b/xCAT-UI/js/nodes/physical.js
@@ -152,13 +152,14 @@ function createPhysicalLayout(nodeList){
}
}
+ bpaList = new Object();
+ fspList = new Object();
+ lparList = new Object();
+ selectNode = new Object();
+
//there is not graphical data, get the info now
if (!flag){
graphicalNodeList = new Object();
- bpaList = new Object();
- fspList = new Object();
- lparList = new Object();
- selectNode = new Object();
initGraphicalData(0);
}
else{
@@ -174,16 +175,29 @@ function createPhysicalLayout(nodeList){
}
}
-function fillList(nodeName){
- var parentName = graphicalNodeList[nodeName]['parent'];
- var mtm = graphicalNodeList[nodeName]['mtm'];
- var status = graphicalNodeList[nodeName]['status'];
-
+function fillList(nodeName, defaultnodetype){
+ var parentName = '';
+ var mtm = '';
+ var status = '';
+ var nodetype = '';
+ if (!graphicalNodeList[nodeName]){
+ parentName = '';
+ mtm = '';
+ status = '';
+ nodetype = defaultnodetype;
+ }
+ else{
+ parentName = graphicalNodeList[nodeName]['parent'];
+ mtm = graphicalNodeList[nodeName]['mtm'];
+ status = graphicalNodeList[nodeName]['status'];
+ nodetype = graphicalNodeList[nodeName]['type'];
+ }
+
if ('' == status){
status = 'unknown';
}
- switch (graphicalNodeList[nodeName]['type']){
+ switch (nodetype){
case 'frame': {
if (undefined == bpaList[nodeName]){
bpaList[nodeName] = new Array();
@@ -198,7 +212,7 @@ function fillList(nodeName){
}
if (undefined == fspList[parentName]){
- fillList(parentName);
+ fillList(parentName, 'cec');
}
fspList[parentName]['children'].push(nodeName);
@@ -219,7 +233,7 @@ function fillList(nodeName){
}
if (undefined == bpaList[parentName]){
- fillList(parentName);
+ fillList(parentName, 'frame');
}
bpaList[parentName].push(nodeName);