mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-13 14:39:28 +00:00
Update Percona::WebAPI::Representation in pt-agent so the previous commit actually works.
This commit is contained in:
@@ -714,9 +714,14 @@ sub as_json {
|
||||
$json->allow_blessed([]);
|
||||
$json->convert_blessed([]);
|
||||
|
||||
return $json->encode(
|
||||
my $text = $json->encode(
|
||||
ref $resource eq 'ARRAY' ? $resource : as_hashref($resource, %args)
|
||||
);
|
||||
if ( $args{json} && $text ) { # for testing
|
||||
chomp($text);
|
||||
$text .= "\n";
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
sub as_config {
|
||||
|
Reference in New Issue
Block a user