diff --git a/pandora_console/operation/agentes/group_view.php b/pandora_console/operation/agentes/group_view.php
index 204f7d937e..08066014e0 100644
--- a/pandora_console/operation/agentes/group_view.php
+++ b/pandora_console/operation/agentes/group_view.php
@@ -175,182 +175,7 @@ if ($total_agentes > 0) {
$total_not_init = format_numeric((($agents_notinit * 100) / $total_agentes), 2);
}
-$all_group_id = [];
-foreach ($result_groups as $group) {
- if ($group['_id_'] !== '0') {
- $all_group_id[] = $group['_id_'];
- }
-}
-
-$out = '';
-$out .= '
';
-$out .= '';
-$out .= '';
-$out .= ''.__('Summary of the status groups').' | ';
-$out .= '
';
-$out .= '
';
-$out .= '';
-$out .= '';
-
-$description = '';
-$odd = false;
-$graph_width = 180;
-$graph_height = 200;
-
-foreach ($result_groups as $group) {
- if ($group['_id_'] !== '0') {
- $description = db_get_value('description', 'tgrupo', 'id_grupo', $group['_id_']);
- $icon_url = db_get_value('icon', 'tgrupo', 'id_grupo', $group['_id_']);
- $icon = html_print_image(
- 'images/'.$icon_url,
- true,
- [
- 'title' => $group['_name_'],
- 'class' => 'main_menu_icon invert_filter',
- ]
- );
-
- $where_event = 'WHERE te.id_grupo = '.$group['_id_'];
- $where_os = 'WHERE ta.id_grupo = '.$group['_id_'];
- } else {
- $description = __('Data view of all groups');
- $icon = '';
- $where_event = 'WHERE te.id_grupo in ('.implode(', ', $all_group_id).')';
- $where_os = 'WHERE ta.id_grupo in ('.implode(', ', $all_group_id).')';
- }
-
- $group_events = db_get_all_rows_sql(
- 'SELECT COUNT(te.id_evento) as count_events, ta.alias
- FROM tevento as te
- INNER JOIN tagente as ta ON te.id_agente = ta.id_agente '.$where_event.' GROUP BY te.id_agente'
- );
-
- $group_os = db_get_all_rows_sql(
- 'SELECT COUNT(os.name) as count_os, os.name as name_os, ta.id_grupo
- FROM tconfig_os as os
- INNER JOIN tagente as ta ON ta.id_os = os.id_os '.$where_os.' GROUP by os.name'
- );
-
- if ($odd === false) {
- $out .= '
';
- }
-
- $out .= '';
- $out .= '';
- $out .= ' | ';
- $out .= '';
- $out .= ' | ';
-
- if ($odd === true) {
- $out .= '
';
- $odd = false;
- } else {
- $odd = true;
- }
-}
-
-$out .= '';
-$out .= '';
-$out .= '';
-$out .= '
';
-
-echo $out;
-/*
- echo '';
+echo '';
echo '';
echo '';
echo "".__('Summary of the status groups').' | ';
@@ -378,15 +203,15 @@ echo $out;
echo '';
echo '
';
echo '';
- echo '
';
+echo '
';
- if ($count == 1) {
+if ($count == 1) {
if ($result_groups[0]['_id_'] == 0) {
unset($result_groups[0]);
}
- }
+}
- if (empty($result_groups) === false) {
+if (empty($result_groups) === false) {
$pagination = ui_pagination(
$count,
false,
@@ -534,10 +359,10 @@ echo $out;
echo "";
if (isset($data['_is_tag_'])) {
$link = "";
+ href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_']."'>";
} else {
- $link = "";
+ $link = "";
}
if ($data['_id_'] == 0) {
@@ -554,10 +379,10 @@ echo $out;
echo " | ";
if (isset($data['_is_tag_'])) {
$link = "";
+ href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_UNKNOWN."'>";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($agents_unknown != 0)) {
@@ -574,10 +399,10 @@ echo $out;
echo " | ";
if (isset($data['_is_tag_'])) {
$link = "";
+ href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_NOT_INIT."'>";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($agents_notinit != 0)) {
@@ -594,10 +419,10 @@ echo $out;
echo " | ";
if (isset($data['_is_tag_'])) {
$link = "";
+ href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_NORMAL."'>";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($agents_ok != 0)) {
@@ -614,10 +439,10 @@ echo $out;
echo " | ";
if (isset($data['_is_tag_'])) {
$link = "";
+ href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_WARNING."'>";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($agents_warning != 0)) {
@@ -634,10 +459,10 @@ echo $out;
echo " | ";
if (isset($data['_is_tag_'])) {
$link = "";
+ href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_'].'&status='.AGENT_STATUS_CRITICAL."'>";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($agents_critical != 0)) {
@@ -653,11 +478,11 @@ echo $out;
// Monitors unknown
echo " | ";
if (!isset($data['_is_tag_'])) {
- $link = "";
+ $link = "";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($monitor_unknown != 0)) {
@@ -673,11 +498,11 @@ echo $out;
// Monitors not init
echo " | ";
if (!isset($data['_is_tag_'])) {
- $link = "";
+ $link = "";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($monitor_not_init != 0)) {
@@ -693,11 +518,11 @@ echo $out;
// Monitors OK
echo " | ";
if (!isset($data['_is_tag_'])) {
- $link = "";
+ $link = "";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($monitor_ok != 0)) {
@@ -713,11 +538,11 @@ echo $out;
// Monitors Warning
echo " | ";
if (!isset($data['_is_tag_'])) {
- $link = "";
+ $link = "";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($monitor_warning != 0)) {
@@ -733,11 +558,11 @@ echo $out;
// Monitors Critical
echo " | ";
if (!isset($data['_is_tag_'])) {
- $link = "";
+ $link = "";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($monitor_critical != 0)) {
@@ -753,11 +578,11 @@ echo $out;
// Alerts fired
echo " | ";
if (!isset($data['_is_tag_'])) {
- $link = "";
+ $link = "";
} else {
- $link = "";
+ $link = "";
}
if (($data['_id_'] == 0) && ($all_alerts_fired != 0)) {
@@ -774,7 +599,6 @@ echo $out;
}
echo '';
- } else {
+} else {
ui_print_info_message(__('There are no defined agents'));
- }
-*/
+}
|