Merge branch 'ent-7142-Consola-Visual-me-oculta-los-botones' into 'develop'

Ent 7142 consola visual me oculta los botones

See merge request artica/pandorafms!4178
This commit is contained in:
Daniel Rodriguez 2021-06-21 14:04:11 +00:00
commit 043b512cc4
2 changed files with 16 additions and 3 deletions

View File

@ -1412,6 +1412,14 @@ function graphic_combined_module(
$labels = []; $labels = [];
$modules = []; $modules = [];
foreach ($sources as $source) { foreach ($sources as $source) {
$id_agent = agents_get_module_id(
$source['id_agent_module']
);
if (!$id_agent) {
continue;
}
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
metaconsole_restore_db(); metaconsole_restore_db();
$server = metaconsole_get_connection_by_id($source['id_server']); $server = metaconsole_get_connection_by_id($source['id_server']);
@ -1428,9 +1436,6 @@ function graphic_combined_module(
array_push($modules, $modulepush); array_push($modules, $modulepush);
array_push($weights, $source['weight']); array_push($weights, $source['weight']);
if ($source['label'] != '' || $params_combined['labels']) { if ($source['label'] != '' || $params_combined['labels']) {
$id_agent = agents_get_module_id(
$source['id_agent_module']
);
$agent_description = agents_get_description($id_agent); $agent_description = agents_get_description($id_agent);
$agent_group = agents_get_agent_group($id_agent); $agent_group = agents_get_agent_group($id_agent);
$agent_address = agents_get_address($id_agent); $agent_address = agents_get_address($id_agent);

View File

@ -157,6 +157,14 @@ final class DonutGraph extends Item
if ($isString === true) { if ($isString === true) {
$graphData = \get_donut_module_data($moduleId); $graphData = \get_donut_module_data($moduleId);
if (empty($graphData) || $graphData === null) {
$aux = [];
$aux[0]['tag_name'] = 'No data to show';
$aux[0]['color'] = '#aa3333';
$aux[0]['value'] = 1;
$aux[0]['percent'] = 100;
$graphData = $aux;
}
$data['html'] = \d3_donut_graph( $data['html'] = \d3_donut_graph(
(int) $data['id'], (int) $data['id'],