diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php
index 8138e69a50..d78b6c2a36 100644
--- a/pandora_console/godmode/agentes/agent_manager.php
+++ b/pandora_console/godmode/agentes/agent_manager.php
@@ -89,7 +89,7 @@ if (is_ajax()) {
$out = false;
foreach ($idSNMP as $id) {
foreach ($snmp[$id] as $key => $value) {
- // Check if it has "ifXXXX" syntax and skip it
+ // Check if it has "ifXXXX" syntax and skip it.
if (! preg_match('/if/', $key)) {
continue;
}
@@ -109,7 +109,7 @@ if (is_ajax()) {
echo io_json_mb_encode($out);
}
- // And and remove groups use the same function
+ // And and remove groups use the same function.
$add_secondary_groups = get_parameter('add_secondary_groups');
$remove_secondary_groups = get_parameter('remove_secondary_groups');
if ($add_secondary_groups || $remove_secondary_groups) {
@@ -125,12 +125,12 @@ if (is_ajax()) {
'agents_update_secondary_groups',
[
$id_agent,
- $add_secondary_groups ? $groups_to_add : [],
- $remove_secondary_groups ? $groups_to_add : [],
+ ($add_secondary_groups) ? $groups_to_add : [],
+ ($remove_secondary_groups) ? $groups_to_add : [],
]
);
// Echo 0 in case of error. 0 Otherwise.
- echo $ret ? 1 : 0;
+ echo ($ret) ? 1 : 0;
}
}
@@ -160,7 +160,7 @@ if ($new_agent) {
}
if (!$new_agent) {
- // Agent remote configuration editor
+ // Agent remote configuration editor.
enterprise_include_once('include/functions_config_agents.php');
if (enterprise_installed()) {
$filename = config_agents_get_agent_config_filenames($id_agente);
@@ -168,10 +168,10 @@ if (!$new_agent) {
}
$disk_conf_delete = (bool) get_parameter('disk_conf_delete');
-// Agent remote configuration DELETE
+// Agent remote configuration DELETE.
if ($disk_conf_delete) {
// TODO: Get this working on computers where the Pandora server(s) are not on the webserver
- // TODO: Get a remote_config editor working in the open version
+ // TODO: Get a remote_config editor working in the open version.
@unlink($filename['md5']);
@unlink($filename['conf']);
}
@@ -217,7 +217,7 @@ if (!$new_agent && $alias != '') {
$agent_options_update = 'agent_options_update';
// Delete link from here.
- $table_agent_name .= "".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'';
+ $table_agent_name .= "".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'';
// Help link.
$table_agent_name .= ui_print_help_icon(
@@ -424,43 +424,43 @@ if (enterprise_installed()) {
$table_adv_secondary_groups = '
'.__('Secondary groups').': '.ui_print_help_icon('secondary_groups', true).'
';
$table_adv_secondary_groups_left = html_print_select_groups(
false,
- // Use the current user to select the groups
+ // Use the current user to select the groups.
'AR',
- // ACL permission
+ // ACL permission.
false,
- // Not all group
+ // Not all group.
'secondary_groups',
- // HTML id
+ // HTML id.
'',
- // No select any by default
+ // No select any by default.
'',
- // Javascript onChange code
+ // Javascript onChange code.
'',
- // Do not user no selected value
+ // Do not user no selected value.
0,
- // Do not use no selected value
+ // Do not use no selected value.
true,
- // Return HTML (not echo)
+ // Return HTML (not echo).
true,
- // Multiple selection
+ // Multiple selection.
true,
- // Sorting by default
+ // Sorting by default.
'',
- // CSS classnames (default)
+ // CSS classnames (default).
false,
- // Not disabled (default)
+ // Not disabled (default).
'width:50%; min-width:170px;',
- // Inline styles (default)
+ // Inline styles (default).
false,
- // Option style select (default)
+ // Option style select (default).
false,
- // Do not truncate the users tree (default)
+ // Do not truncate the users tree (default).
'id_grupo',
- // Key to get as value (default)
+ // Key to get as value (default).
false,
- // Not strict user (default)
+ // Not strict user (default).
$secondary_groups_selected['plain']
- // Do not show the primary group in this selection
+ // Do not show the primary group in this selection.
);
$table_adv_secondary_groups_arrows = html_print_input_image(
@@ -489,32 +489,32 @@ if (enterprise_installed()) {
$table_adv_secondary_groups_right .= html_print_select(
$secondary_groups_selected['for_select'],
- // Values
+ // Values.
'secondary_groups_selected',
- // HTML id
+ // HTML id.
'',
- // Selected
+ // Selected.
'',
- // Javascript onChange code
+ // Javascript onChange code.
'',
- // Nothing selected
+ // Nothing selected.
0,
- // Nothing selected
+ // Nothing selected.
true,
- // Return HTML (not echo)
+ // Return HTML (not echo).
true,
- // Multiple selection
+ // Multiple selection.
true,
- // Sort
+ // Sort.
'',
- // Class
+ // Class.
false,
- // Disabled
+ // Disabled.
'width:50%; min-width:170px;'
- // Style
+ // Style.
);
- // safe operation mode
+ // Safe operation mode.
if ($id_agente) {
$sql_modules = db_get_all_rows_sql(
'SELECT id_agente_modulo as id_module, nombre as name FROM tagente_modulo
@@ -538,12 +538,12 @@ if (enterprise_installed()) {
$table_adv_safe .= __('Module').' '.html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true).'';
}
- // Remote configuration
+ // Remote configuration.
$table_adv_remote = ''.__('Remote configuration').':
';
if (!$new_agent && isset($filename) && file_exists($filename['md5'])) {
$table_adv_remote .= date('F d Y H:i:s', fileatime($filename['md5']));
- // Delete remote configuration
+ // Delete remote configuration.
$table_adv_remote .= '
';
$table_adv_remote .= html_print_image(
'images/cross.png',
@@ -602,12 +602,25 @@ $params['cascade_protection'] = true;
$table_adv_parent .= '';
$table_adv_parent .= ui_print_agent_autocomplete_input($params);
if (enterprise_installed()) {
- $table_adv_parent .= html_print_checkbox_switch('cascade_protection', 1, $cascade_protection, true).__('Cascade protection').' '.ui_print_help_icon('cascade_protection', true);
+ $table_adv_parent .= html_print_checkbox_switch(
+ 'cascade_protection',
+ 1,
+ $cascade_protection,
+ true
+ ).__('Cascade protection').' '.ui_print_help_icon('cascade_protection', true);
}
-$table_adv_parent .= __('Module').' '.html_print_select($modules_values, 'cascade_protection_module', $cascade_protection_module, '', '', 0, true).'
';
+$table_adv_parent .= __('Module').' '.html_print_select(
+ $modules_values,
+ 'cascade_protection_module',
+ $cascade_protection_module,
+ '',
+ '',
+ 0,
+ true
+).'';
-// Learn mode / Normal mode
+// Learn mode / Normal mode.
$table_adv_module_mode = ''.__('Module definition').': '.ui_print_help_icon('module_definition', true).'
';
$table_adv_module_mode .= '
';
$table_adv_module_mode .= html_print_radio_button_extended(
@@ -642,9 +655,14 @@ $table_adv_module_mode .= html_print_radio_button_extended(
);
$table_adv_module_mode .= '
';
-// Status (Disabled / Enabled)
+// Status (Disabled / Enabled).
$table_adv_status = ''.__('Disabled').': '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).'
';
-$table_adv_status .= html_print_checkbox_switch('disabled', 1, $disabled, true).'
';
+$table_adv_status .= html_print_checkbox_switch(
+ 'disabled',
+ 1,
+ $disabled,
+ true
+).'';
// Url address.
if (enterprise_installed()) {
@@ -681,11 +699,11 @@ foreach ($listIcons as $index => $value) {
}
$path = 'images/gis_map/icons/';
-// TODO set better method the path
+// TODO set better method the path.
$table_adv_agent_icon = ''.__('Agent icon').': '.ui_print_help_tip(__('Agent icon for GIS Maps.'), true).'
';
if ($icon_path == '') {
$display_icons = 'none';
- // Hack to show no icon. Use any given image to fix not found image errors
+ // Hack to show no icon. Use any given image to fix not found image errors.
$path_without = 'images/spinner.png';
$path_default = 'images/spinner.png';
$path_ok = 'images/spinner.png';
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index a1fd3f18bf..fb1c60bdd1 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -2458,6 +2458,51 @@ function ui_print_status_image($type, $title='', $return=false, $options=false,
}
+/**
+ * Generates a progress bar CSS based.
+ * Requires css progress.css
+ *
+ * @param integer $progress Progress.
+ * @param string $width Width.
+ * @param string $height Height.
+ * @param string $color Color.
+ * @param boolean $return Return or paint (if false).
+ *
+ * @return string HTML code.
+ */
+function ui_progress(
+ $progress,
+ $width='100%',
+ $height='2em',
+ $color='#80ba27',
+ $return=true
+) {
+ if (!$progress) {
+ $progress = 0;
+ }
+
+ if ($progress > 100) {
+ $progress = 100;
+ }
+
+ if ($progress < 0) {
+ $progress = 0;
+ }
+
+ ui_require_css_file('progress');
+ $output .= '
';
+ $output .= '
'.$progress.'%';
+ $output .= '
';
+ $output .= '
';
+
+ if (!$return) {
+ echo $output;
+ }
+
+ return $output;
+}
+
+
/**
* Print a code into a DIV and enable a toggle to show and hide it
*
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 4a771b3017..f132c0db94 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -5945,6 +5945,43 @@ a#qr_code_agent_view {
* ---------------------------------------------------------------------
*/
+.bullet_modules {
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ margin-right: 5px;
+ margin-top: -2px;
+}
+
+div#bullets_modules {
+ display: inline-block;
+ margin-left: 2em;
+}
+
+div#bullets_modules div {
+ display: inline-block;
+ margin: 0 0.5em;
+}
+
+.orange_background {
+ background: #ffa631;
+}
+.red_background {
+ background: #fc4444;
+}
+.yellow_background {
+ background: #fad403;
+}
+.grey_background {
+ background: #b2b2b2;
+}
+.blue_background {
+ background: #3ba0ff;
+}
+.green_background {
+ background: #80ba27;
+}
+
/* First row in agent view */
#agent_details_first_row {
display: flex;
@@ -5960,12 +5997,19 @@ a#qr_code_agent_view {
}
.agent_details_col_left {
- width: 38%;
+ width: 40%;
+ min-width: 500px;
+}
+
+.agent_details_content .agent_details_bullets {
+ position: relative;
+ left: -20%;
}
.agent_details_col_right {
width: 62%;
margin-left: 20px;
+ min-width: 670px;
}
.buttons_agent_view {
@@ -5985,7 +6029,7 @@ a#qr_code_agent_view {
/* Agent details in agent view */
.agent_details_header {
display: flex;
- justify-content: space-between;
+ justify-content: flex-end;
align-items: center;
border-bottom: 1px solid #e2e2e2;
padding: 6px 20px;
@@ -6005,6 +6049,7 @@ a#qr_code_agent_view {
.agent_details_graph {
width: 205px;
text-align: center;
+ margin: 0 auto;
}
.agent_details_info {
diff --git a/pandora_console/include/styles/progress.css b/pandora_console/include/styles/progress.css
new file mode 100644
index 0000000000..0919269d37
--- /dev/null
+++ b/pandora_console/include/styles/progress.css
@@ -0,0 +1,18 @@
+span.progress_text {
+ position: absolute;
+ font-family: "lato-bolder", "Open Sans", sans-serif;
+ font-size: 2em;
+}
+
+div.progress_main {
+ text-align: center;
+ height: 2.5em;
+ border: 1px solid #80ba27;
+}
+
+div.progress {
+ width: 0%;
+ background: #80ba27;
+ height: 100%;
+ float: left;
+}
diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php
index d51057833f..c578259e60 100755
--- a/pandora_console/operation/agentes/estado_generalagente.php
+++ b/pandora_console/operation/agentes/estado_generalagente.php
@@ -1,17 +1,32 @@
'.' '.ui_print_help_tip(__('Agent in planned downtime'), true, 'images/minireloj-16.png').'';
-} else if (($in_planned_downtime && !$agent['disabled']) || ($in_planned_downtime && !$agent['quiet'])) {
- $agent_name .= ' '.ui_print_help_tip(__('Agent in planned downtime'), true, 'images/minireloj-16.png').'';
+ $agent_name .= '
'.ui_print_help_tip(
+ __('Agent in planned downtime'),
+ true,
+ 'images/minireloj-16.png'
+ ).'';
+} else if (($in_planned_downtime && !$agent['disabled'])
+ || ($in_planned_downtime && !$agent['quiet'])
+) {
+ $agent_name .= ' '.ui_print_help_tip(
+ __('Agent in planned downtime'),
+ true,
+ 'images/minireloj-16.png'
+ ).'';
}
$table_agent_header = '
';
if (!$config['show_group_name']) {
- $table_agent_header .= ui_print_group_icon($agent['id_grupo'], true, 'groups_small', 'padding-right: 6px;');
+ $table_agent_header .= ui_print_group_icon(
+ $agent['id_grupo'],
+ true,
+ 'groups_small',
+ 'padding-right: 6px;'
+ );
}
-$table_agent_header .= $agent_name;
$table_agent_header .= '
';
$status_img = agents_detail_view_status_img(
@@ -109,16 +155,33 @@ $status_img = agents_detail_view_status_img(
$table_agent_header .= '
'.$status_img.'
';
-// Fixed width non interactive charts
+// Fixed width non interactive charts.
$status_chart_width = 180;
$graph_width = 180;
$table_agent_graph = '
';
-$table_agent_graph .= graph_agent_status($id_agente, $graph_width, $graph_width, true, false, false, true);
+$table_agent_graph .= graph_agent_status(
+ $id_agente,
+ $graph_width,
+ $graph_width,
+ true,
+ false,
+ false,
+ true
+);
$table_agent_graph .= '
';
-$table_agent_os = '
'.ui_print_os_icon($agent['id_os'], false, true, true, false, false, false, ['title' => __('OS').': '.get_os_name($agent['id_os'])]);
-$table_agent_os .= empty($agent['os_version']) ? get_os_name((int) $agent['id_os']) : $agent['os_version'].'
';
+$table_agent_os = '
'.ui_print_os_icon(
+ $agent['id_os'],
+ false,
+ true,
+ true,
+ false,
+ false,
+ false,
+ ['title' => __('OS').': '.get_os_name($agent['id_os'])]
+);
+$table_agent_os .= (empty($agent['os_version'])) ? get_os_name((int) $agent['id_os']) : $agent['os_version'].'
';
$addresses = agents_get_addresses($id_agente);
$address = agents_get_address($id_agente);
@@ -158,8 +221,15 @@ $table_agent = '
'.$table_agent_count_modules.'
'.$table_agent_os.$table_agent_ip.$table_agent_version.$table_agent_description.'
';
-// END: TABLE AGENT BUILD
-// START: TABLE CONTACT BUILD
+
+/*
+ * END: TABLE AGENT BUILD.
+ */
+
+/*
+ *START: TABLE CONTACT BUILD.
+ */
+
$table_contact = new stdClass();
$table_contact->id = 'agent_contact_main';
$table_contact->width = '100%';
@@ -168,7 +238,7 @@ $table_contact->cellpadding = 0;
$table_contact->class = 'white_table white_table_no_border';
$table_contact->style[0] = 'width: 30%;';
$table_contact->style[1] = 'width: 70%;';
-$table_contact->headstyle[1] = 'padding-top:6px; padding-bottom:6px';
+$table_contact->headstyle[1] = 'padding-top:6px; padding-bottom:6px;padding-right: 10px;';
$table_contact->head[0] = ' '.__('Agent contact').'';
@@ -210,8 +280,8 @@ $table_contact->data[] = $data;
$data = [];
$table_contact->colspan[3][0] = 2;
-$data[0] = progress_bar($progress, 500, 30, '', 1, false, '#82b92e');
-// modo 1 para que muestre texto
+$data[0] = ui_progress($progress);
+
if ($progress > 100) {
$data[0] .= clippy_context_help('agent_out_of_limits');
}
@@ -239,8 +309,14 @@ if (!$secondary_groups) {
$table_contact->data[] = $data;
-// END: TABLE CONTACT BUILD
-// START: TABLE DATA BUILD
+/*
+ * END: TABLE CONTACT BUILD
+ */
+
+/*
+ * START: TABLE DATA BUILD
+ */
+
$table_data = new stdClass();
$table_data->id = 'agent_data_main';
$table_data->width = '100%';
@@ -249,11 +325,18 @@ $table_data->cellpadding = 0;
$table_data->class = 'white_table white_table_droppable';
$table_data->style = array_fill(0, 3, 'width: 25%;');
-$table_data->head[0] = html_print_image('images/arrow_down_green.png', true, $options);
+$table_data->head[0] = html_print_image(
+ 'images/arrow_down_green.png',
+ true,
+ $options
+);
$table_data->head[0] .= ' '.__('Agent info').'';
$table_data->head_colspan[0] = 4;
-$has_remote_conf = enterprise_hook('config_agents_has_remote_configuration', [$agent['id_agente']]);
+$has_remote_conf = enterprise_hook(
+ 'config_agents_has_remote_configuration',
+ [$agent['id_agente']]
+);
if (enterprise_installed()) {
$data = [];
@@ -276,12 +359,14 @@ if (enterprise_installed()) {
$table_data->data[] = $data;
}
-// Gis and url address
+// Gis and url address.
$data_opcional = [];
-// Position Information
+// Position Information.
if ($config['activate_gis']) {
$data_opcional[] = ''.__('Position (Long, Lat)').'';
- $dataPositionAgent = gis_get_data_last_position_agent($agent['id_agente']);
+ $dataPositionAgent = gis_get_data_last_position_agent(
+ $agent['id_agente']
+ );
if ($dataPositionAgent === false) {
$data_opcional[] = __('There is no GIS data.');
@@ -299,7 +384,7 @@ if ($config['activate_gis']) {
array_push($data_opcional);
}
-// If the url description is setted
+// If the url description is set.
if ($agent['url_address'] != '') {
// $data_opcional = [];
$data_opcional[] = ''.__('Url address').'';
@@ -311,7 +396,7 @@ if ($agent['url_address'] != '') {
}
-// Other IP address and timezone offset
+// Other IP address and timezone offset.
if (!empty($addresses)) {
// $data_opcional = [];
$data_opcional[] = ''.__('Other IP addresses').'';
@@ -322,7 +407,7 @@ if (!empty($addresses)) {
array_push($data_opcional);
}
-// Timezone Offset
+// Timezone Offset.
if ($agent['timezone_offset'] != 0) {
$data_opcional[] = ''.__('Timezone Offset').'';
if ($agent['timezone_offset'] != 0) {
@@ -339,7 +424,7 @@ foreach ($data_opcional as $key => $value) {
}
-// Custom fields
+// Custom fields.
$fields = db_get_all_rows_filter(
'tagent_custom_fields',
['display_on_front' => 1]
@@ -392,28 +477,52 @@ for ($i = 0; $i <= $custom_fields_count; $i++) {
$i++;
}
-// END: TABLE DATA BUILD
-// START: ACCESS RATE GRAPH
+/*
+ * END: TABLE DATA BUILD
+ */
+
+/*
+ * START: ACCESS RATE GRAPH
+ */
+
$access_agent = db_get_value_sql(
'SELECT COUNT(id_agent)
FROM tagent_access
WHERE id_agent = '.$id_agente
);
+
if ($config['agentaccess'] && $access_agent > 0) {
$table_access_rate = '
-
-
'.graphic_agentaccess($id_agente, '95%', 100, SECONDS_1DAY, true).'
-
';
+
+ '.graphic_agentaccess(
+ $id_agente,
+ '95%',
+ 100,
+ SECONDS_1DAY,
+ true
+ ).'
+';
}
-// END: ACCESS RATE GRAPH
-// START: TABLE INCIDENTS
+/*
+ * END: ACCESS RATE GRAPH
+ */
+
+/*
+ * START: TABLE INCIDENTS
+ */
+
$last_incident = db_get_row_sql(
- "
- SELECT * FROM tincidencia
- WHERE estado IN (0,1)
- AND id_agent = $id_agente
- ORDER BY actualizacion DESC"
+ sprintf(
+ 'SELECT * FROM tincidencia
+ WHERE estado IN (0,1)
+ AND id_agent = %d
+ ORDER BY actualizacion DESC',
+ $id_agente
+ )
);
if ($last_incident != false) {
@@ -424,7 +533,7 @@ if ($last_incident != false) {
$table_incident->class = 'white_table';
$table_incident->style = array_fill(0, 3, 'width: 25%;');
- $table_incident->head[0] = ' '.__('Active incident on this agent').''.'';
+ $table_incident->head[0] = ' '.__('Active incident on this agent').'';
$table_incident->head_colspan[0] = 4;
$data = [];
@@ -442,8 +551,14 @@ if ($last_incident != false) {
$table_incident->data[] = $data;
}
-// END: TABLE INCIDENTS
-// START: TABLE INTERFACES
+/*
+ * END: TABLE INCIDENTS
+ */
+
+/*
+ * START: TABLE INTERFACES
+ */
+
$network_interfaces_by_agents = agents_get_network_interfaces([$agent]);
$network_interfaces = [];
@@ -476,7 +591,11 @@ if (!empty($network_interfaces)) {
'class' => 'closed',
'style' => 'cursor:pointer;',
];
- $table_interface->head[0] = html_print_image('images/arrow_down_green.png', true, $options).' ';
+ $table_interface->head[0] = html_print_image(
+ 'images/arrow_down_green.png',
+ true,
+ $options
+ ).' ';
$table_interface->head[0] .= ''.__('Interface information').' (SNMP)';
$table_interface->head_colspan = [];
$table_interface->head_colspan[0] = 8;
@@ -497,7 +616,7 @@ if (!empty($network_interfaces)) {
$params_json = json_encode($params);
$params_encoded = base64_encode($params_json);
$win_handle = dechex(crc32($interface['status_module_id'].$interface_name));
- $graph_link = "".html_print_image('images/chart_curve.png', true, ['title' => __('Interface traffic')]).'';
+ $graph_link = "".html_print_image('images/chart_curve.png', true, ['title' => __('Interface traffic')]).'';
} else {
$graph_link = '';
}
@@ -520,9 +639,9 @@ if (!empty($network_interfaces)) {
$status_condition = ' AND (estado = 0 OR estado = 1) ';
$unixtime = (get_system_time() - SECONDS_1DAY);
- // last hour
+ // Last hour.
$time_condition = 'AND (utimestamp > '.$unixtime.')';
- // Tags ACLS
+ // Tags ACLs.
if ($id_group > 0 && in_array(0, $user_groups_ids)) {
$group_array = (array) $id_group;
} else {
@@ -545,18 +664,16 @@ if (!empty($network_interfaces)) {
$id_modules_array[] = $interface['status_module_id'];
$unixtime = (get_system_time() - SECONDS_1DAY);
- // last hour
+ // Last hour.
$time_condition = 'WHERE (te.utimestamp > '.$unixtime.')';
$sqlEvents = sprintf(
- '
- SELECT *
+ 'SELECT *
FROM tevento te
INNER JOIN tagente_estado tae
ON te.id_agentmodule = tae.id_agente_modulo
AND tae.id_agente_modulo IN (%s)
- %s
- ',
+ %s',
implode(',', $id_modules_array),
$time_condition
);
@@ -600,8 +717,12 @@ if (!empty($network_interfaces)) {
}
}
-// END: TABLE INTERFACES
- // This javascript piece of code is used to make expandible the body of the table
+/*
+ * END: TABLE INTERFACES
+ */
+
+ // This javascript piece of code is used to make expandible
+ // the body of the table.
?>
-
-
- '.graph_graphic_agentevents($id_agente, 100, 45, SECONDS_1DAY, '', true, true).'
- ';
+
+
+ '.graph_graphic_agentevents(
+ $id_agente,
+ 100,
+ 45,
+ SECONDS_1DAY,
+ '',
+ true,
+ true
+).'
+ ';
- $agent_contact = html_print_table($table_contact, true);
+/*
+ * EVENTS TABLE END.
+ */
- $agent_info = empty($table_data->data) ? '' : html_print_table($table_data, true);
+$agent_contact = html_print_table($table_contact, true);
- $agent_incidents = !isset($table_incident) ? '' : html_print_table($table_incident, true);
+$agent_info = empty($table_data->data) ? '' : html_print_table($table_data, true);
- echo '
-
'.$table_agent.'
-
'.$agent_contact.'
-
'.$agent_info.''.$table_access_rate.$table_events.'
'.$agent_incidents;
+$agent_incidents = !isset($table_incident) ? '' : html_print_table($table_incident, true);
- if (isset($table_interface)) {
- echo html_print_table($table_interface, true);
- }
+echo '
+
'.$table_agent.'
+
'.$agent_contact.'
+
'.$agent_info;
+
+// Show both graphs, events and access rate.
+if ($table_access_rate) {
+ echo ''.$table_access_rate.$table_events.'
';
+} else {
+ echo ''.$table_events.'
';
+}
+
+echo $agent_incidents;
+
+if (isset($table_interface)) {
+ echo html_print_table($table_interface, true);
+}
diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php
index b311885acb..c387a437d7 100755
--- a/pandora_console/operation/agentes/estado_monitores.php
+++ b/pandora_console/operation/agentes/estado_monitores.php
@@ -134,7 +134,12 @@ $sort = get_parameter('sort', 'up');
echo "";
-echo ui_print_help_tip(__('To see the list of modules paginated, enable this option in the Styles Configuration.'), true).__('Full list of monitors').' '.reporting_tiny_stats($agent, true, 'modules');
+echo ui_print_help_tip(
+ __('To see the list of modules paginated, enable this option in the Styles Configuration.'),
+ true
+);
+echo ''.__('Full list of monitors').'';
+echo reporting_tiny_stats($agent, true, 'modules');
$modules_not_init = agents_monitor_notinit($id_agente);
if (!empty($modules_not_init)) {
@@ -514,4 +519,3 @@ function print_form_filter_monitors(
echo $form_text;
}
-