diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index c1317e71dd..9095f6ca89 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -695,9 +695,18 @@ define('NODE_IMAGE_PADDING', 5); // Pandora Database HA constants. define('HA_ACTION_NONE', 0); -define('HA_ACTION_RESYNC', 1); +define('HA_ACTION_DEPLOY', 1); +define('HA_ACTION_RECOVER', 2); +define('HA_ACTION_PROMOTE', 3); +define('HA_ACTION_DEMOTE', 4); define('HA_ACTION_DISABLE', 5); define('HA_ACTION_ENABLE', 6); +define('HA_ACTION_CLEANUP', 7); +define('HA_ACTION_RESYNC', 8); + +define('HA_RESYNC', 1); +define('HA_DISABLE', 5); +define('HA_ENABLE', 6); define('HA_UNINITIALIZED', 0); diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 7b6e133f22..f890f9c28f 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -456,6 +456,10 @@ function config_update_config() $error_update[] = __('Enable Update Manager'); } + if (config_update_value('legacy_database_ha', get_parameter('legacy_database_ha'), true) === false) { + $error_update[] = __('Legacy database HA'); + } + if (config_update_value('ipam_ocuppied_critical_treshold', get_parameter('ipam_ocuppied_critical_treshold'), true) === false) { $error_update[] = __('Ipam Ocuppied Manager Critical'); } @@ -2217,6 +2221,10 @@ function config_process_config() config_update_value('enable_update_manager', 1); } + if (!isset($config['legacy_database_ha'])) { + config_update_value('legacy_database_ha', 1); + } + if (!isset($config['disabled_newsletter'])) { config_update_value('disabled_newsletter', 0); }