From ff714f6861b929a128d9f1a2fd88b3ce7c9bea47 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Fri, 23 Sep 2011 06:22:37 +0000 Subject: [PATCH] users can change the node name on rscan result dialog git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10617 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/custom/blade.js | 12 ++++++++++-- xCAT-UI/js/custom/hmc.js | 8 +++++++- xCAT-UI/js/ui.js | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/xCAT-UI/js/custom/blade.js b/xCAT-UI/js/custom/blade.js index 62a70a938..aa037c0fb 100644 --- a/xCAT-UI/js/custom/blade.js +++ b/xCAT-UI/js/custom/blade.js @@ -283,7 +283,7 @@ bladePlugin.prototype.addNode = function() { open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }, - close : function(){$(this).remove()}, + close : function(){$(this).remove();}, buttons : { 'Ok' : function() { //remove all error bar @@ -429,6 +429,8 @@ function showScanMmResult(rscanresult){ var rows = rscanresult.split("\n"); if (rows.length < 2){ + resultDiv.append(createWarnBar(rows[0])); + $('#bladeDiaInputDiv').append(resultDiv); return; } @@ -457,7 +459,12 @@ function showScanMmResult(rscanresult){ for(var j = 0; j < colnum; j++){ temprow += ''; if (fields[j]){ - temprow += fields[j]; + if (j == 1){ + temprow += ''; + } + else{ + temprow += fields[j]; + } } temprow += ''; } @@ -478,6 +485,7 @@ function addMmScanNode(){ $('#bladeDiaInputDiv :checked').each(function(){ if ($(this).attr('name')){ nodename += $(this).attr('name') + ','; + nodename += $(this).parents('tr').find('input').eq(1).val() + ','; } }); diff --git a/xCAT-UI/js/custom/hmc.js b/xCAT-UI/js/custom/hmc.js index e8967bf52..1d242167d 100644 --- a/xCAT-UI/js/custom/hmc.js +++ b/xCAT-UI/js/custom/hmc.js @@ -311,7 +311,12 @@ function drawRscanResult(rscanresult){ for(var j = 0; j < colnum; j++) { temprow += ''; if (fields[j]) { - temprow += fields[j]; + if (j == 1){ + temprow += ''; + } + else{ + temprow += fields[j]; + } } temprow += ''; } @@ -381,6 +386,7 @@ function addPNode(){ $('#pnodeeditarea :checked').each(function() { if ($(this).attr('name')) { nodename += $(this).attr('name') + ','; + nodename += $(this).parents('tr').find('input').eq(1).val() + ','; } }); diff --git a/xCAT-UI/js/ui.js b/xCAT-UI/js/ui.js index 78e1bc2fa..83a572bef 100644 --- a/xCAT-UI/js/ui.js +++ b/xCAT-UI/js/ui.js @@ -755,7 +755,7 @@ function openSettings() { "Ok": function(){ // Save selected theme var theme = $(this).find('input[name="theme"]:checked').val(); - $.cookie('xcat_theme', theme); + $.cookie('xcat_theme', theme, { expires: 30 }); // Show instructions to apply theme $(this).empty();