diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index a24fad37f7..b121a44c37 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -115,17 +115,13 @@ } .info_table tr > td:first-child, -.info_table tr > th:first-child, -.filter_table tr > td:first-child, -.filter_table tr > th:first-child { +.info_table tr > th:first-child { /*padding-left: 5px;*/ padding-left: 10px; border-left: 1px solid #c0ccdc; } .info_table tr > td:last-child, -.info_table tr > th:last-child, -.filter_table tr > td:last-child, -.filter_table tr > th:last-child { +.info_table tr > th:last-child { /*padding-right: 5px;*/ padding-right: 10px; border-right: 1px solid #c0ccdc; diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index a15f9afa1a..e6e8193134 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -786,11 +786,11 @@ if ($last_incident != false) { $network_interfaces_by_agents = agents_get_network_interfaces([$agent]); $network_interfaces = []; -if (!empty($network_interfaces_by_agents) && !empty($network_interfaces_by_agents[$id_agente])) { +if (empty($network_interfaces_by_agents) === false && empty($network_interfaces_by_agents[$id_agente]) === false) { $network_interfaces = $network_interfaces_by_agents[$id_agente]['interfaces']; } -if (!empty($network_interfaces)) { +if (empty($network_interfaces) === false) { $table_interface = new stdClass(); $table_interface->id = 'agent_interface_info'; $table_interface->class = 'info_table'; @@ -818,7 +818,7 @@ if (!empty($network_interfaces)) { $event_text_cont = 0; foreach ($network_interfaces as $interface_name => $interface) { - if (!empty($interface['traffic'])) { + if (empty($interface['traffic']) === false) { $permission = check_acl_one_of_groups($config['id_user'], $all_groups, 'RR'); if ($permission) { @@ -852,13 +852,13 @@ if (!empty($network_interfaces)) { $events_limit = 5000; $user_groups = users_get_groups($config['id_user'], 'ER'); $user_groups_ids = array_keys($user_groups); - if (empty($user_groups)) { + if (empty($user_groups) === true) { $groups_condition = ' 1 = 0 '; } else { $groups_condition = ' id_grupo IN ('.implode(',', $user_groups_ids).') '; } - if (!check_acl($config['id_user'], 0, 'PM')) { + if ((bool) check_acl($config['id_user'], 0, 'PM') === false) { $groups_condition .= ' AND id_grupo != 0'; } @@ -966,7 +966,7 @@ if (!empty($network_interfaces)) { close_table_white('#table_access_rate'); }) .css('cursor', 'pointer'); - + function close_table(id){ var arrow = $(id).find("thead").find("img"); if (arrow.hasClass("closed")) { @@ -1054,56 +1054,23 @@ $agentEvents = html_print_div( true ); -/* - $table_events = '
'; - $table_events .= '
'; - $table_events .= html_print_image( - 'images/arrow_down_green.png', - true - ); - $table_events .= ''; - $table_events .= __('Events (Last 24h)'); - $table_events .= ''; - $table_events .= '
'; - - $table_events .= '
'; - $table_events .= graph_graphic_agentevents( - $id_agente, - 95, - 70, - SECONDS_1DAY, - '', - true, - true, - 500 - ); - $table_events .= '
'; - $table_events .= '
'; -*/ - /* * EVENTS TABLE END. */ -if (empty($data_opcional) === true) { +if (isset($data_opcional) === false || isset($data_opcional->data) === false || empty($data_opcional->data) === true) { $agentAdditionalInfo = ''; } else { - // if (count($table_data->data) === 1 && (bool) $config['activate_gis'] === true && $dataPositionAgent === false) { - if (empty($data_opcional) === true && (bool) $config['activate_gis'] === true && $dataPositionAgent === false) { - $agentAdditionalInfo = ''; - } else { - // $agentAdditionalInfo = html_print_table($table_data, true);$agentAdditionalContent - $agentAdditionalInfo = ui_toggle( - html_print_table($data_opcional, true), - ''.__('Agent data').'', - 'status_monitor_agent', - false, - false, - true, - 'box-shadow agent_details_col agent_details_toggle agent_details_first_row w100p', - 'mrgn_lft_20px mrgn_right_20px', - 'mrgn_lft_20px mrgn_right_20px w100p' - ); - } + $agentAdditionalInfo = ui_toggle( + html_print_table($data_opcional, true), + ''.__('Agent data').'', + 'status_monitor_agent', + false, + false, + true, + 'box-shadow agent_details_col agent_details_toggle agent_details_first_row w100p', + 'mrgn_lft_20px mrgn_right_20px', + 'mrgn_lft_20px mrgn_right_20px w100p' + ); } $agentIncidents = (isset($table_incident) === false) ? '' : html_print_table($table_incident, true); diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index 7b85a5121c..acb7fdf50a 100755 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -546,8 +546,11 @@ function print_form_filter_monitors( $table = new stdClass(); $table->class = 'filter_table'; $table->id = 'module_filter_agent_view'; - $table->styleTable = 'border-radius: 0;padding: 0;margin: 0;'; + $table->styleTable = 'border-radius: 0;padding: 0;margin: 0 0 10px;'; $table->width = '100%'; + $table->cellstyle[0][0] = 'width: 0'; + $table->cellstyle[0][1] = 'width: 0'; + $table->cellstyle[0][2] = 'width: 0'; // Captions. $table->data[0][0] = html_print_input_hidden('filter_monitors', 1, true); $table->data[0][0] .= html_print_input_hidden('monitors_change_filter', 1, true); @@ -593,7 +596,10 @@ function print_form_filter_monitors( 'id' => 'checkbox-status_hierachy_mode', ] ); - $table->data[1][4] = html_print_button( + + $filtersButtons = []; + + $filtersButtons[] = html_print_button( __('Filter'), 'filter', false, @@ -604,7 +610,8 @@ function print_form_filter_monitors( ], true ); - $table->data[1][5] = html_print_button( + + $filtersButtons[] = html_print_button( __('Reset'), 'filter', false, @@ -615,6 +622,15 @@ function print_form_filter_monitors( ], true ); + + $table->data[1][4] = html_print_div( + [ + 'class' => 'action-buttons', + 'content' => implode('', $filtersButtons), + ], + true + ); + $form_text .= html_print_table($table, true); // TODO. Unused code.