diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index 96553d2ac4..9e99cad7ef 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -383,12 +383,11 @@ class SnmpConsole extends HTML 5 => __('Other'), ]; - $this->tableId = 'snmp_console'; - + $tableId = 'snmp_console'; // Load datatables user interface. ui_print_datatable( [ - 'id' => $this->tableId, + 'id' => $tableId, 'class' => 'info_table', 'style' => 'width: 100%', 'columns' => $columns, @@ -490,16 +489,25 @@ class SnmpConsole extends HTML echo $e->getMessage(); } - echo '
'; - html_print_submit_button(__('Validate'), 'updatebt', false, 'class="sub ok"'); - echo ' '; - html_print_submit_button( + $buttons[] = html_print_submit_button( + __('Validate'), + 'updatebt', + false, + 'class="sub ok"', + true + ); + $buttons[] = html_print_submit_button( __('Delete'), 'deletebt', false, - 'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"' + 'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"', + true + ); + + html_print_action_buttons( + implode('', $buttons), + ['type' => 'form_action'] ); - echo '
'; echo '
'; echo '

'.__('Status').'

'; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 9bc0040ec1..33a930e086 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1124,6 +1124,10 @@ function config_update_config() $error_update[] = __('Background opacity % (login)'); } + if (config_update_value('meta_background_opacity', (string) get_parameter('meta_background_opacity'), true) === false) { + $error_update[] = __('Background opacity % (login)'); + } + if (config_update_value('meta_custom_logo_white_bg', (string) get_parameter('meta_custom_logo_white_bg'), true) === false) { $error_update[] = __('Custom logo metaconsole (white background)'); } @@ -1236,6 +1240,10 @@ function config_update_config() $error_update[] = __('Random background'); } + if (config_update_value('meta_random_background', get_parameter('meta_random_background'), true) === false) { + $error_update[] = __('Random background'); + } + if (config_update_value('disable_help', get_parameter('disable_help'), true) === false) { $error_update[] = __('Disable help'); } @@ -2518,6 +2526,10 @@ function config_process_config() config_update_value('background_opacity', 30); } + if (!isset($config['meta_background_opacity'])) { + config_update_value('meta_background_opacity', 30); + } + if (!isset($config['meta_custom_docs_url'])) { config_update_value('meta_custom_docs_url', 'https://pandorafms.com/manual/'); } @@ -2535,7 +2547,7 @@ function config_process_config() } if (!isset($config['meta_custom_splash_login'])) { - config_update_value('meta_custom_splash_login', 'splash_image_metaconsola.png'); + config_update_value('meta_custom_splash_login', 'default'); } if (!isset($config['meta_custom_title1_login'])) { @@ -3375,6 +3387,10 @@ function config_process_config() config_update_value('random_background', ''); } + if (!isset($config['meta_random_background'])) { + config_update_value('meta_random_background', ''); + } + if (!isset($config['networkmap_max_width'])) { config_update_value('networkmap_max_width', 900); } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 6128238877..155968e557 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -6735,4 +6735,35 @@ function html_print_menu_button(array $options, bool $return=false) ], $return ); +} + + +function html_print_label_input_block( + ?string $label, + $calbackFn, + ?array $options=[] +):string { + $div_class = ''; + $label_class = ''; + + if (empty($options) === false) { + if (isset($options['div_class']) === true) { + $div_class = $options['div_class']; + } + + if (isset($options['label_class']) === true) { + $label_class = $options['label_class']; + } + } + + $output = '
'; + if ($label !== null) { + $output .= ''; + } + + $output .= $calbackFn; + + $output .= '
'; + + return $output; } \ No newline at end of file diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index aad0eee89f..c353885b36 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -6612,6 +6612,10 @@ function ui_get_docs_logo() // Default logo to open version (enterprise_installed function only works in login status). if (!file_exists(ENTERPRISE_DIR.'/load_enterprise.php') || !isset($config['custom_docs_logo'])) { + if (is_metaconsole() === true) { + return '../../images/icono_docs.png'; + } + return 'images/icono_docs.png'; } @@ -6634,6 +6638,10 @@ function ui_get_support_logo() // Default logo to open version (enterprise_installed function only works in login status). if (!file_exists(ENTERPRISE_DIR.'/load_enterprise.php') || !isset($config['custom_support_logo'])) { + if (is_metaconsole() === true) { + return '../../images/icono_support.png'; + } + return 'images/icono_support.png'; } diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index d8bd2af733..4c97f071f5 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -257,6 +257,7 @@ function initialiceLayout(data) { "

All changes made to this widget will be lost

", cancel: "Cancel", ok: "Ok", + size: 400, onAccept: function() { // Continue execution. var nodo = event.target.offsetParent; diff --git a/pandora_console/include/styles/dashboards.css b/pandora_console/include/styles/dashboards.css index c11e2d2f57..3387797c6c 100644 --- a/pandora_console/include/styles/dashboards.css +++ b/pandora_console/include/styles/dashboards.css @@ -620,6 +620,7 @@ form.modal-dashboard .select2-selection--multiple .select2-selection__choice { margin: 0px; + height: 100% !important; } .container-tabs { diff --git a/pandora_console/include/styles/form.css b/pandora_console/include/styles/form.css index 33de5749de..b1a5fc467c 100644 --- a/pandora_console/include/styles/form.css +++ b/pandora_console/include/styles/form.css @@ -2,6 +2,12 @@ * Discovery css global */ +*, +::after, +::before { + box-sizing: unset !important; +} + ul.bigbuttonlist { min-height: 200px; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 6ead65f350..69bd51d2c4 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -10622,7 +10622,7 @@ tr.bring_next_field { } .select2-container .select2-selection--multiple { - height: 38px !important; + height: 100% !important; padding-left: 0px !important; } @@ -10918,6 +10918,11 @@ pre.external_tools_output { margin: -25px -25px 25px -25px; } +.white_table_graph.fixed_filter_bar { + border-radius: 0; + top: 110px; +} + /* .fixed_filter_bar tr { display: flex; @@ -10938,10 +10943,7 @@ pre.external_tools_output { font-size: 10pt; } -.fixed_filter_bar input, .filter_table input, -.fixed_filter_bar .select2-container .select2-selection--single, -.filter_table .select2-container .select2-selection--single, .table_modal_alternate input, table.table_modal_alternate span.select2 diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 26809aaa38..1abf114934 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -520,3 +520,44 @@ a.pandora_pagination.current:hover { .datatable_form { margin: 0 1em; } + +/* +table.filter-table-adv { + max-width: 1024px; +} +*/ + +table.filter-table-adv td { + vertical-align: top; +} + +table.filter-table-adv td > div { + display: flex; + flex-direction: column; + justify-content: center; + align-items: normal; +} + +table.filter-table-adv td > div label { + color: #161628; + font-size: 13px; + line-height: 16px; + text-align: left; + margin-bottom: 10px; +} + +table.filter-table-adv td > div.add-input-reverse { + flex-direction: row-reverse; + justify-content: flex-end; + align-items: center; + margin-top: 5px; +} + +table.filter-table-adv td > div .label-thin { + color: #3f3f3f; + font-weight: 400; +} + +/* +padding-right: calc(100% - 1024px); +*/ diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index b95c6a6b4a..5a0f6a97d5 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -231,49 +231,117 @@ $searchForm = ''; $searchForm .= '
'; $table = new stdClass(); -$table->style[0] = 'width: 15%'; -$table->style[2] = 'width: 15%'; -$table->class[0] = 'databox filters bolder'; +$table->width = '100%'; +$table->size = []; +$table->size[0] = '33%'; +$table->size[1] = '33%'; +$table->size[2] = '33%'; +$table->class = 'filter-table-adv'; -$table->data['group'][0] = __('Group'); -$table->data['group'][1] = html_print_select_groups(false, $access, true, 'group_id', $group_id, 'this.form.submit()', '', '', true, false, true, '', false); +$table->data['group'][0] = html_print_label_input_block( + __('Group'), + html_print_select_groups( + false, + $access, + true, + 'group_id', + $group_id, + 'this.form.submit()', + '', + '', + true, + false, + true, + '', + false + ) +); -$table->data['group'][2] = __('Recursion'); -$table->data['group'][3] = html_print_checkbox_switch('recursion', 1, $recursion, true); +$table->data['group'][0] .= html_print_label_input_block( + __('Recursion'), + html_print_checkbox_switch( + 'recursion', + 1, + $recursion, + true + ), + [ + 'div_class' => 'add-input-reverse', + 'label_class' => 'label-thin', + ] +); -$table->data['status'][0] = __('Status'); -$table->data['status'][1] = html_print_select($fields, 'status', $status, 'this.form.submit()', __('All'), AGENT_STATUS_ALL, true, false, true, '', false, 'width: 90px;'); +$table->data['group'][1] = html_print_label_input_block( + __('Status'), + html_print_select( + $fields, + 'status', + $status, + 'this.form.submit()', + __('All'), + AGENT_STATUS_ALL, + true, + false, + true, + '', + false, + 'width: 100%' + ) +); -$table->data['search_fields'][0] = __('Search'); -$table->data['search_fields'][1] = html_print_input_text('search', $search, '', 35, 255, true); +$table->data['search_fields'][0] = html_print_label_input_block( + __('Search'), + html_print_input_text( + 'search', + $search, + '', + 35, + 255, + true + ) +); + +$table->data['search_fields'][1] = html_print_label_input_block( + __('Search in custom fields'), + html_print_input_text( + 'search_custom', + $search_custom, + '', + 35, + 255, + true + ) +); -$table->data['search_fields'][2] = __('Search in custom fields'); -$table->data['search_fields'][3] = html_print_input_text('search_custom', $search_custom, '', 35, 255, true); -// $table->colspan['search_fields'][3] = '2'; $searchForm .= html_print_table($table, true); $searchForm .= html_print_div( [ 'class' => 'action-buttons', 'content' => html_print_submit_button( - __('Search'), + __('Filter'), 'srcbutton', false, [ 'icon' => 'search', - 'mode' => 'secondary mini', + 'mode' => 'mini', ], true ), ], true ); - $searchForm .= '
'; ui_toggle( $searchForm, ''.__('Filters').'', - 'filter_form' + 'filter_form', + '', + true, + false, + '', + 'white-box-content', + 'box-flat white_table_graph fixed_filter_bar' ); if (empty($search) === false) { @@ -708,7 +776,6 @@ $tableAgents = new stdClass(); $tableAgents->cellpadding = 0; $tableAgents->cellspacing = 0; $tableAgents->id = 'agent_list'; -$tableAgents->styleTable = 'margin: 0 10px'; $tableAgents->class = 'info_table tactical_table'; $tableAgents->head = []; diff --git a/pandora_console/operation/agentes/interface_view.functions.php b/pandora_console/operation/agentes/interface_view.functions.php index 644b96099f..dc51d5a3b4 100644 --- a/pandora_console/operation/agentes/interface_view.functions.php +++ b/pandora_console/operation/agentes/interface_view.functions.php @@ -172,7 +172,12 @@ function print_filters($sec) $filters, __('Interface filter'), __('Interface filter'), - 'ui_toggle_if_filter' + 'ui_toggle_if_filter', + true, + false, + '', + 'white-box-content', + 'box-flat white_table_graph fixed_filter_bar' ); unset($table); diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 899c5c36ac..8a46b432d1 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -983,7 +983,17 @@ $tableFilter->data[4][2] = html_print_submit_button( $filters = '
'; $filters .= html_print_table($tableFilter, true); $filters .= '
'; -ui_toggle($filters, ''.__('Filters').''); +ui_toggle( + $filters, + ''.__('Filters').'', + 'filter_form', + '', + true, + false, + '', + 'white-box-content', + 'box-flat white_table_graph fixed_filter_bar' +); unset($table); // End Build Search Form. diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index a662da4d99..9f7eedbe6e 100755 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -301,9 +301,9 @@ if (is_metaconsole() === true) { false, true, false, - 'box-flat agent_details_col', + '', 'white-box-content', - 'mrgn_lft_20px mrgn_right_20px width_available' + 'box-flat white_table_graph fixed_filter_bar' ); }