Skip to content
Snippets Groups Projects
Commit 8f967a9a authored by Sergey Joseph Ivanov's avatar Sergey Joseph Ivanov
Browse files

move to responce as unlisted entry

parent 75afcb66
No related branches found
No related tags found
No related merge requests found
......@@ -182,14 +182,6 @@ sub dump_generic_module {
my $info = $services->{$service};
$rv .= $dumper->($module,$service,$info);
}
if ($module eq "Core::Resmon") {
my $info = {
name => 'now',
type => 'i',
value => time(),
};
$rv .= $dumper->($module,"now",$info);
}
return $rv;
}
sub dump_xml {
......@@ -374,7 +366,18 @@ sub service {
$client->print($response . "\r\n");
return;
} elsif($req =~ /^\/([^\/]+)\/(.+)\?plain$/) {
if(exists($self->{store}->{$1}) &&
if($1 eq "System::Time" && $2 eq "now") {
my $info = {
name => 'now',
type => 'i',
value => time(),
};
my $response = plain_info($1,$2,$info);
$client->print(http_header(200, length($response), 'text/plain', $snip));
$client->print( $response . "\r\n");
return;
}
elsif(exists($self->{store}->{$1}) &&
exists($self->{store}->{$1}->{$2})) {
my $info = $self->{store}->{$1}->{$2};
my $response = plain_info($1,$2,$info);
......@@ -383,7 +386,22 @@ sub service {
return;
}
} elsif($req =~ /^\/([^\/]+)\/(.+)$/) {
if(exists($self->{store}->{$1}) &&
if($1 eq "System::Time" && $2 eq "now") {
my $info = {
name => 'now',
type => 'i',
value => time(),
};
my $response = qq^<?xml version="1.0" encoding="UTF-8"?>\n^;
$response .= qq^<?xml-stylesheet type="text/xsl" href="/resmon.xsl"?>^;
$response .= "<ResmonResults>\n".
xml_info($1,$2,$info).
"</ResmonResults>\n";
$client->print(http_header(200, length($response), 'text/xml', $snip));
$client->print( $response . "\r\n");
return;
}
elsif(exists($self->{store}->{$1}) &&
exists($self->{store}->{$1}->{$2})) {
my $info = $self->{store}->{$1}->{$2};
my $response = qq^<?xml version="1.0" encoding="UTF-8"?>\n^;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment