diff --git a/xCAT-UI/js/custom/hmc.js b/xCAT-UI/js/custom/hmc.js
index 9598e965a..192df8f4e 100644
--- a/xCAT-UI/js/custom/hmc.js
+++ b/xCAT-UI/js/custom/hmc.js
@@ -698,22 +698,34 @@ function powerInitSupernode() {
// Add the introduction about the page
var infoStr = '
The supernode-list file lists what supernode numbers should be ';
infoStr += 'given to each CEC in each frame. Here is a sample file: ';
- infoStr += 'frame1: 0, 1, 16 frame2: 17, 32 frame3: 33, 48, 49 ';
- infoStr += 'frame4: 64 , 65, 80 frame5: 81, 96 frame6: 97(1), 112(1), 113(1), 37(1), 55, 71 ';
+ infoStr += 'frame01: 0, 1, 16 frame02: 17, 32 frame03: 33, 48, 49 ';
+ infoStr += 'frame04: 64 , 65, 80 frame05: 81, 96 frame06: 97(1), 112(1), 113(1), 37(1), 55, 71 ';
infoStr += 'The name before the colon is the node name of the frame BPC. The numbers after the colon '
+ 'are the supernode numbers to assign to the groups of CECs in that frame from bottom to top. '
+ 'Each supernode contains 4 CECs, unless it is immediately followed by "(#)", in which case the '
- + 'number in parenthesis indicates how many CECs are in this supernode.
';
+ + 'number in parenthesis indicates how many CECs are in this supernode.
'
+ + 'You can define the supernode by inputting manually or load a configure file same with the correct format.';
var InfoBar = createInfoBar(infoStr);
$('#discoverContentDiv #supernodeDiv').append(InfoBar);
+
+ var uploadform = $('');
+ uploadform.find('form').append(createButton('Parse'));
+ uploadform.ajaxForm({
+ success: parseSupernodeConfig
+ });
+
+ $('#discoverContentDiv #supernodeDiv').append(uploadform);
var frameArray = expandNR(getDiscoverEnv('frameName'));
var showStr = '
';
for (var i in frameArray) {
+ var tempname = 'sp_' + frameArray[i];
showStr += '
' + frameArray[i]
- + ':
';
}
@@ -721,6 +733,19 @@ function powerInitSupernode() {
$('#discoverContentDiv #supernodeDiv').append(showStr);
}
+/**
+ * Step 3: Parse the content in the configure file
+ */
+function parseSupernodeConfig(responseText){
+ var lines = responseText.split("\n");
+ for(var i in lines){
+ var spMap = lines[i].split(':');
+ var spName = spMap[0];
+ var spDef = spMap[1];
+ $('#sp_' + spName).attr('value', spDef);
+ }
+}
+
/**
* Step 3: Check the super node configure file
*/
@@ -1009,29 +1034,50 @@ function powerInitDiscoverFrames() {
$('.tooltip').remove();
var showDiv = $('