From 19ddbdc30adf76b1cfeb559084ef9da9f86fc788 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 28 Mar 2023 08:34:05 +0200 Subject: [PATCH 01/10] fixed styles --- pandora_console/godmode/users/user_list.php | 14 -------------- pandora_console/views/dashboard/header.php | 5 +++-- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php index a9f28ef4c6..99c121c180 100644 --- a/pandora_console/godmode/users/user_list.php +++ b/pandora_console/godmode/users/user_list.php @@ -1045,20 +1045,6 @@ if ($is_management_allowed === true) { } else { echo ''.__("The current authentication scheme doesn't support creating users on %s", get_product_name()).''; } -} else { - html_print_action_buttons( - html_print_submit_button( - __('Create user'), - 'none', - true, - [ 'icon' => 'wand' ], - true - ), - [ - 'type' => 'form_action', - 'right_content' => $tablePagination, - ], - ); } ?> diff --git a/pandora_console/views/dashboard/header.php b/pandora_console/views/dashboard/header.php index b8e4cadb17..93fa76bc29 100644 --- a/pandora_console/views/dashboard/header.php +++ b/pandora_console/views/dashboard/header.php @@ -216,11 +216,12 @@ $enable_disable['text'] = html_print_div( // New Widget. $newWidget['text'] = ''; From 4e01838238961038dd7ccae7e2a3b1d6934ca637 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 28 Mar 2023 08:43:46 +0200 Subject: [PATCH 02/10] fixed styles --- pandora_console/include/javascript/tree/TreeController.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index 5282cf58e4..e44aa67bc8 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -657,8 +657,7 @@ var TreeController = { $content.append( '
Date: Tue, 28 Mar 2023 08:45:40 +0200 Subject: [PATCH 03/10] fixed styles --- pandora_console/include/javascript/tree/TreeController.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index e44aa67bc8..368ebd69a9 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -652,8 +652,6 @@ var TreeController = { typeof element.icon != "undefined" && element.icon.length > 0 ) { - console.log("a"); - console.log(controller); $content.append( '
Date: Tue, 28 Mar 2023 09:17:47 +0200 Subject: [PATCH 04/10] Module manager editor relations visual change --- .../agentes/module_manager_editor_common.php | 102 +++++++++++------- pandora_console/include/styles/pandora.css | 5 + 2 files changed, 69 insertions(+), 38 deletions(-) diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index b30f3d4c2c..1236b8d7e9 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -1454,74 +1454,96 @@ html_print_input_hidden('module_macro_count', $macro_count); $table_new_relations = new stdClass(); $table_new_relations->id = 'module_new_relations'; $table_new_relations->width = '100%'; -$table_new_relations->class = 'no-class'; +$table_new_relations->class = 'filter-table-adv'; $table_new_relations->data = []; $table_new_relations->style = []; -$table_new_relations->style[0] = 'width: 10%; font-weight: bold;'; -$table_new_relations->style[1] = 'width: 25%; text-align: center;'; -$table_new_relations->style[2] = 'width: 10%; font-weight: bold;'; -$table_new_relations->style[3] = 'width: 25%; text-align: center;'; -$table_new_relations->style[4] = 'width: 10%; font-weight: bold;'; -$table_new_relations->style[5] = 'width: 25%; text-align: center;'; +$table_new_relations->size[0] = '33%'; +$table_new_relations->size[1] = '33%'; +$table_new_relations->size[2] = '33%'; -$table_new_relations->data[0][0] = __('Agent'); $params = []; $params['return'] = true; $params['show_helptip'] = true; $params['input_name'] = 'autocomplete_agent_name'; +$params['helptip_text'] = ''; $params['use_hidden_input_idagent'] = true; $params['print_hidden_input_idagent'] = true; $params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent'; $params['javascript_function_action_after_select_js_call'] = 'change_modules_autocomplete_input();'; -$table_new_relations->data[0][1] = ui_print_agent_autocomplete_input($params); -$table_new_relations->data[0][2] = __('Module'); -$table_new_relations->data[0][3] = "
"; + +$table_new_relations->data[0][0] = html_print_label_input_block( + __('Agent'), + ui_print_agent_autocomplete_input($params) +); + + +$table_new_relations->data[0][1] = html_print_label_input_block( + __('Module'), + '
'.html_print_input_text('', '', '', false, 255, true, true, false, '', 'w100p').'
' +); $array_rel_type = []; $array_rel_type['direct'] = __('Direct'); $array_rel_type['failover'] = __('Failover'); -$table_new_relations->data[0][4] = __('Rel. type'); -$table_new_relations->data[0][5] = html_print_select( - $array_rel_type, - 'relation_type', - '', - '', - '', - 0, - true, - false, - true, - '' +$table_new_relations->data[0][2] = html_print_label_input_block( + __('Rel. type'), + html_print_select( + $array_rel_type, + 'relation_type', + '', + '', + '', + 0, + true, + false, + true, + 'w100p', + false, + 'width:100%' + ) ); -$table_new_relations->data[0][6] = html_print_button( - __('Add relationship'), +$table_new_relations->cellstyle[1][0] = 'width:100% !important;'; +$table_new_relations->cellclass[1][0] = 'flex flex-end'; +$table_new_relations->data[1][0] = "
".html_print_button( + __('Add relationship')."
", 'add_relation', false, - 'javascript: add_new_relation();', - 'class="sub add"', + 'add_new_relation();', + [ + 'class' => 'mini', + 'icon' => 'next', + 'mode' => 'secondary', + 'style' => 'margin-top: 10px', + ], true ); -$table_new_relations->data[0][6] .= "  
"; // Relationship list. $table_relations = new stdClass(); $table_relations->id = 'module_relations'; $table_relations->width = '100%'; -$table_relations->class = 'databox data'; +$table_relations->class = 'info_table'; +$table_relations->styleTable = 'border: none'; $table_relations->head = []; $table_relations->data = []; -$table_relations->rowstyle = []; $table_relations->rowstyle[-1] = 'display: none;'; -$table_relations->style = []; -$table_relations->style[3] = 'width: 10%; text-align: center;'; -$table_relations->style[4] = 'width: 10%; text-align: center;'; $table_relations->head[0] = __('Agent'); $table_relations->head[1] = __('Module'); $table_relations->head[2] = __('Type'); $table_relations->head[3] = __('Changes'); $table_relations->head[4] = __('Delete'); +$table_relations->headclass[0] = 'w20p'; +$table_relations->headclass[1] = 'w20p'; +$table_relations->headclass[2] = 'w20p'; +$table_relations->headclass[3] = 'w20p'; +$table_relations->headclass[4] = 'w20p'; +$table_relations->style[0] = 'width:20%'; +$table_relations->style[1] = 'width:20%'; +$table_relations->style[2] = 'width:20%'; +$table_relations->style[3] = 'width:20%'; +$table_relations->style[4] = 'width:20%'; // Create an invisible row to use their html to add new rows. $table_relations->data[-1][0] = ''; @@ -1553,6 +1575,9 @@ if ($id_agent_module) { $relations_count = 0; foreach ($module_relations as $key => $module_relation) { + // Styles. + $table_relations->cellclass[$relations_count][4] = 'table_action_buttons'; + if ($module_relation['module_a'] == $id_agent_module) { $module_id = $module_relation['module_b']; $agent_id = modules_give_agent_id_from_module_id( @@ -2035,6 +2060,7 @@ function change_modules_autocomplete_input () { else { module_autocomplete.html(error_icon); } + $('#text-autocomplete_module_name').addClass('w90p'); }, error: function (data) { module_autocomplete.removeClass('working'); @@ -2097,15 +2123,15 @@ function add_new_relation () { } var rowHTML = '' + - '' + agent_b_name + '' + - '' + module_b_name + '' + - '' + relation_type + '' + - '' + + '' + agent_b_name + '' + + '' + module_b_name + '' + + '' + relation_type + '' + + '' + '' + ' 'main_menu_icon invert_filter']); ?>' + '' + '' + - '' + + '' + '' + ' 'main_menu_icon invert_filter']); ?>' + '' + diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 25db813267..a407fce22d 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -11767,3 +11767,8 @@ div.relative > div > div#ui-datepicker-div { .container-div-input-password:has(.w400px-important) { width: 400px; } + +#module_relations > thead > tr { + border: none !important; + border-bottom: 1px solid #e2e2e2 !important; +} From 53194f7c3dbae2aacbbfd4f0724d6a98e30f5401 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 28 Mar 2023 11:04:52 +0200 Subject: [PATCH 05/10] Reports visual changes --- pandora_console/godmode/reporting/graph_container.php | 4 ++-- pandora_console/godmode/reporting/reporting_builder.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/reporting/graph_container.php b/pandora_console/godmode/reporting/graph_container.php index 370285d7bf..0ec7c6b242 100644 --- a/pandora_console/godmode/reporting/graph_container.php +++ b/pandora_console/godmode/reporting/graph_container.php @@ -71,11 +71,11 @@ $max_graph = $config['max_graph_container']; $buttons['graph_list'] = [ 'active' => false, 'text' => ''.html_print_image( - 'images/list.png', + 'images/logs@svg.svg', true, [ 'title' => __('Graph list'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ).'', ]; diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 3494ff8f78..68ff0baf8e 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -3557,7 +3557,7 @@ switch ($action) { $buttons = [ 'list_reports' => [ 'active' => false, - 'text' => ''.html_print_image('images/report_list.png', true, ['title' => __('Reports list'), 'class' => 'invert_filter']).'', + 'text' => ''.html_print_image('images/logs@svg.svg', true, ['title' => __('Reports list'), 'class' => 'invert_filter main_menu_icon']).'', ], ]; From 7a3e894bb097f3c071935fa9061bfc4edc05ec25 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 28 Mar 2023 11:06:03 +0200 Subject: [PATCH 06/10] Menu fix follow reports --- pandora_console/include/functions_menu.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 2a52aed31b..3bf0799599 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -81,6 +81,12 @@ function menu_print_menu(&$menu) $sec2 = 'godmode/setup/setup§ion=gis'; } else if ($sec2 === 'enterprise/godmode/agentes/agent_autoconfiguration.definition') { $sec2 = 'enterprise/godmode/agentes/agent_autoconfiguration'; + } else if ($sec2 === 'enterprise/godmode/reporting/graph_template_list') { + $sec2 = 'godmode/reporting/graphs'; + } else if ($sec2 === 'enterprise/godmode/reporting/graph_template_wizard') { + $sec2 = 'godmode/reporting/graphs'; + } else if ($sec2 === 'godmode/reporting/graph_container') { + $sec2 = 'godmode/reporting/graphs'; } else if ($sec2 === 'operation/gis_maps/render_view') { $map_id = (int) get_parameter('map_id'); if (empty($map_id) === false) { From 59699280032bf1d3890b0c4cfe08717053346e27 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Tue, 28 Mar 2023 12:39:02 +0200 Subject: [PATCH 07/10] 10408-Fix action column & 10398-Events pure mode --- pandora_console/include/ajax/events.php | 4 ++- pandora_console/include/styles/events.css | 33 +++++++++++++++---- .../operation/agentes/alerts_status.php | 10 +++--- pandora_console/operation/events/events.php | 24 +++++++++----- 4 files changed, 50 insertions(+), 21 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 45ee2efd9c..e4e9dc9937 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -729,7 +729,9 @@ function load_form_filter() { $("#current_filter").text($('#filter_id option:selected').text()); // Search. - dt_events.draw(false); + $("#table_events") + .DataTable() + .draw(false); } $(document).ready (function() { diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index 7635280e29..c3f91a1588 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -54,11 +54,6 @@ form.flex-row div.filter_input.large { max-width: 100%; } -div.filter_input > label, -div.filter_input_little > label { - width: 10em; -} - form.flex-row > ul, form.flex-row > ul > li, form.flex-row > .box-shadow.white_table_graph { @@ -504,7 +499,7 @@ div.multi-response-buttons { } .events-refr { - width: 350px; + width: 300px; display: flex; align-items: center; flex-direction: row-reverse; @@ -529,3 +524,29 @@ td#save_filter_form-0-1 > input[type="radio"] { .module-search > input[type="text"] { margin-bottom: 6px; } + +div.agent-min-w100p > span { + width: 400px; +} + +.events-pure { + display: block; + position: initial; + border-radius: 0px; +} + +.events-pure > .white_table_graph_header { + height: 45px; +} + +div.menu_tab_pure { + margin-top: 0px !important; +} + +div#main_pure:has(.events-pure) { + width: 99%; +} + +.margn-b-50px { + margin-bottom: 50px !important; +} diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index ec9e330d18..fda858cbc6 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -276,8 +276,8 @@ if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) che ['text' => 'Module'], ['text' => 'Template'], [ - 'title' => __('Actions'), - 'text' => __('Actions'), + 'title' => __('Action'), + 'text' => __('Action'), 'style' => 'min-width: 15%;', ], ['text' => 'Last fired'], @@ -288,7 +288,7 @@ if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) che $columns, ['agent_module_name'], ['template_name'], - ['actions'], + ['action'], ['last_fired'], ['status'] ); @@ -326,14 +326,14 @@ if (is_metaconsole() === true) { 1, 2, 3, - 7, + -1, ]; } else { $no_sortable_columns = [ 0, 1, 2, - 6, + -1, ]; } } diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 3ec49048d2..12b3471241 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -1376,7 +1376,7 @@ if ($pure) { // Floating menu - Start. echo '
'; - echo '