mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Fixed VC events history
This commit is contained in:
parent
4d1cab6b67
commit
0c5cfcc90e
@ -4008,7 +4008,7 @@ function graph_graphic_agentevents(
|
|||||||
$width,
|
$width,
|
||||||
$height,
|
$height,
|
||||||
$period=0,
|
$period=0,
|
||||||
$homeurl,
|
$homeurl='',
|
||||||
$return=false,
|
$return=false,
|
||||||
$from_agent_view=false,
|
$from_agent_view=false,
|
||||||
$widgets=false,
|
$widgets=false,
|
||||||
|
@ -73,6 +73,7 @@ final class EventsHistory extends Item
|
|||||||
* Fetch a vc item data structure from the database using a filter.
|
* Fetch a vc item data structure from the database using a filter.
|
||||||
*
|
*
|
||||||
* @param array $filter Filter of the Visual Console Item.
|
* @param array $filter Filter of the Visual Console Item.
|
||||||
|
* @param float $ratio Ratio visual console in dashboards.
|
||||||
*
|
*
|
||||||
* @return array The Visual Console Item data structure stored into the DB.
|
* @return array The Visual Console Item data structure stored into the DB.
|
||||||
* @throws \InvalidArgumentException When an agent Id cannot be found.
|
* @throws \InvalidArgumentException When an agent Id cannot be found.
|
||||||
@ -124,18 +125,31 @@ final class EventsHistory extends Item
|
|||||||
$data['height'] = 11;
|
$data['height'] = 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the same HTML output as the old VC.
|
if (empty($moduleId) === true) {
|
||||||
$html = \graph_graphic_moduleevents(
|
$html = \graph_graphic_agentevents(
|
||||||
$agentId,
|
$agentId,
|
||||||
$moduleId,
|
100,
|
||||||
100,
|
(int) $data['height'],
|
||||||
(int) $data['height'],
|
static::extractMaxTime($data),
|
||||||
static::extractMaxTime($data),
|
'',
|
||||||
'',
|
true,
|
||||||
true,
|
false,
|
||||||
1,
|
500
|
||||||
$data['width']
|
);
|
||||||
);
|
} else {
|
||||||
|
// Use the same HTML output as the old VC.
|
||||||
|
$html = \graph_graphic_moduleevents(
|
||||||
|
$agentId,
|
||||||
|
$moduleId,
|
||||||
|
100,
|
||||||
|
(int) $data['height'],
|
||||||
|
static::extractMaxTime($data),
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
1,
|
||||||
|
$data['width']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$data['html'] = $html;
|
$data['html'] = $html;
|
||||||
|
|
||||||
@ -211,7 +225,7 @@ final class EventsHistory extends Item
|
|||||||
'return' => true,
|
'return' => true,
|
||||||
'module_input' => true,
|
'module_input' => true,
|
||||||
'module_name' => 'moduleId',
|
'module_name' => 'moduleId',
|
||||||
'module_none' => false,
|
'module_none' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -227,6 +241,8 @@ final class EventsHistory extends Item
|
|||||||
'sort' => false,
|
'sort' => false,
|
||||||
'agent_id' => $values['agentId'],
|
'agent_id' => $values['agentId'],
|
||||||
'metaconsole_id' => $values['metaconsoleId'],
|
'metaconsole_id' => $values['metaconsoleId'],
|
||||||
|
'nothing' => '--',
|
||||||
|
'nothing_value' => 0,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user