diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 27f81b1f43..6056935be4 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -776,7 +776,7 @@ if ($agents !== false) { } if ((bool) $agent['disabled'] === true) { - $additionalDataAgentName[] = ui_print_help_tip(__('Disabled')); + $additionalDataAgentName[] = ui_print_help_tip(__('Disabled'), true); } if ((bool) $agent['quiet'] === true) { @@ -903,12 +903,12 @@ if ($agents !== false) { if ((bool) $agent['disabled'] === true) { $agentDisableEnableTitle = __('Enable agent'); - $agentDisableEnableAction = 'enable_agent'; + $agentDisableEnableAction = 'enable'; $agentDisableEnableCaption = __('You are going to enable a cluster agent. Are you sure?'); $agentDisableEnableIcon = 'change-active.svg'; } else { $agentDisableEnableTitle = __('Disable agent'); - $agentDisableEnableAction = 'disable_agent'; + $agentDisableEnableAction = 'disable'; $agentDisableEnableCaption = __('You are going to disable a cluster agent. Are you sure?'); $agentDisableEnableIcon = 'change-pause.svg'; } diff --git a/pandora_console/godmode/agentes/status_monitor_custom_fields.php b/pandora_console/godmode/agentes/status_monitor_custom_fields.php index a960c32bf2..2dfb79185d 100644 --- a/pandora_console/godmode/agentes/status_monitor_custom_fields.php +++ b/pandora_console/godmode/agentes/status_monitor_custom_fields.php @@ -30,6 +30,26 @@ if (! check_acl($config['id_user'], 0, 'AR') $update = get_parameter('upd_button', ''); $default = (int) get_parameter('default', 0); +// Header. +ui_print_standard_header( + __('Monitor detail').$subpage, + 'images/agent.png', + false, + '', + true, + $buttons, + [ + [ + 'link' => '', + 'label' => __('Monitoring'), + ], + [ + 'link' => '', + 'label' => __('Views'), + ], + ], + (empty($fav_menu) === true) ? [] : $fav_menu +); if ($default != 0) { $fields_selected = explode(',', $config['status_monitor_fields']); @@ -161,11 +181,11 @@ foreach ($fields_available as $key => $available) { // General title. $generalTitleContent = []; -$generalTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true); +// $generalTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true); $generalTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Show monitor detail fields')], true); $titledata[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $generalTitleContent) ], true); $table->data['general_title'] = $titledata; -$table->data[0][0] = ''.__('Fields available').''; +$table->data[0][0] = ''.__('Fields available').''; $table->data[1][0] = html_print_select($fields_available, 'fields_available[]', true, '', '', 0, true, true, false, '', false, 'width: 300px'); $table->data[1][1] = ''.html_print_image( 'images/darrowright.png', @@ -187,7 +207,7 @@ $table->data[1][1] .= '



'.html_print_image( ).''; $table->data[0][1] = ''; -$table->data[0][2] = ''.__('Fields selected').''; +$table->data[0][2] = ''.__('Fields selected').''; $table->data[1][2] = html_print_select( $result_selected, 'fields_selected[]', @@ -203,7 +223,7 @@ $table->data[1][2] = html_print_select( 'width: 300px' ); -echo '
'; +echo ''; html_print_table($table); html_print_action_buttons( diff --git a/pandora_console/godmode/consoles/consoles.php b/pandora_console/godmode/consoles/consoles.php index 02bbe981aa..0158dfe14c 100644 --- a/pandora_console/godmode/consoles/consoles.php +++ b/pandora_console/godmode/consoles/consoles.php @@ -54,12 +54,6 @@ $results = db_get_all_rows_in_table('tconsole'); $message = ''; -if ($results === false) { - $message = ui_print_info_message( - __('If you want to have your consoles registered, you must define them by editing config.php in each individual console and wait for cron to run in order to be registered.') - ); -} - View::render( 'consoles/list', [ @@ -67,3 +61,9 @@ View::render( 'message' => $message, ] ); + +if ($results === false) { + $message = ui_print_info_message( + __('If you want to have your consoles registered, you must define them by editing config.php in each individual console and wait for cron to run in order to be registered.') + ); +} diff --git a/pandora_console/include/ajax/heatmap.ajax.php b/pandora_console/include/ajax/heatmap.ajax.php index dd22fcdfef..37806fb4a4 100644 --- a/pandora_console/include/ajax/heatmap.ajax.php +++ b/pandora_console/include/ajax/heatmap.ajax.php @@ -45,73 +45,101 @@ if (is_ajax() === true) { $group = get_parameter('group', true); echo ''; - echo '
'; - echo '

'.__('Refresh').'

'; - echo html_print_select( + echo html_print_label_input_block( + __('Refresh'), + html_print_select( + [ + '30' => __('30 seconds'), + (string) SECONDS_1MINUTE => __('1 minute'), + '180' => __('3 minutes'), + (string) SECONDS_5MINUTES => __('5 minutes'), + ], + 'refresh', + $refresh, + '', + '', + 0, + true, + false, + false, + '', + false, + 'width: 100%; margin-top: 10px;' + ), [ - '30' => __('30 seconds'), - (string) SECONDS_1MINUTE => __('1 minute'), - '180' => __('3 minutes'), - (string) SECONDS_5MINUTES => __('5 minutes'), - ], - 'refresh', - $refresh, - '', - '', - 0, - true, - false, - false, - '', - false, - 'margin-top: 3px;' + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] ); - echo '
'; - echo '
'; - echo '

'.__('Search').'

'; - echo html_print_input_text('search', $search, '', 30, 255, true); - echo '
'; - - echo '
'; - echo '

'.__('Type').'

'; - echo html_print_select( + echo html_print_label_input_block( + __('Search'), + html_print_input_text( + 'search', + $search, + '', + 30, + 255, + true, + false, + false, + '', + 'w100p' + ), [ - 0 => __('Group agents'), - 1 => __('Group modules by tag'), - 2 => __('Group modules by module group'), - 3 => __('Group modules by agents'), - ], - 'type', - $type, - '', - '', - 0, - true, - false, - false, - '', - false, - 'margin-top: 3px;width:70%' + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] ); - echo '
'; - echo '
'; - echo '

'.__('Show groups').'

'; - echo html_print_checkbox('group', 1, $group, true); - echo '
'; + echo html_print_label_input_block( + __('Type'), + html_print_select( + [ + 0 => __('Group agents'), + 1 => __('Group modules by tag'), + 2 => __('Group modules by module group'), + 3 => __('Group modules by agents'), + ], + 'type', + $type, + '', + '', + 0, + true, + false, + false, + '', + false, + 'width: 100%; margin-top: 10px;' + ), + [ + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] + ); + + echo html_print_label_input_block( + __('Show groups'), + '
'.html_print_checkbox('group', 1, $group, true).'
', + [ + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] + ); echo '
'; } if ($getFilterType === true) { $filter = get_parameter('filter', 0); - echo '
'; + $label = ' '; + switch ($type) { case 0: default: - echo '

'.__('Group').'

'; - echo html_print_input( + $label = __('Group'); + $input = html_print_input( [ 'type' => 'select_groups', 'returnAllGroup' => true, @@ -126,9 +154,9 @@ if (is_ajax() === true) { break; case 1: - echo '

'.__('Tag').'

'; + $label = __('Tag'); if (tags_has_user_acl_tags($config['id_user']) === false) { - echo html_print_select_from_sql( + $input = html_print_select_from_sql( 'SELECT id_tag, name FROM ttag WHERE id_tag @@ -142,7 +170,7 @@ if (is_ajax() === true) { true, false, false, - 'width: 200px', + 'width: 100%', '5' ); } else { @@ -150,7 +178,7 @@ if (is_ajax() === true) { if (!empty($user_tags)) { $id_user_tags = array_keys($user_tags); - echo html_print_select_from_sql( + $input = html_print_select_from_sql( 'SELECT id_tag, name FROM ttag WHERE id_tag IN ('.implode(',', $id_user_tags).') @@ -164,11 +192,11 @@ if (is_ajax() === true) { true, false, false, - 'width: 200px', + 'width: 100%', '5' ); } else { - echo html_print_select_from_sql( + $input = html_print_select_from_sql( 'SELECT id_tag, name FROM ttag WHERE id_tag @@ -182,7 +210,7 @@ if (is_ajax() === true) { true, false, false, - 'width: 200px', + 'width: 100%', '5' ); } @@ -190,8 +218,8 @@ if (is_ajax() === true) { break; case 2: - echo '

'.__('Module group').'

'; - echo html_print_select_from_sql( + $label = __('Module group'); + $input = html_print_select_from_sql( 'SELECT id_mg, name FROM tmodule_group ORDER BY name', 'filter[]', $filter, @@ -202,7 +230,7 @@ if (is_ajax() === true) { true, true, false, - 'width: 200px', + 'width: 100%', '5' ); break; @@ -212,7 +240,14 @@ if (is_ajax() === true) { break; } - echo '
'; + echo html_print_label_input_block( + $label, + $input, + [ + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] + ); } if ($getInfo === true) { diff --git a/pandora_console/include/class/AgentsAlerts.class.php b/pandora_console/include/class/AgentsAlerts.class.php index 379b595d5a..1e3dc705b8 100644 --- a/pandora_console/include/class/AgentsAlerts.class.php +++ b/pandora_console/include/class/AgentsAlerts.class.php @@ -771,7 +771,7 @@ class AgentsAlerts extends HTML $headerInputs = []; $headerInputs[] = [ - 'label' => __('Group'), + 'label' => ''.__('Group').'', 'id' => 'select-group-id', 'arguments' => [ 'name' => 'group-id', @@ -788,8 +788,9 @@ class AgentsAlerts extends HTML ]; $headerInputs[] = [ - 'label' => __('Show modules without alerts'), + 'label' => ''.__('Show modules without alerts').'', 'id' => 'txt-use-agent-ip', + 'class' => 'display-grid mrgn_lft_15px mrgn_btn_5px', 'arguments' => [ 'name' => 'show-modules-without-alerts', 'checked' => $this->showWithoutAlertModules, diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index b4d57e1c79..0edbb6bb0c 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -805,6 +805,11 @@ select:-internal-list-box { max-height: 400px; } +.mx_height85 { + height: 85px !important; + max-height: 85px !important; +} + .no-text-imp { font-size: 0 !important; } @@ -11853,3 +11858,7 @@ li.input-interval .extra-container-input .select2 { .scale-0-8 { transform: scale(0.8); } + +label:has(span.label-alert-agent) { + margin-bottom: 10px; +} diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 473337011e..5e86d78853 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -907,6 +907,9 @@ $tableFilter->data['second_line'][1] = html_print_label_input_block( true, '', [], + true, + 0, + '30', true ) ); diff --git a/pandora_console/operation/heatmap.php b/pandora_console/operation/heatmap.php index 1e063d3c3d..a982bffb9a 100644 --- a/pandora_console/operation/heatmap.php +++ b/pandora_console/operation/heatmap.php @@ -149,13 +149,13 @@ if ($is_ajax === false && $pure === false) { if ($is_ajax === false && $pure === true) { // Floating menu - Start. - echo '
'; + echo '
'; echo '