Fixed error event history VC

This commit is contained in:
Daniel Barbero Martin 2020-02-17 08:19:36 +01:00
parent f3b744717e
commit 3ad9e3c420
1 changed files with 13 additions and 0 deletions

View File

@ -102,6 +102,19 @@ final class EventsHistory extends Item
throw new \InvalidArgumentException('missing agent Id'); throw new \InvalidArgumentException('missing agent Id');
} }
if ((int) $data['width'] === 0 && (int) $data['height'] === 0) {
$data['width'] = 420;
$data['height'] = 80;
}
if ((int) $data['width'] < 10) {
$data['width'] = 10;
}
if ((int) $data['height'] < 5) {
$data['height'] = 5;
}
// Use the same HTML output as the old VC. // Use the same HTML output as the old VC.
$html = \graph_graphic_moduleevents( $html = \graph_graphic_moduleevents(
$agentId, $agentId,