diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php
index 195b509106..2d6803ccd4 100644
--- a/pandora_console/include/functions_agents.php
+++ b/pandora_console/include/functions_agents.php
@@ -4752,7 +4752,7 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
$secondary_groups = enterprise_hook('agents_get_secondary_groups', [$id_agente]);
$secondaryLinks = [];
if (empty($secondary_groups['for_select']) === true) {
- $secondaryLinks[] = ''.__('N/A').'';
+ $secondaryLinks = [];
} else {
foreach ($secondary_groups['for_select'] as $id => $name) {
$secondaryLinks[] = html_print_anchor(
@@ -4811,22 +4811,22 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
'content' => groups_get_name($agent['id_grupo']),
],
true
- );
+ ).' '.ui_print_group_icon($agent['id_grupo'], true, '', 'margin-left: 2%;', true, false, false, '', true);
$table_contact->data[] = $data;
// Secondary groups.
$data = [];
- $data[0] = ''.__('Secondary groups').'';
- $data[1] = implode(', ', $secondaryLinks);
- $table_contact->data[] = $data;
+ if (!empty($secondaryLinks) === true) {
+ $data[0] = ''.__('Secondary groups').'';
+ $data[1] = implode(', ', $secondaryLinks);
+ $table_contact->data[] = $data;
+ }
// Parent agent line.
if (enterprise_installed() === true) {
- $data = [];
- $data[0] = ''.__('Parent').'';
- if ((int) $agent['id_parent'] === 0) {
- $data[1] = ''.__('N/A').'';
- } else {
+ if ((int) $agent['id_parent'] !== 0) {
+ $data = [];
+ $data[0] = ''.__('Parent').'';
$data[1] = html_print_anchor(
[
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_parent'],
@@ -4834,9 +4834,9 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
],
true
);
- }
- $table_contact->data[] = $data;
+ $table_contact->data[] = $data;
+ }
}
// Last status change line.
@@ -4845,6 +4845,44 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
$data[1] = $time_elapsed;
$table_contact->data[] = $data;
+ $has_remote_conf = enterprise_hook(
+ 'config_agents_has_remote_configuration',
+ [$agent['id_agente']]
+ );
+
+ if ((bool) $has_remote_conf) {
+ $data = [];
+ $data[0] = __('Remote configuration');
+ $data[1] = ''.__('Enabled').'';
+ $data[1] .= html_print_menu_button(
+ [
+ 'href' => ui_get_full_url('index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=remote_configuration&id_agente='.$agent['id_agente'].'&disk_conf=1'),
+ 'image' => 'images/remote-configuration@svg.svg',
+ 'title' => __('Edit remote config'),
+ ],
+ true
+ );
+
+ $satellite_server = (int) db_get_value_filter(
+ 'satellite_server',
+ 'tagente',
+ ['id_agente' => $id_agente]
+ );
+
+ if (empty($satellite_server) === false) {
+ $satellite_name = db_get_value_filter(
+ 'name',
+ 'tserver',
+ ['id_server' => $satellite_server]
+ );
+
+ $data[0] = __('Satellite server');
+ $data[1] = $satellite_name;
+ }
+
+ $table_contact->data[] = $data;
+ }
+
if (enterprise_installed() === true) {
// SecurityMon line.
$id_module_group = db_get_value('id_mg', 'tmodule_group', 'name', 'Security');
@@ -4887,6 +4925,43 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
}
}
+ // Optional data
+ // Position Information.
+ if ((bool) $config['activate_gis'] === true) {
+ $data = [];
+
+ $dataPositionAgent = gis_get_data_last_position_agent(
+ $agent['id_agente']
+ );
+ if (is_array($dataPositionAgent) === true && $dataPositionAgent['stored_longitude'] !== '' && $dataPositionAgent['stored_latitude'] !== '') {
+ $data[0] = __('Position (Long, Lat)');
+
+ $dataOptionalOutput = html_print_anchor(
+ [
+ 'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=gis&id_agente='.$id_agente,
+ 'content' => $dataPositionAgent['stored_longitude'].', '.$dataPositionAgent['stored_latitude'],
+ ],
+ true
+ );
+
+ if (empty($dataPositionAgent['description']) === false) {
+ $dataOptionalOutput .= ' ('.$dataPositionAgent['description'].')';
+ }
+
+ $data[1] = $dataOptionalOutput;
+ }
+
+ $table_contact->data[] = $data;
+ }
+
+ // Timezone Offset.
+ if ((int) $agent['timezone_offset'] !== 0) {
+ $data = [];
+ $data[0] = __('Timezone Offset');
+ $data[1] = $agent['timezone_offset'];
+ $table_contact->data[] = $data;
+ }
+
$agent_contact = html_print_div(
[
'class' => 'agent_details_header',
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index 23e0c87514..dce7dd9efc 100755
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -13698,38 +13698,47 @@ function reporting_tiny_stats(
}
if ($modern === true) {
- $out .= '
';
if (isset($fired_count) && $fired_count > 0) {
+ $out .= '
';
$out .= '
';
$out .= '
'.$fired_count.'';
+ $out .= '
';
}
if (isset($critical_count) && $critical_count > 0) {
+ $out .= '
';
$out .= '
';
$out .= '
'.$critical_count.'';
+ $out .= '
';
}
if (isset($warning_count) && $warning_count > 0) {
+ $out .= '
';
$out .= '
';
$out .= '
'.$warning_count.'';
+ $out .= '
';
}
if (isset($unknown_count) && $unknown_count > 0) {
+ $out .= '
';
$out .= '
';
$out .= '
'.$unknown_count.'';
+ $out .= '
';
}
if (isset($not_init_count) && $not_init_count > 0) {
+ $out .= '
';
$out .= '
';
$out .= '
'.$not_init_count.'';
+ $out .= '
';
}
if (isset($normal_count) && $normal_count > 0) {
+ $out .= '
';
$out .= '
';
$out .= '
'.$normal_count.'';
+ $out .= '
';
}
-
- $out .= '
';
} else {
// Classic ones.
$out .= ''.$total_count.'';
diff --git a/pandora_console/include/styles/agent_view.css b/pandora_console/include/styles/agent_view.css
index d4a1d89a4e..1df8efdb84 100644
--- a/pandora_console/include/styles/agent_view.css
+++ b/pandora_console/include/styles/agent_view.css
@@ -6,6 +6,10 @@ div#bullets_modules span {
font-weight: 700;
}
+div.bullets_modules span {
+ font-weight: 700;
+}
+
div.agent_details_agent_caption {
flex: 1;
}
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 50d3ec4778..0879c38f88 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -6043,18 +6043,18 @@ div.switch_radio_button label:last-of-type {
margin-top: -2px;
}
-/*
-div#bullets_modules {
- display: flex;
- margin-left: 2em;
-}
-*/
div#bullets_modules div {
display: flex;
align-items: center;
margin: 0 5px;
}
+div.bullets_modules div {
+ display: flex;
+ align-items: center;
+ margin: 0 10px;
+}
+
.orange_background {
background: #ffa631;
}
@@ -6225,7 +6225,7 @@ div#status_pie {
display: flex;
align-items: flex-start;
padding: 20px;
- padding-bottom: 0;
+ padding-bottom: 1%;
}
.agent_details_content_cluster {
@@ -6315,6 +6315,7 @@ div#status_pie {
flex-direction: column;
justify-content: center;
align-items: center;
+ width: 100%;
}
.agent_details_agent_data {
@@ -6344,23 +6345,45 @@ div#status_pie {
justify-content: flex-start;
}
+.agent_details_bullets .bullets_modules {
+ display: flex;
+ justify-content: flex-start;
+}
+
.agent_details_bullets_cluster #bullets_modules {
display: flex;
justify-content: flex-start;
flex-direction: column;
}
+.agent_details_bullets_cluster .bullets_modules {
+ display: flex;
+ justify-content: flex-start;
+ flex-direction: column;
+}
+
.agent_details_bullets_cluster #bullets_modules > div {
padding: 0px;
margin-bottom: 10px;
}
+.agent_details_bullets_cluster .bullets_modules > div {
+ padding: 0px;
+ margin-bottom: 10px;
+}
+
.agent_details_bullets #bullets_modules > div {
display: flex;
align-items: center;
padding-bottom: 20px;
}
+.agent_details_bullets .bullets_modules > div {
+ display: flex;
+ align-items: center;
+ padding-bottom: 20px;
+}
+
#agent_contact_main tr td img {
max-width: 100%;
}
@@ -6412,6 +6435,11 @@ div#status_pie {
float: right;
}
+.white_table_graph_header div.bullets_modules {
+ display: flex;
+ float: right;
+}
+
.white_table_graph_header img,
.white_table_graph_header span {
vertical-align: middle;
diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php
index 156fc32c3d..dd4effe693 100755
--- a/pandora_console/operation/agentes/estado_generalagente.php
+++ b/pandora_console/operation/agentes/estado_generalagente.php
@@ -102,17 +102,37 @@ $agentCountModules = html_print_div(
$table_status = new stdClass();
$table_status->id = 'agent_status_main';
-$table_status->width = '100%';
+$table_status->width = '90%';
+$table_status->height = 'auto';
$table_status->cellspacing = 0;
$table_status->cellpadding = 0;
$table_status->class = 'floating_form';
-$table_status->style[0] = 'height: 32px; width: 30%; padding-right: 5px; text-align: end; vertical-align: top';
-$table_status->style[1] = 'height: 32px; width: 70%; padding-left: 5px; font-weight: lighter; vertical-align: top';
-$table_status->data['agent_os'][0] = __('OS');
-$agentOS = [];
-$agentOS[] = html_print_div([ 'content' => (empty($agent['os_version']) === true) ? get_os_name((int) $agent['id_os']) : $agent['os_version']], true);
-$agentOS[] = html_print_div([ 'style' => 'width: 16px;padding-left: 5px', 'content' => ui_print_os_icon($agent['id_os'], false, true, true, false, false, false, ['width' => '16px'])], true);
-$table_status->data['agent_os'][1] = html_print_div(['class' => 'agent_details_agent_data', 'content' => implode('', $agentOS)], true);
+$table_status->style[0] = 'height: 28px; width: 30%; padding-right: 5px; text-align: end; vertical-align: top';
+$table_status->style[1] = 'height: 28px; width: 70%; padding-left: 5px; font-weight: lighter; vertical-align: top';
+
+$os_agent_text = '';
+$os_name = get_os_name((int) $agent['id_os']);
+if (empty($agent['os_version']) !== true) {
+ $agent['os_version'] = io_safe_output($agent['os_version']);
+ if (strpos($agent['os_version'], '(') !== false) {
+ $os_name = preg_split('/[0-9]|[\(]/', $agent['os_version'])[0];
+ $os_version = explode($os_name, explode('(', $agent['os_version'])[0])[1];
+ $os_version_name = preg_split('/[\(]|[\)]/', $agent['os_version']);
+ $os_agent_text = $os_version.' ('.$os_version_name[1].')';
+ } else {
+ $os_name = preg_split('/[0-9]/', $agent['os_version'])[0];
+ $os_version = explode($os_name, explode('(', $agent['os_version'])[0])[1];
+ $os_agent_text = $os_version;
+ }
+}
+
+$table_status->data['agent_os'][0] = html_print_div([ 'style' => 'width: 16px; position: relative; left: 75%', 'content' => ui_print_os_icon($agent['id_os'], false, true, true, false, false, false, ['width' => '16px'])], true);
+$table_status->data['agent_os'][1] = $os_name;
+
+if (empty($agent['os_version']) !== true) {
+ $table_status->data['agent_os_version'][0] = __('OS Version');
+ $table_status->data['agent_os_version'][1] = $os_agent_text;
+}
$addresses = agents_get_addresses($id_agente);
$address = agents_get_address($id_agente);
@@ -124,43 +144,48 @@ foreach ($addresses as $k => $add) {
}
if (empty($address) === false) {
+ $address_text = ''.$address.'';
+ if (!empty($addresses) === true) {
+ foreach ($addresses as $sec_address) {
+ $address_text .= '
'.$sec_address.'';
+ }
+ }
+
$table_status->data['ip_address'][0] = __('IP address');
- $table_status->data['ip_address'][1] = (empty($address) === true) ? ''.__('N/A').'' : $address;
+ $table_status->data['ip_address'][1] = (empty($address) === true) ? ''.__('N/A').'' : $address_text;
}
$table_status->data['agent_version'][0] = __('Agent Version');
$table_status->data['agent_version'][1] = (empty($agent['agent_version']) === true) ? ''.__('N/A').'' : $agent['agent_version'];
$table_status->data['description'][0] = __('Description');
-$table_status->data['description'][1] = (empty($agent['comentarios']) === true) ? ''.__('N/A').'' : $agent['comentarios'];
+$table_status->data['description'][1] = (empty($agent['comentarios']) === true) ? ''.__('N/A').'' : ui_print_truncate_text($agent['comentarios'], 'description', true);
-$has_remote_conf = enterprise_hook(
- 'config_agents_has_remote_configuration',
- [$agent['id_agente']]
+$agentEventsHeader = html_print_div(
+ [
+ 'class' => 'agent_details_header',
+ 'content' => '',
+ ],
+ true
);
-if ((bool) $has_remote_conf) {
- $table_status->data['remote_config'][0] = __('Remote configuration');
- $table_status->data['remote_config'][1] = __('Enabled');
-
- $satellite_server = (int) db_get_value_filter(
- 'satellite_server',
- 'tagente',
- ['id_agente' => $id_agente]
- );
-
- if (empty($satellite_server) === false) {
- $satellite_name = db_get_value_filter(
- 'name',
- 'tserver',
- ['id_server' => $satellite_server]
- );
-
- $table_status->data['remote_config'][0] = __('Satellite server');
- $table_status->data['remote_config'][1] = $satellite_name;
- }
-}
-
+$agentEventsGraph = html_print_div(
+ [
+ 'class' => 'white-table-graph-content',
+ 'content' => graph_graphic_agentevents(
+ $id_agente,
+ 95,
+ 50,
+ SECONDS_1DAY,
+ '',
+ true,
+ true,
+ 500
+ ),
+ 'style' => 'margin-top: -25px',
+ ],
+ true
+);
$table_agent = $agentStatusHeader.'
@@ -170,6 +195,9 @@ $table_agent = $agentStatusHeader.'
'.$alive_animation.html_print_table($table_status, true).'
+
+
+ '.$agentEventsHeader.$agentEventsGraph.'
';
@@ -189,11 +217,12 @@ $data_opcional->class = 'floating_form';
// Gis and url address.
$agentAdditionalContent = '';
// Position Information.
-if ((bool) $config['activate_gis'] === true) {
+/*
+ if ((bool) $config['activate_gis'] === true) {
$dataPositionAgent = gis_get_data_last_position_agent(
$agent['id_agente']
);
- if (is_array($dataPositionAgent) === true && $dataPositionAgent['stored_longitude'] !== '' && $dataPositionAgent['stored_longitude'] !== '') {
+ if (is_array($dataPositionAgent) === true && $dataPositionAgent['stored_longitude'] !== '' && $dataPositionAgent['stored_latitude'] !== '') {
$data_opcional->data['agent_position'][0] = __('Position (Long, Lat)');
$dataOptionalOutput = html_print_anchor(
@@ -210,10 +239,11 @@ if ((bool) $config['activate_gis'] === true) {
$data_opcional->data['agent_position'][1] = $dataOptionalOutput;
}
-}
+}*/
// If the url description is set.
-if (empty($agent['url_address']) === false) {
+/*
+ if (empty($agent['url_address']) === false) {
$data_opcional->data['url_address'][0] = __('Url address');
$data_opcional->data['url_address'][1] = html_print_anchor(
[
@@ -222,11 +252,12 @@ if (empty($agent['url_address']) === false) {
],
true
);
-}
+}*/
// Other IP address and timezone offset.
-if (empty($addresses) === false) {
+/*
+ if (empty($addresses) === false) {
$data_opcional->data['other_ip_address'][0] = __('Other IP addresses');
$data_opcional->data['other_ip_address'][1] = html_print_div(
[
@@ -235,13 +266,14 @@ if (empty($addresses) === false) {
],
true
);
-}
-
+ }
+*/
// Timezone Offset.
-if ((int) $agent['timezone_offset'] !== 0) {
+/*
+ if ((int) $agent['timezone_offset'] !== 0) {
$data_opcional->data['timezone_offset'][0] = __('Timezone Offset');
$data_opcional->data['timezone_offset'][1] = $agent['timezone_offset'];
-}
+}*/
// Custom fields.
$fields = db_get_all_rows_filter(
@@ -485,39 +517,6 @@ $agentContact = html_print_div(
true
);
-$agentEventsHeader = html_print_div(
- [
- 'class' => 'agent_details_header',
- 'content' => '',
- ],
- true
-);
-
-$agentEventsGraph = html_print_div(
- [
- 'class' => 'white-table-graph-content',
- 'content' => graph_graphic_agentevents(
- $id_agente,
- 95,
- 70,
- SECONDS_1DAY,
- '',
- true,
- true,
- 500
- ),
- ],
- true
-);
-
-$agentEvents = html_print_div(
- [
- 'class' => 'box-flat agent_details_col w50p',
- 'content' => $agentEventsHeader.$agentEventsGraph,
- ],
- true
-);
-
/*
* EVENTS TABLE END.
*/