diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index af4100c6ec..5b16cbabd6 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -495,7 +495,8 @@ function html_print_select_groups( $size=false, $simple_multiple_options=false, $required=false, - $inverse='' + $inverse='', + $form='' ) { $output = ''; @@ -609,7 +610,12 @@ function html_print_select_groups( '', false, $simple_multiple_options, - $required + $required, + false, + true, + false, + false, + $form ); if ($required !== false) { @@ -761,7 +767,8 @@ function html_print_select( $truncate_size=false, $select2_enable=true, $select2_multiple_enable=false, - $select2_multiple_enable_all=false + $select2_multiple_enable_all=false, + $form='' ) { $output = "\n"; @@ -802,6 +809,10 @@ function html_print_select( $attributes .= ' class="'.$class.'"'; } + if (!empty($form)) { + $attributes .= ' form="'.$form.'"'; + } + if (!empty($disabled)) { $attributes .= ' disabled="disabled"'; } diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index 89a05a3fb6..c2a4665925 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -82,10 +82,12 @@ table.dataTable tbody td { padding: 8px 10px; } +/* th:last-child { padding-top: 0px !important; padding-bottom: 0px !important; } +*/ table#table_events > tbody > tr > td { padding: 0px !important; diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index b8085838bb..e5ea0e51d6 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -577,7 +577,6 @@ ul li { #menu_tabs { height: 49px; border-bottom: 1px solid #c1ccdc; - padding-bottom: 2px; } .div_border_line { diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index f6f4364f92..29308f7684 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -11614,3 +11614,9 @@ ul.tag-editor { .ui-dialog .ui-dialog-titlebar { display: block !important; } + +.select2-container--default .select2-search--inline .select2-search__field { + height: 20px; + padding-left: 5px !important; + font-size: 20px !important; +} diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 9898f4a290..c6a1e43b5c 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -1020,33 +1020,29 @@ $tableAgents->class = 'info_table tactical_table'; $tableAgents->head = []; $tableAgents->head[0] = ''.__('Agent').''; $tableAgents->head[0] .= ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectNameUp, $selectNameDown); -$tableAgents->size[0] = '12%'; +$tableAgents->size[0] = '10%'; $tableAgents->head[1] = ''.__('Description').''; -$tableAgents->head[0] .= ui_get_sorting_arrows($url_up_description, $url_down_description, $selectDescriptionUp, $selectDescriptionDown); -$tableAgents->size[1] = '16%'; - -$tableAgents->head[10] = ''.__('Remote').''; -$tableAgents->head[10] .= ui_get_sorting_arrows($url_up_remote, $url_down_remote, $selectRemoteUp, $selectRemoteDown); -$tableAgents->size[10] = '9%'; +$tableAgents->head[1] .= ui_get_sorting_arrows($url_up_description, $url_down_description, $selectDescriptionUp, $selectDescriptionDown); +$tableAgents->size[1] = '14%'; $tableAgents->head[2] = ''.__('OS').''; $tableAgents->head[2] .= ui_get_sorting_arrows($url_up_os, $url_down_os, $selectOsUp, $selectOsDown); -$tableAgents->size[2] = '8%'; +$tableAgents->size[2] = '7%'; $tableAgents->head[3] = ''.__('Interval').''; $tableAgents->head[3] .= ui_get_sorting_arrows($url_up_interval, $url_down_interval, $selectIntervalUp, $selectIntervalDown); -$tableAgents->size[3] = '10%'; +$tableAgents->size[3] = '7%'; $tableAgents->head[4] = ''.__('Group').''; $tableAgents->head[4] .= ui_get_sorting_arrows($url_up_group, $url_down_group, $selectGroupUp, $selectGroupDown); -$tableAgents->size[4] = '8%'; +$tableAgents->size[4] = '7%'; $tableAgents->head[5] = ''.__('Type').''; -$tableAgents->size[5] = '8%'; +$tableAgents->size[5] = '7%'; $tableAgents->head[6] = ''.__('Modules').''; -$tableAgents->size[6] = '10%'; +$tableAgents->size[6] = '7%'; $tableAgents->head[7] = ''.__('Status').''; $tableAgents->size[7] = '4%'; @@ -1056,14 +1052,18 @@ $tableAgents->size[8] = '4%'; $tableAgents->head[9] = ''.__('Last contact').''; $tableAgents->head[9] .= ui_get_sorting_arrows($url_up_last, $url_down_last, $selectLastContactUp, $selectLastContactDown); -$tableAgents->size[9] = '15%'; +$tableAgents->size[9] = '7%'; $tableAgents->head[10] = ''.__('Last status change').''; $tableAgents->head[10] .= ui_get_sorting_arrows($url_up_last_status_change, $url_down_last_status_change, $selectLastStatusChangeUp, $selectLastStatusChangeDown); $tableAgents->size[10] = '10%'; -$tableAgents->head[11] = ''.__('Agent events').''; -$tableAgents->size[11] = '4%'; +$tableAgents->head[11] = ''.__('Remote').''; +$tableAgents->head[11] .= ui_get_sorting_arrows($url_up_remote, $url_down_remote, $selectRemoteUp, $selectRemoteDown); +$tableAgents->size[11] = '7%'; + +$tableAgents->head[12] = ''.__('Op').''; +$tableAgents->size[12] = '4%'; $tableAgents->align = []; @@ -1116,9 +1116,22 @@ foreach ($agents as $agent) { $data[0] = '
'; + if ($agent['id_os'] == CLUSTER_OS_ID) { + $cluster = PandoraFMS\Cluster::loadFromAgentId( + $agent['id_agente'] + ); + $url = 'index.php?sec=reporting&sec2='; + $url .= 'operation/cluster/cluster'; + $url = ui_get_full_url( + $url.'&op=view&id='.$cluster->id() + ); + } else { + $url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente']; + } + $data[0] .= html_print_anchor( [ - 'href' => ui_get_full_url('index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente']), + 'href' => ui_get_full_url($url), 'content' => ui_print_truncate_text($agent['alias'], 'agent_medium', false, true, true), ], true @@ -1146,61 +1159,12 @@ foreach ($agents as $agent) { $data[0] .= ''; } - $data[0] .= '
'; + $data[0] .= ''; $data[1] = ''.ui_print_truncate_text($agent['description'], 'description', false, true, true, '[…]').''; $data[2] = ''; - if (enterprise_installed()) { - enterprise_include_once('include/functions_config_agents.php'); - if (enterprise_hook('config_agents_has_remote_configuration', [$agent['id_agente']])) { - $data[10] = ''.html_print_image( - 'images/remote-configuration@svg.svg', - true, - [ - 'align' => 'middle', - 'title' => __('Remote config'), - 'class' => 'invert_filter main_menu_icon', - ] - ).''; - } - } - $data[2] = html_print_div( [ 'class' => 'invert_filter main_menu_icon', @@ -1252,8 +1216,24 @@ foreach ($agents as $agent) { 'status' => -1, ]; + $data[11] = ''; + if (enterprise_installed()) { + enterprise_include_once('include/functions_config_agents.php'); + if (enterprise_hook('config_agents_has_remote_configuration', [$agent['id_agente']])) { + $data[11] = ''.html_print_image( + 'images/remote-configuration@svg.svg', + true, + [ + 'align' => 'middle', + 'title' => __('Remote config'), + 'class' => 'invert_filter main_menu_icon', + ] + ).''; + } + } + $fb64 = base64_encode(json_encode($agent_event_filter)); - $data[11] = ''.html_print_image( + $data[12] = ''.html_print_image( 'images/event.svg', true, [ @@ -1263,6 +1243,31 @@ foreach ($agents as $agent) { ] ).''; + if (check_acl($config['id_user'], $agent['id_grupo'], 'AW')) { + if ($agent['id_os'] == CLUSTER_OS_ID) { + $cluster = PandoraFMS\Cluster::loadFromAgentId( + $agent['id_agente'] + ); + $url = 'index.php?sec=reporting&sec2='; + $url .= 'operation/cluster/cluster'; + $url = ui_get_full_url( + $url.'&op=update&id='.$cluster->id() + ); + } else { + $url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$agent['id_agente']; + } + + $data[12] .= ''.html_print_image( + 'images/edit.svg', + true, + [ + 'align' => 'middle', + 'title' => __('Edit'), + 'class' => 'main_menu_icon invert_filter', + ] + ).''; + } + array_push($tableAgents->data, $data); } diff --git a/pandora_console/operation/agentes/group_view.php b/pandora_console/operation/agentes/group_view.php index f2ebbedbcf..fa4d171e24 100644 --- a/pandora_console/operation/agentes/group_view.php +++ b/pandora_console/operation/agentes/group_view.php @@ -176,13 +176,16 @@ if ($total_agentes > 0) { } echo ''; + echo ''; echo ''; echo "'; echo ''; echo ''; - echo "'; - echo "'; + echo "'; + echo "'; echo ''; + echo ''; + echo ''; echo ""; echo "
".__('Summary of the status groups').'
".__('Agents').'".__('Modules').'".__('Agents').'".__('Modules').'
"; echo "".$total_agent_critical.'%'; @@ -199,6 +202,7 @@ echo ''; echo "".$total_monitor_not_init.'%'; echo ''; echo ''; + echo ''; echo '
'; if ($count == 1) { @@ -224,6 +228,7 @@ if (empty($result_groups) === false) { ); echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -246,6 +251,7 @@ if (empty($result_groups) === false) { echo "'; echo "'; echo ''; + echo ''; foreach ($result_groups as $data) { if ((bool) $config['show_empty_groups'] === false
'.__('Agents').'".__('Critical').'".__('Alert fired').'