diff --git a/xCAT-UI/js/monitor/rmcmon.js b/xCAT-UI/js/monitor/rmcmon.js
index d6e83237a..ed869b238 100644
--- a/xCAT-UI/js/monitor/rmcmon.js
+++ b/xCAT-UI/js/monitor/rmcmon.js
@@ -2,6 +2,7 @@ var globalErrNodes;
var globalNodesDetail;
var globalAllNodesNum = 0;
var globalFinishNodesNum = 0;
+var globalSelectedAttributes = '';
function loadRmcMon(){
//find the rmcmon tab
@@ -95,6 +96,12 @@ function loadRmcMonConfigure(){
});
});
+ //add the attributes button
+ var attrButton = createButton('Attribute Select');
+ rmcmonCfgDiv.append(attrButton);
+ attrButton.bind('click',function(){
+ showConfigureDia();
+ });
//add the cancel button
var cancelButton = createButton('Cancel');
rmcmonCfgDiv.append(cancelButton);
@@ -193,9 +200,17 @@ function rmcWorkingCheck(){
}
function loadRmcMonShow(){
- $('#rmcMonStatus').empty().append("Getting monitoring Data.");
+ $('#rmcMonStatus').empty().append("Getting monitoring Data(This step may take a long time).");
$('#rmcMonStatus').append(createLoader());
+ //init the selected Attributes string
+ if ($.cookie('rmcmonattr')){
+ globalSelectedAttributes = $.cookie('rmcmonattr');
+ }
+ else{
+ globalSelectedAttributes = 'PctTotalTimeIdle,PctTotalTimeWait,PctTotalTimeUser,PctTotalTimeKernel,PctRealMemFree';
+ }
+
//load the rmc status summary
$.ajax({
url : 'lib/cmd.php',
@@ -203,7 +218,7 @@ function loadRmcMonShow(){
data : {
cmd : 'webrun',
tgt : '',
- args : 'rmcshow;summary',
+ args : 'rmcshow;summary;' + globalSelectedAttributes,
msg : ''
},
@@ -219,7 +234,7 @@ function loadRmcMonShow(){
data : {
cmd : 'webrun',
tgt : '',
- args : 'rmcshow;lpar',
+ args : 'rmcshow;lpar;' + globalSelectedAttributes,
msg : ''
},
@@ -298,7 +313,7 @@ function parseRmcData(returnData){
data : {
cmd : 'webrun',
tgt : '',
- args : 'rmcshow;' + nodeName,
+ args : 'rmcshow;' + nodeName + ';' + globalSelectedAttributes,
msg : nodeName
},
@@ -517,4 +532,84 @@ function sortName(x, y){
else{
return -1;
}
+}
+
+function showConfigureDia(){
+ var diaDiv = $('
');
+ var tempArray = globalSelectedAttributes.split(',');
+ var selectedAttrHash = new Object();
+ var wholeAttrArray = new Array('PctTotalTimeIdle','PctTotalTimeWait','PctTotalTimeUser','PctTotalTimeKernel','PctRealMemFree');
+
+ //init the selectedAttrHash
+ for (var i in tempArray){
+ selectedAttrHash[tempArray[i]] = 1;
+ }
+ var attrTable = $('
');
+ for (var i in wholeAttrArray){
+ var name = wholeAttrArray[i];
+ var tempString = '