From 4436d96717d2a8a1b26fd31f96487f6f40f4beaa Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 7 Aug 2019 12:09:34 +0200 Subject: [PATCH 01/10] Fixed scroll in other ip addres in agent view - #4463 --- pandora_console/operation/agentes/estado_generalagente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 24aa44e098..3a17e5e49f 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -432,7 +432,7 @@ if (!empty($addresses)) { // $data_opcional = []; $data_opcional[] = ''.__('Other IP addresses').''; if (!empty($addresses)) { - $data_opcional[] = '
'.implode('
', $addresses).'
'; + $data_opcional[] = '
'.implode('
', $addresses).'
'; } } From 380ce879efbd6806c1d1bb4b9461ab9bb5d7c63e Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 2 Oct 2019 10:59:40 +0200 Subject: [PATCH 02/10] Added io_safe_output to custom graphs name - #4664 --- pandora_console/godmode/reporting/graphs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index cb52af5e04..233a8afee0 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -291,7 +291,7 @@ $table_aux = new stdClass(); $data[5] .= html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete" style="margin-left:2px;"', true); } - $data[0] = ''.ui_print_truncate_text($graph['name'], 70).''; + $data[0] = ''.ui_print_truncate_text(io_safe_output($graph['name']), 70).''; $data[1] = ui_print_truncate_text($graph['description'], 70); From 18679f90e5da43b3558fafa351fe3dab93cf947b Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 9 Oct 2019 16:24:37 +0200 Subject: [PATCH 03/10] Added token in visual styles to change the font size in items of reports - #4670 --- pandora_console/godmode/setup/setup_visuals.php | 8 +++++++- pandora_console/include/functions_config.php | 8 ++++++++ pandora_console/include/functions_reporting_html.php | 8 +++++--- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 0e7e41e7d6..fab43724b5 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -557,7 +557,7 @@ $row++; // For 5.1 Autohidden menu feature - $table_styles->data['autohidden'][0] = __('Autohidden menu'); + $table_styles->data['autohidden'][0] = __('Automatically hide submenu'); $table_styles->data['autohidden'][1] = html_print_checkbox_switch( 'autohidden_menu', 1, @@ -1032,6 +1032,12 @@ $row++; ); $row++; + + $table_other->data[$row][0] = __('Font size for items reports'); + $table_other->data[$row][1] = ""; + + $row++; + // ---------------------------------------------------------------------- $dirItems = scandir($config['homedir'].'/images/custom_logo'); foreach ($dirItems as $entryDir) { diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 6563a6def2..f566e2a89c 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1269,6 +1269,10 @@ function config_update_config() } // Juanma (06/05/2014) New feature: Custom front page for reports. + if (!config_update_value('font_size_item_report', get_parameter('font_size_item_report', 2))) { + $error_update[] = __('Font size for items reports'); + } + if (!config_update_value('custom_report_front', get_parameter('custom_report_front'))) { $error_update[] = __('Custom report front'); } @@ -2793,6 +2797,10 @@ function config_process_config() config_update_value('custom_report_front', 0); } + if (!isset($config['font_size_item_report'])) { + config_update_value('font_size_item_report', 2); + } + if (!isset($config['custom_report_front_font'])) { config_update_value('custom_report_front_font', 'FreeSans.ttf'); } diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index cf1fa60e70..0ac6569c40 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -467,7 +467,7 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0) if ($mini) { $font_size = '1.5'; } else { - $font_size = '3'; + $font_size = $config['font_size_item_report']; } $metaconsole_on = is_metaconsole(); @@ -2513,7 +2513,7 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0) if ($mini) { $font_size = '1.5'; } else { - $font_size = '3'; + $font_size = $config['font_size_item_report']; } $table->colspan['module']['cell'] = 3; @@ -2780,10 +2780,12 @@ function reporting_html_min_value(&$table, $item, $mini) function reporting_html_value(&$table, $item, $mini, $only_value=false, $check_empty=false) { + global $config; + if ($mini) { $font_size = '1.5'; } else { - $font_size = '3'; + $font_size = $config['font_size_item_report']; } if (isset($item['visual_format']) && $item['visual_format'] != 0 From 763ec6772cf031d0c75960ba635e18337f2cd695 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 7 Nov 2019 17:26:32 +0100 Subject: [PATCH 04/10] Help feedback style improved --- .../include/class/HelpFeedBack.class.php | 84 +++++++--------- pandora_console/include/functions_html.php | 65 +++++++++---- pandora_console/include/functions_ui.php | 39 +++++++- .../include/styles/help_feedback.css | 96 ++++++------------- 4 files changed, 145 insertions(+), 139 deletions(-) diff --git a/pandora_console/include/class/HelpFeedBack.class.php b/pandora_console/include/class/HelpFeedBack.class.php index 074f3d8df2..44751624f5 100644 --- a/pandora_console/include/class/HelpFeedBack.class.php +++ b/pandora_console/include/class/HelpFeedBack.class.php @@ -91,6 +91,7 @@ class HelpFeedBack extends Wizard */ public function run() { + ui_require_css_File('discovery'); ui_require_css_file('help_feedback'); $help_url = get_parameter('url', null); @@ -123,8 +124,6 @@ class HelpFeedBack extends Wizard { global $config; - ui_require_css_file('helper'); - $form = [ 'action' => '#', 'id' => 'feedback_form', @@ -134,35 +133,38 @@ class HelpFeedBack extends Wizard $inputs = [ [ 'wrapper' => 'div', - 'block_id' => 'btn_section', - 'class' => 'btn_section', + 'block_id' => 'flex-row-baseline w100p', + 'class' => 'flex-row-baseline w100p', 'direct' => 1, 'block_content' => [ [ 'arguments' => [ 'label' => __('Sugesstion'), - 'type' => 'button', - 'attributes' => 'class="btn_sug"', - 'name' => 'option_1', - 'id' => 'option_1', - 'script' => 'change_option1()', + 'type' => 'radio_button', + 'attributes' => 'class="btn"', + 'name' => 'suggestion', + 'id' => 'suggestion', + 'script' => 'disableRadio(\'report\')', + 'return' => true, ], ], [ 'arguments' => [ 'label' => __('Something is not quite right'), - 'type' => 'button', - 'attributes' => 'class="btn_something"', - 'name' => 'option_2', - 'id' => 'option_2', - 'script' => 'change_option2()', + 'type' => 'radio_button', + 'attributes' => 'class="btn"', + 'name' => 'report', + 'id' => 'report', + 'script' => 'disableRadio(\'suggestion\')', + 'return' => true, ], ], ], ], [ - 'label' => __('What Happend?'), + 'label' => __('What happened?'), + 'class' => 'explain', 'arguments' => [ 'class' => 'textarea_feedback', 'id' => 'feedback_text', @@ -192,21 +194,22 @@ class HelpFeedBack extends Wizard ], ]; - $output = ui_toggle( - $this->printForm( - [ - 'form' => $form, - 'inputs' => $inputs, - ], - true - ), - __('Feedback'), - '', - '', - true, - false, - '', - 'no-border' + $output = ui_print_toggle( + [ + 'content' => $this->printForm( + [ + 'form' => $form, + 'inputs' => $inputs, + ], + true + ), + 'name' => __('Feedback'), + 'return' => true, + 'class' => 'no-border', + 'img_a' => 'images/arrow_down_white.png', + 'img_b' => 'images/arrow_up_white.png', + + ] ); $output .= $this->loadJS(); @@ -254,24 +257,10 @@ class HelpFeedBack extends Wizard ob_start(); ?>