diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 63dd45113d..07ffbc789e 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -8430,3 +8430,18 @@ div.stat-win-spinner img { margin: 5px; font-size: 12px; } + +/* err_msg_centralised */ +div#err_msg_centralised div { + margin-top: 1em; + font-size: 14px; +} + +div#err_msg_centralised img { + width: 100px; + margin-right: 3em; +} +div#err_msg_centralised { + display: flex; + flex-direction: row; +} diff --git a/pandora_console/index.php b/pandora_console/index.php index d6d3be20e0..b9e3585579 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1121,6 +1121,63 @@ if ($config['pure'] == 0) { include 'godmode/menu.php'; } +if (has_metaconsole() === true + && (bool) $config['centralized_management'] === true +) { + $MR = (float) $config['MR']; + // Node attached to a metaconsole. + $server_id = $config['metaconsole_node_id']; + + // Connect to meta. + metaconsole_load_external_db( + [ + 'dbhost' => $config['replication_dbhost'], + 'dbuser' => $config['replication_dbuser'], + 'dbpass' => io_output_password($config['replication_dbpass']), + 'dbname' => $config['replication_dbname'], + ] + ); + $metaMR = (float) db_get_value( + 'value', + 'tconfig', + 'token', + 'MR', + false, + false + ); + + // Return connection to node. + metaconsole_restore_db(); + + if ($MR !== $metaMR) { + $err = '
'.html_print_image( + '/images/warning_modern.png', + true + ); + + $err .= '
'.__( + 'Metaconsole MR (%d) is different than this one (%d)', + $metaMR, + $MR + ); + + $err .= '
'; + $err .= __('Please keep all environment updated to same version.'); + $err .= '
'; + ?> + + \n"; // Values from PHP to be recovered from JAVASCRIPT. require 'include/php_to_js_values.php'; - - ?>