From a5ddef0b77dda82e568c300cf0f8161217752652 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 18 Mar 2024 11:49:38 +0100 Subject: [PATCH] #12973 Added vc_text_margin --- pandora_console/godmode/setup/setup_visuals.php | 9 +++++++-- pandora_console/include/functions_config.php | 8 ++++++++ pandora_console/operation/visual_console/view.php | 8 ++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 586f361de0..d21f2aeb12 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1439,7 +1439,7 @@ $table_vc->data[$row][] = html_print_label_input_block( $table_vc->data[$row][] = html_print_label_input_block( __('Number of favorite visual consoles to show in the menu'), - "" + '' ); $row++; @@ -1455,6 +1455,12 @@ $table_vc->data[$row][] = html_print_label_input_block( ) ); +$table_vc->data[$row][] = html_print_label_input_block( + __('Visual console default text margin (em)'), + '' +); +$row++; + $table_vc->data[$row][] = html_print_label_input_block( __('Lock screen orientation when viewing on mobile devices'), html_print_checkbox_switch( @@ -1464,7 +1470,6 @@ $table_vc->data[$row][] = html_print_label_input_block( true ) ); -$row++; $table_vc->data[$row][] = html_print_label_input_block( __('Display item frame on alert triggered').ui_print_help_tip(__('It displays an orange box around items that have triggered an alert.'), true), diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 32ca1a613c..33dafe2c35 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1263,6 +1263,10 @@ function config_update_config() $error_update[] = __('Default line menu items for the Visual Console'); } + if (config_update_value('vc_text_margin', (int) get_parameter('vc_text_margin', 1), true) === false) { + $error_update[] = __('Default text margin for the Visual Console'); + } + if (config_update_value('vc_line_thickness', (int) get_parameter('vc_line_thickness'), true) === false) { $error_update[] = __('Default line thickness for the Visual Console'); } @@ -2913,6 +2917,10 @@ function config_process_config() config_update_value('vc_menu_items', 10); } + if (!isset($config['vc_text_margin'])) { + config_update_value('vc_text_margin', 1); + } + if (!isset($config['ser_menu_items'])) { config_update_value('ser_menu_items', 10); } diff --git a/pandora_console/operation/visual_console/view.php b/pandora_console/operation/visual_console/view.php index 7d44c7b69b..ef63456f6a 100644 --- a/pandora_console/operation/visual_console/view.php +++ b/pandora_console/operation/visual_console/view.php @@ -627,6 +627,14 @@ if ($pure === true) { + +