on the nodes page, save user's last select group name
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10435 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a9801185f1
commit
0dedd804ce
@ -401,16 +401,8 @@ function createProvision(plugin, container){
|
||||
});
|
||||
}
|
||||
|
||||
//image,nic,master,tftp,nfs,option
|
||||
showStr = '<div><label>Image:</label><select id="' + plugin + 'image"></select><img src="images/loader.gif"></img></div>' +
|
||||
'<div><label>Install Nic:</label><input value="mac"></div>' +
|
||||
'<div><label>Primary Nic:</label><input value="mac"></div>' +
|
||||
'<div><label>xCAT Master:</label><input ></div>' +
|
||||
'<div><label>TFTP Server:</label><input ></div>' +
|
||||
'<div><label>NFS Server:</label><input ></div>' +
|
||||
'<div id="advoption"></div>';
|
||||
|
||||
container.append(showStr);
|
||||
//option
|
||||
container.append('<div id="advoption"></div>');
|
||||
|
||||
//add the provision button
|
||||
var provisionBtn = createButton('Provision');
|
||||
@ -473,6 +465,9 @@ function createProvWithUrl(){
|
||||
var index = 0;
|
||||
var temparray;
|
||||
var showstr = '';
|
||||
var master = '';
|
||||
var tftpserver = '';
|
||||
var nfsserver = '';
|
||||
for (index = 0; index < argarray.length; index++){
|
||||
temparray = argarray[index].split('=');
|
||||
temphash[temparray[0]] = temparray[1];
|
||||
@ -483,6 +478,25 @@ function createProvWithUrl(){
|
||||
showstr += '<div><label>Architecture:</label><input type="text" disabled="disabled" value="' +
|
||||
temphash['arch'] + '"></div>';
|
||||
|
||||
showstr += '<div><label>Image:</label><select id="quickimage"></select><img src="images/loader.gif"></img></div>' +
|
||||
'<div><label>Install NIC:</label><input value="mac"></div>' +
|
||||
'<div><label>Primary NIC:</label><input value="mac"></div>' ;
|
||||
|
||||
if (temphash['master']){
|
||||
master = temphash['master'];
|
||||
}
|
||||
|
||||
if (temphash['nfsserver']){
|
||||
nfsserver = temphash['nfsserver'];
|
||||
}
|
||||
|
||||
if (temphash['tftpserver']){
|
||||
tftpserver = temphash['tftpserver'];
|
||||
}
|
||||
|
||||
showstr += '<div><label>xCAT Master:</label><input type="text" value="' + master + '"></div>';
|
||||
showstr += '<div><label>TFTP Server:</label><input type="text" value="' + tftpserver + '"></div>';
|
||||
showstr += '<div><label>NFS Server:</label><input type="text" value="' + nfsserver + '"></div>';
|
||||
return showstr;
|
||||
}
|
||||
|
||||
@ -519,7 +533,14 @@ function createProvNonurl(plugin){
|
||||
}
|
||||
strArch += '</div>';
|
||||
|
||||
return strGroup + strNodes + strArch;
|
||||
//add the static input part
|
||||
strSta = '<div><label>Image:</label><select id="' + plugin + 'image"></select><img src="images/loader.gif"></img></div>' +
|
||||
'<div><label>Install NIC:</label><input value="mac"></div>' +
|
||||
'<div><label>Primary NIC:</label><input value="mac"></div>' +
|
||||
'<div><label>xCAT Master:</label><input ></div>' +
|
||||
'<div><label>TFTP Server:</label><input ></div>' +
|
||||
'<div><label>NFS Server:</label><input ></div>';
|
||||
return strGroup + strNodes + strArch + strSta;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,8 +87,19 @@ function loadNodesPage() {
|
||||
|
||||
success : function(data){
|
||||
loadGroups(data);
|
||||
// triggle the first group click event
|
||||
$('#groups .groupdiv div').eq(0).trigger('click');
|
||||
var cookiegroup = $.cookie('selectgrouponnodes');
|
||||
if (cookiegroup){
|
||||
|
||||
$('#groups .groupdiv div').each(function(){
|
||||
if ($(this).text() == cookiegroup){
|
||||
$(this).trigger('click');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
// triggle the first group click event
|
||||
$('#groups .groupdiv div').eq(0).trigger('click');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -241,6 +252,9 @@ function loadGroups(data) {
|
||||
|
||||
$(this).addClass('selectgroup');
|
||||
drawNodesArea(thisGroup,'',thisGroup);
|
||||
|
||||
//save the selected groups into cookie
|
||||
$.cookie('selectgrouponnodes', thisGroup, { expires: 7 });
|
||||
});
|
||||
|
||||
// Make a link to add nodes
|
||||
@ -968,6 +982,9 @@ function loadNodes(data) {
|
||||
|
||||
success: showChdefOutput
|
||||
});
|
||||
|
||||
//save the data into global origAttrs
|
||||
origAttrs[node][attrName] = value;
|
||||
|
||||
return value;
|
||||
}, {
|
||||
@ -3216,6 +3233,9 @@ function jumpProvision(tgtnodes){
|
||||
var index = 0;
|
||||
var archtype = '';
|
||||
var errormessage = '';
|
||||
var master = '';
|
||||
var tftpserver = '';
|
||||
var nfsserver = '';
|
||||
var diaDiv = $('<div title="Provision (only supported for Linux)" class="form" id="deployDiv"></div>');
|
||||
// check the first node's arch type
|
||||
for (index in nodeArray){
|
||||
@ -3265,7 +3285,19 @@ function jumpProvision(tgtnodes){
|
||||
return;
|
||||
}
|
||||
|
||||
window.location.href = 'provision.php?nodes=' + tgtnodes + '&arch=' + archtype;
|
||||
if (origAttrs[nodeName]['xcatmaster']){
|
||||
master = origAttrs[nodeName]['xcatmaster'];
|
||||
}
|
||||
|
||||
if (origAttrs[nodeName]['tftpserver']){
|
||||
tftpserver = origAttrs[nodeName]['tftpserver'];
|
||||
}
|
||||
|
||||
if (origAttrs[nodeName]['nfsserver']){
|
||||
nfsserver = origAttrs[nodeName]['nfsserver'];
|
||||
}
|
||||
window.location.href = 'provision.php?nodes=' + tgtnodes + '&arch=' + archtype + '&master=' + master +
|
||||
'&tftpserver=' + tftpserver + '&nfsserver=' + nfsserver;
|
||||
}
|
||||
/**
|
||||
* Adjust datatable column size
|
||||
|
Loading…
Reference in New Issue
Block a user