Commit 18baa942 authored by Dietmar Maurer's avatar Dietmar Maurer

Formatter/HTML: improve output format

parent 96eb4f9c
......@@ -202,19 +202,25 @@ PVE::HTTPServer::register_formatter($portal_format, sub {
next if !ref($elem);
if (defined(my $value = $elem->{$prop})) {
if ($value ne '') {
my $text = $value;
if (scalar(keys %$elem) > 1) {
my $tv = to_json($elem, {allow_nonref => 1, canonical => 1});
$text = "$value $tv";
}
my $tv = to_json($elem, {pretty => 1, allow_nonref => 1, canonical => 1});
push @$items, {
tag => 'a',
class => 'list-group-item',
href => "$path/$value",
text => $text,
}
}
cn => [
{
tag => 'h4',
class => 'list-group-item-heading',
text => $value,
},
{
tag => 'pre',
class => 'list-group-item',
text => $tv,
},
],
};
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment