web_lscondition, lsresponse, lscondresp are changed

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4673 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
mxi1 2009-11-26 07:32:07 +00:00
parent 5f56cd6d3c
commit c542b8da9c

View File

@ -176,20 +176,14 @@ sub web_stopcondresp {
sub web_lscond {
my ($request, $callback, $sub_req) = @_;
my $ret = `lscondition`;
my @conds;
my @lines = split '\n', $ret;
shift @lines;
shift @lines;
foreach my $line (@lines) {
#
my $index = index($line, '"', 1);
push @conds, substr($line, 1, $index-1);
$callback->({data=>$line});
}
#all the conditions are stored in @conds
my $data = join("=",@conds);
$callback->({data=>"$data"});
}
sub web_lsresp {
@ -202,12 +196,8 @@ sub web_lsresp {
shift @lines;
foreach my $line (@lines) {
my $index = index($line, '"', 1);
push @resps, substr($line, 1, $index-1);
$callback->({data=>$line});
}
#all the responses are stored in @resps
my $data = join("=",@resps);
$callback->({data=>"$data"});
}
sub web_lscondresp {
@ -216,16 +206,10 @@ sub web_lscondresp {
shift @ret;
shift @ret;
my $data;
foreach my $line (@ret) {
chomp $line;
$data .=$line;
$data .="=";
$callback->({data=>$line});
}
$callback->({data=>"$data"});
}
# currently, web_chtab only handle chtab for the table "monitoring"
sub web_chtab {