From 69b573e266a03b2ac9d651300aa61c3aad640d59 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 23 Mar 2023 14:43:13 +0100 Subject: [PATCH 01/10] #10441 added version in import files js and css --- pandora_console/include/functions_ui.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 8eebebe339..c8de84f65d 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2032,7 +2032,7 @@ function ui_process_page_head($string, $bitfield) array_push($loaded, $name); $url_css = ui_get_full_url($filename, false, false, false); - $output .= ''."\n\t"; + $output .= ''."\n\t"; } /* @@ -2089,7 +2089,7 @@ function ui_process_page_head($string, $bitfield) array_push($loaded, $name); $url_js = ui_get_full_url($filename, false, false, false); - $output .= ''."\n\t"; + $output .= ''."\n\t"; } /* @@ -2134,7 +2134,7 @@ function ui_process_page_head($string, $bitfield) array_push($loaded, $name); $url_js = ui_get_full_url($filename, false, false, false); - $output .= ''."\n\t"; + $output .= ''."\n\t"; } /* From 62d4fd717b84f9005ecfe7f84dfa9bfd8e23c517 Mon Sep 17 00:00:00 2001 From: Calvo Date: Thu, 23 Mar 2023 19:04:43 +0100 Subject: [PATCH 02/10] Added ssl connect error logging to tentacle --- tentacle/tentacle_server | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tentacle/tentacle_server b/tentacle/tentacle_server index 4458237003..1ba58c3d62 100755 --- a/tentacle/tentacle_server +++ b/tentacle/tentacle_server @@ -899,8 +899,11 @@ sub serve_client() { serve_proxy_connection (); } else { serve_connection (); - } + } }; + if($@) { + print_info($@); + } $t_client_socket->shutdown (2); $t_client_socket->close (); From da742bc15ea903db87c4852fd09279fc244af8ea Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Fri, 24 Mar 2023 09:13:22 +0100 Subject: [PATCH 03/10] #10441 added version file in js --- .../extensions/realtime_graphs.php | 4 +- .../agentes/module_manager_editor_network.php | 2 +- pandora_console/include/chart_generator.php | 48 +++++++++---------- .../agentes/interface_traffic_graph_win.php | 10 ++-- .../operation/agentes/realtime_win.php | 10 ++-- .../operation/agentes/snapshot_view.php | 2 +- .../operation/agentes/stat_win.php | 12 ++--- 7 files changed, 44 insertions(+), 44 deletions(-) diff --git a/pandora_console/extensions/realtime_graphs.php b/pandora_console/extensions/realtime_graphs.php index 133af5b3f8..7f79b1ea2f 100644 --- a/pandora_console/extensions/realtime_graphs.php +++ b/pandora_console/extensions/realtime_graphs.php @@ -280,8 +280,8 @@ function pandora_realtime_graphs() ); html_print_input_hidden('incremental_base', '0'); - echo ''; - echo ''; + echo ''; + echo ''; if ($config['style'] !== 'pandora_black') { echo ''; } diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php index f9c1117377..445c5fe976 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_network.php +++ b/pandora_console/godmode/agentes/module_manager_editor_network.php @@ -33,7 +33,7 @@ $snmp_browser_path = (is_metaconsole() === true) ? '../../' : ''; $snmp_browser_path .= 'include/javascript/pandora_snmp_browser.js'; $array_credential_identifier = CredentialStore::getKeys('CUSTOM'); -echo ""; +echo ''; // Define a custom action to save the OID selected // in the SNMP browser to the form. diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php index 2e9ec50479..ea11402488 100644 --- a/pandora_console/include/chart_generator.php +++ b/pandora_console/include/chart_generator.php @@ -79,9 +79,9 @@ if (check_login(false) === false) { - - - + + +

Access is not granted

@@ -141,27 +141,27 @@ if (file_exists('languages/'.$user_language.'.mo') === true) { - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + ;'> 0) { - - - - - + + + + + - - - - - + + + + + <?php echo __('%s Snapshot data view for module (%s)', get_product_name(), $label); ?> - + - - - - - - + + + + + + Date: Fri, 24 Mar 2023 12:06:40 +0100 Subject: [PATCH 04/10] #10441 added version file in css --- pandora_console/extensions/realtime_graphs.php | 2 +- pandora_console/general/pandora_help.php | 2 +- pandora_console/include/chart_generator.php | 16 ++++++++-------- pandora_console/include/functions_html.php | 8 ++++---- pandora_console/include/functions_ui.php | 6 +++--- .../agentes/interface_traffic_graph_win.php | 8 ++++---- .../operation/agentes/realtime_win.php | 6 +++--- .../operation/agentes/snapshot_view.php | 4 ++-- pandora_console/operation/agentes/stat_win.php | 12 ++++++------ .../operation/events/sound_events.php | 4 ++-- .../visual_console/legacy_public_view.php | 4 ++-- .../operation/visual_console/public_view.php | 2 +- .../update_manager_client/views/offline.php | 8 ++++---- .../update_manager_client/views/online.php | 6 +++--- .../update_manager_client/views/register.php | 5 +++-- 15 files changed, 47 insertions(+), 46 deletions(-) diff --git a/pandora_console/extensions/realtime_graphs.php b/pandora_console/extensions/realtime_graphs.php index 7f79b1ea2f..d0b5ef5e95 100644 --- a/pandora_console/extensions/realtime_graphs.php +++ b/pandora_console/extensions/realtime_graphs.php @@ -283,7 +283,7 @@ function pandora_realtime_graphs() echo ''; echo ''; if ($config['style'] !== 'pandora_black') { - echo ''; + echo ''; } // Store servers timezone offset to be retrieved from js. diff --git a/pandora_console/general/pandora_help.php b/pandora_console/general/pandora_help.php index c78c006a9f..e9dc0e0398 100644 --- a/pandora_console/general/pandora_help.php +++ b/pandora_console/general/pandora_help.php @@ -25,7 +25,7 @@ echo __('%s help system', get_product_name()); -'; ?> +'; ?> Access denied - - - - + + + + @@ -137,10 +137,10 @@ if (file_exists('languages/'.$user_language.'.mo') === true) { Pandora FMS Graph - - - - + + + + diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index c475a44207..672dfa6937 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -515,7 +515,7 @@ function html_print_select_groups( false, false ); - $output .= '" type="text/javascript">'; + $output .= '?v='.$config['current_package'].'" type="text/javascript">'; $output .= ''; + $output .= '?v='.$config['current_package'].'"/>'; } else { ui_require_css_file($select2_css); ui_require_javascript_file('select2.min'); @@ -977,7 +977,7 @@ function html_print_select( false, false ); - $output .= '" type="text/javascript">'; + $output .= '?v='.$config['current_package'].'" type="text/javascript">'; $output .= ''; + $output .= '?v='.$config['current_package'].'"/>'; } else { ui_require_css_file($select2); ui_require_javascript_file('select2.min'); diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index c8de84f65d..5de808d094 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4102,7 +4102,7 @@ function ui_print_datatable(array $parameters) false, false ); - $output .= '"/>'; + $output .= '?v='.$config['current_package'].'"/>'; // Load tables.css. $output .= ''; + $output .= '?v='.$config['current_package'].'"/>'; if (is_metaconsole() === true) { // Load meta_tables.css. $output .= ''; + $output .= '?v='.$config['current_package'].'"/>'; } // Load datatables.js. diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index be2b1a5236..afac72db09 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -67,7 +67,7 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) { $l10n->load_tables(); } -echo ''; +echo ''; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { ui_require_css_file('pandora_black', 'include/styles/', true); } @@ -93,9 +93,9 @@ if ($refresh > 0) { ?> <?php echo __('%s Interface Graph', get_product_name()).' ('.agents_get_alias($agent_id).' - '.$interface_name; ?>) - - - + + + diff --git a/pandora_console/operation/agentes/realtime_win.php b/pandora_console/operation/agentes/realtime_win.php index 1295c06079..de04abf4ee 100644 --- a/pandora_console/operation/agentes/realtime_win.php +++ b/pandora_console/operation/agentes/realtime_win.php @@ -68,7 +68,7 @@ if ($config['style'] === 'pandora_black' && !is_metaconsole()) { ui_require_css_file('pandora_black', 'include/styles/', true); } -echo ''; +echo ''; ?> @@ -83,8 +83,8 @@ echo ' <?php echo __('%s Realtime Module Graph', get_product_name()); ?> - - + + diff --git a/pandora_console/operation/agentes/snapshot_view.php b/pandora_console/operation/agentes/snapshot_view.php index 1de1582b8f..23d7f10a26 100644 --- a/pandora_console/operation/agentes/snapshot_view.php +++ b/pandora_console/operation/agentes/snapshot_view.php @@ -80,9 +80,9 @@ if (!check_acl_one_of_groups($config['id_user'], $all_groups, 'AR')) { $query = ui_get_url_refresh(false); echo ''; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { - echo ''; + echo ''; } else { - echo ''; + echo ''; } } ?> diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index d8822235ae..07dd78a297 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -65,10 +65,10 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) { } global $config; -echo ''; +echo ''; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { - echo ''; + echo ''; } @@ -114,10 +114,10 @@ ui_print_message_dialog( ?> <?php echo __('%s Graph', get_product_name()).' ('.$alias.' - '.$label; ?>) - - - - + + + + diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php index 956282b045..f2a8c62432 100644 --- a/pandora_console/operation/events/sound_events.php +++ b/pandora_console/operation/events/sound_events.php @@ -154,9 +154,9 @@ ui_require_css_file('discovery'); '; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { - echo ''; + echo ''; } else { - echo ''; + echo ''; } echo ''; diff --git a/pandora_console/operation/visual_console/legacy_public_view.php b/pandora_console/operation/visual_console/legacy_public_view.php index e8edbae7db..d5321b7a1b 100644 --- a/pandora_console/operation/visual_console/legacy_public_view.php +++ b/pandora_console/operation/visual_console/legacy_public_view.php @@ -45,12 +45,12 @@ ob_start('ui_process_page_head'); enterprise_include('index.php'); $url_css = ui_get_full_url('include/styles/visual_maps.css', false, false, false); -echo ''; +echo ''; html_print_input_hidden('homeurl', $config['homeurl']); $url_css_modal = ui_get_full_url('include/styles/register.css', false, false, false); -echo ''; +echo ''; // Connection lost alert. ui_require_javascript_file('connection_check', 'include/javascript/', true); set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false)); diff --git a/pandora_console/operation/visual_console/public_view.php b/pandora_console/operation/visual_console/public_view.php index 496a34f3a6..605395316b 100644 --- a/pandora_console/operation/visual_console/public_view.php +++ b/pandora_console/operation/visual_console/public_view.php @@ -56,7 +56,7 @@ ob_start('ui_process_page_head'); enterprise_include('index.php'); $url_css = ui_get_full_url('include/styles/visual_maps.css', false, false, false); -echo ''; +echo ''; require_once 'include/functions_visual_map.php'; diff --git a/pandora_console/update_manager_client/views/offline.php b/pandora_console/update_manager_client/views/offline.php index ae64d92fde..5d8027725c 100644 --- a/pandora_console/update_manager_client/views/offline.php +++ b/pandora_console/update_manager_client/views/offline.php @@ -27,7 +27,7 @@ * GNU General Public License for more details. * ============================================================================ */ - +global $config; ?> @@ -39,12 +39,12 @@ document.write(' - - + + - +
diff --git a/pandora_console/update_manager_client/views/online.php b/pandora_console/update_manager_client/views/online.php index d588fa8e6e..f60b0f5e52 100644 --- a/pandora_console/update_manager_client/views/online.php +++ b/pandora_console/update_manager_client/views/online.php @@ -27,11 +27,11 @@ * GNU General Public License for more details. * ============================================================================ */ - +global $config; ?> - - + + diff --git a/pandora_console/update_manager_client/views/register.php b/pandora_console/update_manager_client/views/register.php index 4fffc0f88f..d93d25045a 100644 --- a/pandora_console/update_manager_client/views/register.php +++ b/pandora_console/update_manager_client/views/register.php @@ -28,6 +28,7 @@ * ============================================================================ */ +global $config; $product_name = get_product_name(); ?> @@ -39,8 +40,8 @@ $product_name = get_product_name(); ?> } - - + +
'; +echo ''; echo ' - '; + '; // Chartjs. $output .= ''; From 426690bc359885494f4ccc63b08a7e9bd0c0b5d2 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Fri, 31 Mar 2023 10:44:51 +0200 Subject: [PATCH 07/10] 10843 & 10844 --- .../reporting/graph_builder.graph_editor.php | 253 ++++++++++-------- pandora_console/include/functions_html.php | 72 ++--- pandora_console/include/functions_ui.php | 50 ++-- pandora_console/include/styles/pandora.css | 12 + .../operation/agentes/alerts_status.php | 8 +- 5 files changed, 220 insertions(+), 175 deletions(-) diff --git a/pandora_console/godmode/reporting/graph_builder.graph_editor.php b/pandora_console/godmode/reporting/graph_builder.graph_editor.php index aed04e3089..d6e5b3d75b 100644 --- a/pandora_console/godmode/reporting/graph_builder.graph_editor.php +++ b/pandora_console/godmode/reporting/graph_builder.graph_editor.php @@ -204,9 +204,142 @@ if ($count_module_array > $config['items_combined_charts']) { ); } +$table = new stdClass(); +$table->width = '100%'; +$table->colspan[0][0] = 3; +$table->size = []; + +if (defined('METACONSOLE')) { + $table->class = 'databox data'; + $table->head[0] = __('Sort items'); + $table->head_colspan[0] = 4; + $table->headstyle[0] = 'text-align: center'; + $table->size[0] = '25%'; + $table->size[1] = '25%'; + $table->size[2] = '25%'; + $table->size[3] = '25%'; +} else { + $table->class = 'filter-table-adv'; + $table->size[0] = '50%'; + $table->size[1] = '50%'; +} + +$table->data[0][0] = html_print_label_input_block( + __('Sort selected items'), + html_print_select_style( + [ + 'before' => __('before to'), + 'after' => __('after to'), + ], + 'move_to', + '', + '', + '', + '', + 0, + true + ) +); +$table->data[0][1] = html_print_label_input_block( + __('Position'), + html_print_input_text_extended( + 'position_to_sort', + 1, + 'text-position_to_sort', + '', + 3, + 10, + false, + "only_numbers('position_to_sort');", + '', + true + ).html_print_input_hidden('ids_items_to_sort', '', true) +); + + +$SortItems = "
"; +$SortItems .= html_print_table($table, true); +$SortItems .= html_print_input_hidden('action', 'sort_items', true); +$SortItems .= html_print_div( + [ + 'class' => 'action-buttons', + 'content' => html_print_submit_button( + __('Sort'), + 'srcbutton', + false, + [ + 'class' => 'mini', + 'icon' => 'search', + 'mode' => 'secondary', + ], + true + ), + ], + true +); +$SortItems .= '
'; + +ui_toggle( + $SortItems, + ''.__('Sort items').'', + '', + '', + false, + false, + '', + 'white-box-content no_border', + 'filter-datatable-main box-flat white_table_graph max_floating_element_size' +); + + +// Configuration form. +echo ''; +echo "
"; + +echo ""; +echo ''; +echo ''; +echo ''; +echo "'; +echo ''; +echo ""; +echo '
'.html_print_input( + [ + 'type' => 'select_multiple_modules_filtered', + 'uniqId' => 'modules', + 'class' => 'flex flex-row', + 'searchBar' => true, + ] +).'
"; +echo ""; +echo ''; +echo '
'; +echo html_print_label_input_block( + __('Weight'), + '' +); +echo '
'; +echo '
'; +$ActionButtons[] = html_print_submit_button( + __('Add'), + 'submit-add', + false, + [ + 'class' => 'sub ok', + 'icon' => 'next', + ], + true +); +html_print_action_buttons( + implode('', $ActionButtons), + ['type' => 'form_action'] +); + +echo '
'; + // Modules table. if ($count_module_array > 0) { - echo ""; + echo "
"; echo ' @@ -290,124 +423,6 @@ if ($count_module_array > 0) { echo '
'.__('P.').' '.__('Agent').'
'; } - -$table = new stdClass(); -$table->width = '100%'; -$table->colspan[0][0] = 3; -$table->size = []; - -if (defined('METACONSOLE')) { - $table->class = 'databox data'; - $table->head[0] = __('Sort items'); - $table->head_colspan[0] = 4; - $table->headstyle[0] = 'text-align: center'; - $table->size[0] = '25%'; - $table->size[1] = '25%'; - $table->size[2] = '25%'; - $table->size[3] = '25%'; -} else { - $table->class = 'filter-table-adv'; - $table->size[0] = '50%'; - $table->size[1] = '50%'; -} - -$table->data[0][0] = html_print_label_input_block( - __('Sort selected items'), - html_print_select_style( - [ - 'before' => __('before to'), - 'after' => __('after to'), - ], - 'move_to', - '', - '', - '', - '', - 0, - true - ) -); -$table->data[0][1] = html_print_label_input_block( - __('Position'), - html_print_input_text_extended( - 'position_to_sort', - 1, - 'text-position_to_sort', - '', - 3, - 10, - false, - "only_numbers('position_to_sort');", - '', - true - ).html_print_input_hidden('ids_items_to_sort', '', true) -); - - -$SortItems = "
"; -$SortItems .= html_print_table($table, true); -$SortItems .= html_print_input_hidden('action', 'sort_items', true); -$SortItems .= html_print_div( - [ - 'class' => 'action-buttons', - 'content' => html_print_submit_button( - __('Sort'), - 'srcbutton', - false, - [ - 'class' => 'mini', - 'icon' => 'search', - 'mode' => 'secondary', - ], - true - ), - ], - true -); -$SortItems .= '
'; - -ui_toggle($SortItems, __('Sort items'), '', '', false); - - -// Configuration form. -echo ''; -echo "
"; - -echo ""; -echo ''; -echo ''; -echo ''; -echo "'; -echo ''; -echo ""; -echo '
'.html_print_input( - [ - 'type' => 'select_multiple_modules_filtered', - 'uniqId' => 'modules', - 'class' => 'flex flex-row', - 'searchBar' => true, - ] -).'
"; -echo ""; -echo ''; -echo ""; -echo '
'.__('Weight').'
'; -echo '
'; -$ActionButtons[] = html_print_submit_button( - __('Add'), - 'submit-add', - false, - [ - 'class' => 'sub ok', - 'icon' => 'next', - ], - true -); -html_print_action_buttons( - implode('', $ActionButtons), - ['type' => 'form_action'] -); - ui_require_jquery_file('pandora.controls'); ui_require_jquery_file('ajaxqueue'); ui_require_jquery_file('bgiframe'); diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index a1b12f1ff3..46132168aa 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1559,6 +1559,7 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ 'label' => __('Group'), + 'label_class' => 'font-title-font', 'name' => 'filtered-module-group-'.$uniqId, 'returnAllGroup' => $return_all_group, 'privilege' => 'AR', @@ -1572,14 +1573,15 @@ function html_print_select_multiple_modules_filtered(array $data):string // Recursion. $output .= html_print_input( [ - 'label' => __('Recursion'), - 'type' => 'switch', - 'name' => 'filtered-module-recursion-'.$uniqId, - 'value' => (empty($data['mRecursion']) === true) ? false : true, - 'checked' => (empty($data['mRecursion']) === true) ? false : true, - 'return' => true, - 'id' => 'filtered-module-recursion-'.$uniqId, - 'onchange' => 'fmAgentChange(\''.$uniqId.'\')', + 'label' => __('Recursion'), + 'label_class' => 'font-title-font', + 'type' => 'switch', + 'name' => 'filtered-module-recursion-'.$uniqId, + 'value' => (empty($data['mRecursion']) === true) ? false : true, + 'checked' => (empty($data['mRecursion']) === true) ? false : true, + 'return' => true, + 'id' => 'filtered-module-recursion-'.$uniqId, + 'onchange' => 'fmAgentChange(\''.$uniqId.'\')', ] ); @@ -1598,6 +1600,7 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ 'label' => __('Module group'), + 'label_class' => 'font-title-font', 'type' => 'select', 'fields' => $module_groups, 'name' => 'filtered-module-module-group-'.$uniqId, @@ -1682,15 +1685,16 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ - 'label' => __('Agents'), - 'type' => 'select', - 'fields' => $agents, - 'name' => 'filtered-module-agents-'.$uniqId, - 'selected' => explode(',', $data['mAgents']), - 'return' => true, - 'multiple' => true, - 'style' => 'min-width: 200px;max-width:200px;', - 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'label' => __('Agents'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $agents, + 'name' => 'filtered-module-agents-'.$uniqId, + 'selected' => explode(',', $data['mAgents']), + 'return' => true, + 'multiple' => true, + 'style' => 'min-width: 200px;max-width:200px;', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', ] ); @@ -1701,14 +1705,15 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ - 'label' => __('Only common modules'), - 'type' => 'switch', - 'checked' => $commonModules, - 'value' => $commonModules, - 'name' => 'filtered-module-show-common-modules-'.$uniqId, - 'id' => 'filtered-module-show-common-modules-'.$uniqId, - 'return' => true, - 'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'label' => __('Only common modules'), + 'label_class' => 'font-title-font', + 'type' => 'switch', + 'checked' => $commonModules, + 'value' => $commonModules, + 'name' => 'filtered-module-show-common-modules-'.$uniqId, + 'id' => 'filtered-module-show-common-modules-'.$uniqId, + 'return' => true, + 'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', ] ); @@ -1742,14 +1747,15 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ - 'label' => __('Modules'), - 'type' => 'select', - 'fields' => $all_modules, - 'name' => 'filtered-module-modules-'.$uniqId, - 'selected' => $result, - 'return' => true, - 'multiple' => true, - 'style' => 'min-width: 200px;max-width:200px;', + 'label' => __('Modules'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $all_modules, + 'name' => 'filtered-module-modules-'.$uniqId, + 'selected' => $result, + 'return' => true, + 'multiple' => true, + 'style' => 'min-width: 200px;max-width:200px;', ] ); diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 42ad5f4e36..e6cdd3f3ab 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1287,38 +1287,44 @@ function ui_format_alert_row( $additionUrl = ''; } - $forceExecButtons[] = html_print_button( - $forceTitle, - 'force_execution_'.$alert['id'], - false, - 'window.location.assign("'.$url.'&id_alert='.$alert['id'].'&refr=60'.$additionUrl.'");', - [ 'mode' => 'link' ], + $forceExecButtons[] = html_print_anchor( + [ + 'href' => $url.'&id_alert='.$alert['id'].'&refr=60'.$additionUrl, + 'content' => html_print_image( + 'images/force@svg.svg', + true, + [ + 'title' => $forceTitle, + 'class' => 'main_menu_icon invert_filter', + ] + ), + ], true ); } - $forceExecButtons[] = html_print_button( - __('View'), - 'view_template_'.$alert['id'], - false, - '', + $forceExecButtons[] = html_print_anchor( [ - 'mode' => 'link', - 'class' => 'template_details', - 'href' => 'ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$template['id'], + 'href' => 'ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$template['id'], + 'class' => 'template_details', + 'content' => html_print_image( + 'images/details.svg', + true, + ['class' => 'main_menu_icon invert_filter'] + ), ], true ); } else { - $forceExecButtons[] = html_print_button( - __('View'), - 'view_template_'.$alert['id'], - false, - '', + $forceExecButtons[] = html_print_anchor( [ - 'mode' => 'link', - 'class' => 'template_details', - 'href' => ui_get_full_url('/', false, false, false).'/ajax.php?page=enterprise/meta/include/ajax/tree_view.ajax&action=get_template_tooltip&id_template='.$template['id'].'&server_name='.$alert['server_data']['server_name'], + 'href' => ui_get_full_url('/', false, false, false).'/ajax.php?page=enterprise/meta/include/ajax/tree_view.ajax&action=get_template_tooltip&id_template='.$template['id'].'&server_name='.$alert['server_data']['server_name'], + 'class' => 'template_details', + 'content' => html_print_image( + 'images/details.svg', + true, + ['class' => 'main_menu_icon invert_filter'] + ), ], true ); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 508daaca8a..af33fc2a9a 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -931,6 +931,10 @@ select:-internal-list-box { justify-content: flex-start; } +.flex-align-start { + align-items: start; +} + .flex-baseline { align-self: baseline; } @@ -7404,6 +7408,10 @@ div.graph div.legend table { /* * PADDING RIGHT */ +.pdd_r_0px { + padding-right: 0px !important; +} + .pdd_r_2px { padding-right: 2px; } @@ -7475,6 +7483,10 @@ div.graph div.legend table { /* * PADDING LEFT */ +.pdd_l_0px { + padding-left: 0px !important; +} + .pdd_l_4px { padding-left: 4px; } diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index f0ae9b033d..4139d30342 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -233,6 +233,7 @@ if ((bool) check_acl($config['id_user'], $id_group, 'LW') === true || (bool) che [ 'title' => __('Operations'), 'text' => __('Operations'), + 'class' => 'left pdd_l_0px pdd_r_0px w100p', ], ); @@ -317,6 +318,7 @@ if (is_metaconsole() === true) { $no_sortable_columns = [ 0, 1, + 2, 5, ]; } else { @@ -514,10 +516,14 @@ function alerts_table_controls() { attribute: 'href', cluetipClass: 'default' }).click (function () { - console.log('click aqui'); return false; }); + $("a.template_details").cluetip ({ + arrows: true, + attribute: 'href', + cluetipClass: 'default' + }); $('[id^=checkbox-all_validate]').change(function(){ if ($("#checkbox-all_validate").prop("checked")) { From e0a83e5340ca35d3aa7a8fc5d7a9dc8046aaeb8e Mon Sep 17 00:00:00 2001 From: slerena Date: Fri, 31 Mar 2023 09:23:13 +0000 Subject: [PATCH 08/10] Updated default colors (again). This is the final one I hope. --- pandora_console/pandoradb_data.sql | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 03ac46b18c..ed6f12fe99 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -51,16 +51,16 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('show_lastalerts','1'), ('style','pandora'), ('graph_image_height', '250'), -('graph_color1', '#1c7973'), -('graph_color2', '#82b92f'), -('graph_color3', '#e82a2a'), -('graph_color4', '#8577cf'), -('graph_color5', '#f5a623'), -('graph_color6', '#14524f'), -('graph_color7', '#024eff'), -('graph_color8', '#18c7c5'), -('graph_color9', '#ec7175'), -('graph_color10', '#c0ccdc'), +('graph_color1', '#1d7773'), +('graph_color2', '#82b92d'), +('graph_color3', '#fa4143'), +('graph_color4', '#c0d7ea'), +('graph_color5', '#f3712a'), +('graph_color6', '#7151cb'), +('graph_color7', '#287ca2'), +('graph_color8', '#42aa8b'), +('graph_color9', '#d54f6b'), +('graph_color10', '#f9c64e'), ('trap2agent', '0'), ('date_format', 'F j, Y, g:i a'), ('event_view_hr', 8), From addd686ada875debb9199b07730a713b966b6940 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Fri, 31 Mar 2023 12:24:37 +0200 Subject: [PATCH 09/10] 10834 --- pandora_console/include/styles/form.css | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pandora_console/include/styles/form.css b/pandora_console/include/styles/form.css index 972b8de4ef..c5da46c1a1 100644 --- a/pandora_console/include/styles/form.css +++ b/pandora_console/include/styles/form.css @@ -340,3 +340,28 @@ div.ui-tooltip.ui-corner-all.ui-widget-shadow.ui-widget.ui-widget-content.uitool top: auto; } /* END Tooltip message errors*/ + +form.modal { + position: initial !important; + display: initial !important; +} + +form#modal_form_feedback > ul > li { + visibility: initial !important; + + display: initial !important; + flex-direction: initial !important; + width: initial !important; + margin: initial !important; + justify-items: initial !important; + align-items: initial !important; + flex-wrap: initial !important; +} + +form#modal_form_feedback > ul > li > textarea { + width: 575px !important; +} + +form#modal_form_feedback > ul > li:not(:first-child) > label { + margin-top: 20px !important; +} From be9be17398a72a86042b860504a97f547a6ae9a5 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Fri, 31 Mar 2023 13:24:20 +0200 Subject: [PATCH 10/10] 10748 --- pandora_console/extensions/agents_modules.php | 11 +++++------ pandora_console/images/alerts.svg | 9 +++++++++ pandora_console/include/styles/pandora.css | 6 +++--- 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 pandora_console/images/alerts.svg diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index e540a163a1..4c590f0928 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -261,12 +261,11 @@ function agents_modules_load_js() } function select_selected () { - $('#id_agents2 option').each(function(){ - if($(this).attr('selected') === 'selected'){ - $(this).prop('selected', true); - } - }); - + // $('#id_agents2 option').each(function(){ + // if($(this).attr('selected') === 'selected'){ + // $(this).prop('selected', true); + // } + // }); } + + + Dark / 20 / Menu Alerts@svg + Created with Sketch. + + + + \ No newline at end of file diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index af33fc2a9a..ac4458fe6a 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -11804,9 +11804,9 @@ span.help_icon_15px > img { /* ==== Spinner ==== */ .spinner-fixed { - position: fixed; - left: 50%; - bottom: 50%; + position: absolute; + left: 40%; + top: 40%; z-index: 1; width: 100px; height: 100px;