From 90b9b596e01705ba996a3bf67c491a343489dae8 Mon Sep 17 00:00:00 2001 From: phamt Date: Wed, 11 Apr 2012 22:40:44 +0000 Subject: [PATCH] Changed location where directory entry is retrieved. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12204 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/custom/zvmUtils.js | 13 ++++++------- xCAT-UI/xcat/plugins/web.pm | 9 ++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/xCAT-UI/js/custom/zvmUtils.js b/xCAT-UI/js/custom/zvmUtils.js index c12e5702f..cd5ce4d7f 100644 --- a/xCAT-UI/js/custom/zvmUtils.js +++ b/xCAT-UI/js/custom/zvmUtils.js @@ -2720,26 +2720,25 @@ function createZProvisionNew(inst) { var thisTabId = $(this).parents('.ui-tabs-panel').attr('id'); // Get objects for HCP, user ID, and OS - var hcp = $('#' + thisTabId + ' input[name=hcp]'); var userId = $('#' + thisTabId + ' input[name=userId]'); var os = $('#' + thisTabId + ' input[name=os]'); // Get default user entry when clicked if ($(this).attr('checked')) { - if (!hcp.val() || !os.val() || !userId.val()) { + if (!os.val() || !userId.val()) { // Show warning message - var warn = createWarnBar('Please specify the hardware control point, operating system, and user ID before checking this box'); + var warn = createWarnBar('Please specify the operating system and user ID before checking this box'); warn.prependTo($(this).parents('.form')); // Highlight empty fields - jQuery.each([hcp, os, userId], function() { + jQuery.each([os, userId], function() { if (!$(this).val()) { $(this).css('border', 'solid #FF0000 1px'); } }); } else { // Un-highlight empty fields - jQuery.each([hcp, os, userId], function() { + jQuery.each([os, userId], function() { $(this).css('border', 'solid #BDBDBD 1px'); }); @@ -2753,7 +2752,7 @@ function createZProvisionNew(inst) { data : { cmd : 'webrun', tgt : '', - args : 'getdefaultuserentry;' + hcp.val() + ';' + profile, + args : 'getdefaultuserentry;' + profile, msg : thisTabId }, @@ -2771,7 +2770,7 @@ function createZProvisionNew(inst) { $('#' + thisTabId + ' textarea:visible').val(''); // Un-highlight empty fields - jQuery.each([hcp, os, userId], function() { + jQuery.each([os, userId], function() { $(this).css('border', 'solid #BDBDBD 1px'); }); } diff --git a/xCAT-UI/xcat/plugins/web.pm b/xCAT-UI/xcat/plugins/web.pm index 548ec6501..2d506fc0d 100644 --- a/xCAT-UI/xcat/plugins/web.pm +++ b/xCAT-UI/xcat/plugins/web.pm @@ -2214,18 +2214,17 @@ sub web_getdefaultuserentry { my ( $request, $callback, $sub_req ) = @_; # Get hardware control point - my $hcp = $request->{arg}->[1]; - my $profile = $request->{arg}->[2]; + my $profile = $request->{arg}->[1]; if (!$profile) { $profile = 'default'; } my $entry; - if (!(`ssh $hcp "test -e /opt/zhcp/conf/profiles/$profile.direct && echo 'File exists'"`)) { - $entry = `ssh $hcp "cat /opt/zhcp/conf/profiles/default.direct"`; + if (!(`test -e /var/opt/xcat/profiles/$profile.direct && echo 'File exists'`)) { + $entry = `cat /var/opt/xcat/profiles/default.direct`; } else { - $entry = `ssh $hcp "cat /opt/zhcp/conf/profiles/$profile.direct"`; + $entry = `cat /var/opt/xcat/profiles/$profile.direct`; } $callback->( { data => $entry } );