update error
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7484 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
7eb3c72829
commit
2451ebdc03
@ -246,7 +246,7 @@ function updateRpm()
|
||||
$.cookie('xcatrepository', rpmPathType, { path: '/xcat', expires: 10 });
|
||||
|
||||
$('#update').empty();
|
||||
$('#update').append("<p>update <b>" + rpms + "</b> from <b>" + rpmPath + "</b></p>");
|
||||
$('#update').append("<p>Updating <b>" + rpms + "</b> from <b>" + rpmPath + "</b></p>");
|
||||
$('#update').append("<img id='loadingpic' src='images/throbber.gif'>");
|
||||
$('#rpm button').attr('disabled', 'true');
|
||||
|
||||
@ -269,10 +269,27 @@ function ShowUpdateResult(data)
|
||||
{
|
||||
var temp = 0;
|
||||
$('#loadingpic').remove();
|
||||
$('#update').append("Update finished.<br\>");
|
||||
for (temp = 0; temp < data.rsp.length; temp++)
|
||||
|
||||
var resArray = data.rsp[0].split(/\n/);
|
||||
if (('' == resArray[resArray.length - 1]) && (resArray.length > 1)){
|
||||
$('#update').append(resArray[resArray.length - 2]);
|
||||
}
|
||||
else{
|
||||
$('#update').append(resArray[resArray.length - 1]);
|
||||
}
|
||||
|
||||
$('#update').append('<br\><a>Response Detail:</a>');
|
||||
$('#update a').bind('click', function(){
|
||||
$('#resDetail').show();
|
||||
});
|
||||
|
||||
var resDetail = $('<div id="resDetail"></div>');
|
||||
resDetail.hide();
|
||||
$('#update').append(resDetail);
|
||||
|
||||
for (temp = 0; temp < resArray.length; temp++)
|
||||
{
|
||||
$('#update').append(data.rsp[temp] + "<br\>");
|
||||
resDetail.append(resArray[temp] + "<br\>");
|
||||
}
|
||||
|
||||
//update the rpm info
|
||||
|
@ -295,7 +295,7 @@ sub web_update {
|
||||
my $WebpageContent = undef;
|
||||
my $RemoteRpmFilePath = undef;
|
||||
my $LocalRpmFilePath = undef;
|
||||
my @temp = undef;
|
||||
|
||||
if (xCAT::Utils->isLinux())
|
||||
{
|
||||
$os = xCAT::Utils->osver();
|
||||
@ -318,7 +318,7 @@ sub web_update {
|
||||
#create file, return error if failed.
|
||||
unless ( open ($FileHandle, '>>', "/tmp/xCAT_update.yum.conf"))
|
||||
{
|
||||
$callback->({error=>"Create temp file eror!\n",errorcode=>[1]});
|
||||
$callback->({error=>"Create temp file error!\n",errorcode=>[1]});
|
||||
return;
|
||||
}
|
||||
|
||||
@ -337,8 +337,7 @@ sub web_update {
|
||||
}
|
||||
#run the command and return the result
|
||||
$ReturnInfo = readpipe($cmd);
|
||||
@temp = split(/\n/, $ReturnInfo);
|
||||
$callback->({info=>$temp[-1]});
|
||||
$callback->({info=>$ReturnInfo});
|
||||
}
|
||||
#AIX
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user