diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php
index e68158c117..69b06fd684 100644
--- a/pandora_console/include/class/TreeService.class.php
+++ b/pandora_console/include/class/TreeService.class.php
@@ -222,22 +222,30 @@ class TreeService extends Tree
switch ($status) {
case SERVICE_STATUS_NORMAL:
- $processed_items[$row['id']]['statusImageHTML'] = '';
+ $serviceStatusLine = COL_NORMAL;
break;
case SERVICE_STATUS_CRITICAL:
- $processed_items[$row['id']]['statusImageHTML'] = '
';
+ $serviceStatusLine = COL_CRITICAL;
break;
case SERVICE_STATUS_WARNING:
- $processed_items[$row['id']]['statusImageHTML'] = '
';
+ $serviceStatusLine = COL_WARNING;
break;
case SERVICE_STATUS_UNKNOWN:
default:
- $processed_items[$row['id']]['statusImageHTML'] = '
';
+ $serviceStatusLine = COL_UNKNOWN;
break;
}
+
+ $processed_items[$row['id']]['statusImageHTML'] = html_print_div(
+ [
+ 'class' => 'node-service-status',
+ 'style' => 'background-color: '.$serviceStatusLine,
+ ],
+ true
+ );
}
$this->tree = $processed_items;
@@ -510,14 +518,11 @@ class TreeService extends Tree
$tmp['eventAgent'] = $item->module()->id_agente();
$tmp['disabled'] = $item->module()->disabled();
- $html = '
module()->lastStatusTitle().'" />';
+
$tmp['statusImageHTML'] = $html;
$tmp = array_merge(
$tmp,
diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php
index b92aae0ce2..b43d6bba95 100755
--- a/pandora_console/include/functions_treeview.php
+++ b/pandora_console/include/functions_treeview.php
@@ -702,7 +702,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
// Events graph toggle.
$eventsGraph = html_print_div(
[
- 'class' => 'graphic_agents',
+ 'style' => 'height: 150px;',
'content' => graph_graphic_agentevents(
$id_agente,
'500px;',
@@ -732,7 +732,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
);
if ($config['agentaccess']) {
- $access_graph = '