From 10e91bb2d4ec0b6d51a4127c7264d2ec8f01a781 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Fri, 8 Jul 2011 08:59:58 +0000 Subject: [PATCH] add profiles in image tab for users to select git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10042 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/custom/ipmi.js | 4 +-- xCAT-UI/js/provision/images.js | 56 +++++++++++----------------------- 2 files changed, 20 insertions(+), 40 deletions(-) diff --git a/xCAT-UI/js/custom/ipmi.js b/xCAT-UI/js/custom/ipmi.js index bb708c089..5335a6807 100644 --- a/xCAT-UI/js/custom/ipmi.js +++ b/xCAT-UI/js/custom/ipmi.js @@ -256,8 +256,8 @@ function addidataplexNode(){ //compose all args into chdef for node args = '-t;node;-o;' + tempArray[0] + ';mac=' + tempArray[1] + ';ip=' + tempArray[2] + ';groups=' + - tempArray[3] + ';mgt=ipmi;chain="runcmd=bmcsetup,standby";netboot=xnba;nodetype=osi;profile=compute;' + - 'ondiscover=nodediscover;bmc=' + tempArray[4]; + tempArray[3] + ';mgt=ipmi;chain="runcmd=bmcsetup";netboot=xnba;nodetype=osi;profile=compute;' + + 'bmc=' + tempArray[4]; $.ajax({ url : 'lib/cmd.php', diff --git a/xCAT-UI/js/provision/images.js b/xCAT-UI/js/provision/images.js index cea40fcf8..e01788161 100644 --- a/xCAT-UI/js/provision/images.js +++ b/xCAT-UI/js/provision/images.js @@ -445,6 +445,8 @@ function loadCreateImage() { var showStr = ''; var imageOsvers = $.cookie("osvers").split(","); var imageArch = $.cookie("osarchs").split(","); + var profileArray = $.cookie("profiles").split(","); + var index = 0; // Create set properties form var setPropsForm = $('
'); @@ -455,24 +457,28 @@ function loadCreateImage() { // OS version selector showStr += '

'; // OS arch selector showStr += '

'; // Netboot interface input showStr += '

'; // Profile selector - showStr += '

'; + showStr += '

'; // Boot method selector - showStr += '

'; + showStr += '

'; setPropsForm.append(showStr); createHpcSelect(setPropsForm); @@ -484,39 +490,13 @@ function loadCreateImage() { // If they are valid, show the hpc stack select area. hpcShow(); - $.ajax( { - url : 'lib/systemcmd.php', - dataType : 'json', - data : { - cmd : 'lsb_release -d;uname -p' - }, - success : function(data) { - var tempArray = data.rsp.split("\n"); - var mnOs = tempArray[0]; - var mnArch = tempArray[1]; - tempArray = mnOs.split(" "); - - // Get the the version of MN - if (mnOs.indexOf("Red Hat") != -1) { - mnOs = "rhels" + tempArray[6]; - } - - $('#createImageTab option[value=' + mnOs + ']').attr('selected', 'selected'); - $('#createImageTab option[value=' + mnArch + ']').attr('selected', 'selected'); - - // The button used to create images is created here - var createImageBtn = createButton("Create Image"); - createImageBtn.bind('click', function(event) { - createImage(); - }); - - $('#createImageTab').append(createImageBtn); - - // Check the option and decide to show the hpcsoft or not - hpcShow(); - } - }); + // The button used to create images is created here + var createImageBtn = createButton("Create Image"); + createImageBtn.bind('click', function(event) { + createImage(); + }); + $('#createImageTab').append(createImageBtn); } /**