mirror of
https://git.proxmox.com/git/pve-http-server
synced 2025-05-30 00:43:30 +00:00
Formatter/HTML: only display description if we have one
This commit is contained in:
parent
c5f0a96ffd
commit
dc80cea51c
@ -178,12 +178,14 @@ PVE::APIServer::Formatter::register_formatter($portal_format, sub {
|
|||||||
$html .= $doc->alert(text => "Error $res->{status}: $res->{message}");
|
$html .= $doc->alert(text => "Error $res->{status}: $res->{message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
my $info = $res->{info};
|
my $lnk;
|
||||||
|
|
||||||
$html .= $doc->el(tag => 'h3', text => 'Description');
|
if (my $info = $res->{info}) {
|
||||||
$html .= $doc->el(tag => 'p', text => $info->{description});
|
$html .= $doc->el(tag => 'h3', text => 'Description');
|
||||||
|
$html .= $doc->el(tag => 'p', text => $info->{description});
|
||||||
|
|
||||||
my $lnk = PVE::JSONSchema::method_get_child_link($info);
|
$lnk = PVE::JSONSchema::method_get_child_link($info);
|
||||||
|
}
|
||||||
|
|
||||||
if ($lnk && $data && $data->{data} && HTTP::Status::is_success($res->{status})) {
|
if ($lnk && $data && $data->{data} && HTTP::Status::is_success($res->{status})) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user