From df76a5194c480daf3dc1f4a93458ffdc4004fe2a Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Wed, 29 Nov 2023 13:40:38 +0100 Subject: [PATCH 1/5] #12561 information for LTS versions in Warp Update --- pandora_console/extras/mr/67.sql | 2 + .../update_manager/update_manager.setup.php | 60 +++++++++++++++++++ pandora_console/include/functions_config.php | 4 ++ 3 files changed, 66 insertions(+) diff --git a/pandora_console/extras/mr/67.sql b/pandora_console/extras/mr/67.sql index a0e13a2ab5..fee86f8a8d 100644 --- a/pandora_console/extras/mr/67.sql +++ b/pandora_console/extras/mr/67.sql @@ -17,5 +17,7 @@ INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, ` INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, `value`, `temp_conf`) SELECT id_rt, '_clientPath_', 'custom', '', 0 FROM `trecon_task` WHERE `id_app` = @id_app; UPDATE `trecon_task` SET `setup_complete` = 1 WHERE `id_app` = @id_app; +-- Update lts updates +UPDATE tconfig SET value='1' WHERE token='lts_updates'; COMMIT; diff --git a/pandora_console/godmode/update_manager/update_manager.setup.php b/pandora_console/godmode/update_manager/update_manager.setup.php index ac5471f96a..4c76c6d72d 100644 --- a/pandora_console/godmode/update_manager/update_manager.setup.php +++ b/pandora_console/godmode/update_manager/update_manager.setup.php @@ -411,3 +411,63 @@ html_print_action_buttons( ) ); echo ''; +?> + + + + \ No newline at end of file diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 0e8c347e83..361aac618b 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -2537,6 +2537,10 @@ function config_process_config() config_update_value('gotty_port', 8080); } + if (!isset($config['lts_updates'])) { + config_update_value('lts_updates', 1); + } + if (isset($config['performance_variables_control']) === false) { config_update_value( 'performance_variables_control', From 38a79fa6a6693c288cb54c9c57e2cc4a927211ed Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Wed, 29 Nov 2023 15:30:41 +0100 Subject: [PATCH 2/5] #12516 fixed modal body padding --- .../godmode/update_manager/update_manager.setup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/update_manager/update_manager.setup.php b/pandora_console/godmode/update_manager/update_manager.setup.php index 4c76c6d72d..68b093eaca 100644 --- a/pandora_console/godmode/update_manager/update_manager.setup.php +++ b/pandora_console/godmode/update_manager/update_manager.setup.php @@ -422,11 +422,11 @@ echo ''; echo html_print_image( 'images/info-warning.svg', true, - [ 'style' => 'padding-top: 10px' ] + [ 'style' => 'padding-top: 30px' ] ); ?> -
+

Date: Thu, 30 Nov 2023 09:30:50 +0100 Subject: [PATCH 3/5] #12516 Modal update lts added --- .../update_manager/modal_lts_update.php | 111 ++++++++++++++++++ .../godmode/update_manager/update_manager.php | 2 + .../update_manager/update_manager.setup.php | 60 ---------- 3 files changed, 113 insertions(+), 60 deletions(-) create mode 100644 pandora_console/godmode/update_manager/modal_lts_update.php diff --git a/pandora_console/godmode/update_manager/modal_lts_update.php b/pandora_console/godmode/update_manager/modal_lts_update.php new file mode 100644 index 0000000000..fc744b3b57 --- /dev/null +++ b/pandora_console/godmode/update_manager/modal_lts_update.php @@ -0,0 +1,111 @@ + + + +

+ + \ No newline at end of file diff --git a/pandora_console/godmode/update_manager/update_manager.php b/pandora_console/godmode/update_manager/update_manager.php index e201bc14dd..7011c40c73 100644 --- a/pandora_console/godmode/update_manager/update_manager.php +++ b/pandora_console/godmode/update_manager/update_manager.php @@ -119,11 +119,13 @@ switch ($tab) { case 'setup': include $config['homedir'].'/godmode/update_manager/update_manager.setup.php'; + include $config['homedir'].'/godmode/update_manager/modal_lts_update.php'; break; case 'offline': $mode = \UpdateManager\UI\Manager::MODE_OFFLINE; include $config['homedir'].'/godmode/um_client/index.php'; + include $config['homedir'].'/godmode/update_manager/modal_lts_update.php'; break; case 'online': diff --git a/pandora_console/godmode/update_manager/update_manager.setup.php b/pandora_console/godmode/update_manager/update_manager.setup.php index 68b093eaca..ac5471f96a 100644 --- a/pandora_console/godmode/update_manager/update_manager.setup.php +++ b/pandora_console/godmode/update_manager/update_manager.setup.php @@ -411,63 +411,3 @@ html_print_action_buttons( ) ); echo ''; -?> - - - - \ No newline at end of file From f9fd33fa2e28e53b6883258bd6c80f0be61c592c Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Thu, 30 Nov 2023 11:50:19 +0100 Subject: [PATCH 4/5] #12516 Fixed set token configuration lts updates --- pandora_console/godmode/um_client/index.php | 2 +- .../godmode/update_manager/update_manager.setup.php | 4 ++++ pandora_console/include/functions_config.php | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/um_client/index.php b/pandora_console/godmode/um_client/index.php index c79502626a..1a78e39b5f 100644 --- a/pandora_console/godmode/um_client/index.php +++ b/pandora_console/godmode/um_client/index.php @@ -61,7 +61,7 @@ $license = db_get_value( ); if (isset($config['lts_updates']) === false) { - $config['lts_updates'] = false; + $config['lts_updates'] = true; } if (empty($license) === true) { diff --git a/pandora_console/godmode/update_manager/update_manager.setup.php b/pandora_console/godmode/update_manager/update_manager.setup.php index ac5471f96a..6fb56aed15 100644 --- a/pandora_console/godmode/update_manager/update_manager.setup.php +++ b/pandora_console/godmode/update_manager/update_manager.setup.php @@ -63,6 +63,10 @@ if (users_is_admin()) { } } +if (isset($config['lts_updates']) === false) { + config_update_value('lts_updates', 1); +} + if (!$action_update_url_update_manager) { $url_update_manager = get_parameter( 'url_update_manager', diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 361aac618b..0e8c347e83 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -2537,10 +2537,6 @@ function config_process_config() config_update_value('gotty_port', 8080); } - if (!isset($config['lts_updates'])) { - config_update_value('lts_updates', 1); - } - if (isset($config['performance_variables_control']) === false) { config_update_value( 'performance_variables_control', From 6edc90ec876f574b8e8998d2355cb8add67d8a44 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Thu, 30 Nov 2023 15:59:57 +0100 Subject: [PATCH 5/5] #12516 The modal is added to the online updates view. lts_updates token is added to pandoradb_data.sql --- pandora_console/godmode/update_manager/update_manager.php | 1 + pandora_console/pandoradb_data.sql | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/update_manager/update_manager.php b/pandora_console/godmode/update_manager/update_manager.php index 7011c40c73..3cb774c4d5 100644 --- a/pandora_console/godmode/update_manager/update_manager.php +++ b/pandora_console/godmode/update_manager/update_manager.php @@ -165,5 +165,6 @@ switch ($tab) { $mode = \UpdateManager\UI\Manager::MODE_ONLINE; include $config['homedir'].'/godmode/um_client/index.php'; + include $config['homedir'].'/godmode/update_manager/modal_lts_update.php'; break; } diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 645c74013c..28605959ed 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -156,7 +156,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('gotty', '/usr/bin/gotty'), ('custom_module_units', '{"bytes":"bytes","entries":"entries","files":"files","hits":"hits","sessions":"sessions","users":"users","ºC":"ºC","ºF":"ºF"}'), ('server_unique_identifier', replace(uuid(),'-','')), -('lts_name', ''); +('lts_name', ''), +('lts_updates', 1); UNLOCK TABLES; --