Now the supervisor control all servers and not only one
This commit is contained in:
parent
d878958502
commit
5294e2f627
|
@ -2347,38 +2347,32 @@ class ConsoleSupervisor
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the Server and Console versions are the same
|
* Check if all servers and console versions are the same
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function checkConsoleServerVersions()
|
public function checkConsoleServerVersions()
|
||||||
{
|
{
|
||||||
$server_complete_version = db_get_value(
|
global $config;
|
||||||
'version',
|
// List all servers except satellite server
|
||||||
'tserver',
|
$server_version_list = db_get_all_rows_sql(
|
||||||
'id_server',
|
'SELECT name, version FROM tserver WHERE server_type != '.SERVER_TYPE_ENTERPRISE_SATELLITE
|
||||||
'1'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$console_version = db_get_value(
|
foreach ($server_version_list as $server) {
|
||||||
'value',
|
if (strpos($server['version'], $config['current_package_enterprise']) === false) {
|
||||||
'tconfig',
|
$title_ver_misaligned = $server['name'].' version misaligned with Console';
|
||||||
'token',
|
$message_ver_misaligned = 'Server '.$server['name'].' and this console have different versions. This might cause several malfunctions. Please, update this server.';
|
||||||
'current_package_enterprise'
|
|
||||||
);
|
|
||||||
|
|
||||||
if (strpos($server_complete_version, $console_version) === false) {
|
$this->notify(
|
||||||
$title_version_misaligned = 'Console / Server version misaligned';
|
[
|
||||||
$message_version_misaligned = 'Console and Server don\'t have the same version. This might cause several malfunctions. Please, update.';
|
'type' => 'NOTIF.SERVER.MISALIGNED',
|
||||||
|
'title' => __($title_ver_misaligned),
|
||||||
$this->notify(
|
'message' => __($message_ver_misaligned),
|
||||||
[
|
'url' => ui_get_full_url('index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=online'),
|
||||||
'type' => 'NOTIF.SERVER.MISALIGNED',
|
]
|
||||||
'title' => __($title_version_misaligned),
|
);
|
||||||
'message' => __($message_version_misaligned),
|
}
|
||||||
'url' => ui_get_full_url('index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=online'),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue