Wip command center, agent synch
This commit is contained in:
parent
d8dcdb5af4
commit
835aad542f
|
@ -392,9 +392,9 @@ $table_os .= '</span></div></div></div>';
|
|||
|
||||
// Network server.
|
||||
$servers = servers_get_names();
|
||||
if (!array_key_exists($server_name, $servers)) {
|
||||
$server_Name = 0;
|
||||
// Set the agent have not server.
|
||||
// Set the agent have not server.
|
||||
if (array_key_exists($server_name, $servers) === false) {
|
||||
$server_name = 0;
|
||||
}
|
||||
|
||||
$table_server = '<div class="label_select"><p class="input_label">'.__('Server').'</p>';
|
||||
|
|
|
@ -57,7 +57,7 @@ function servers_get_server($id_server, $filter=false, $fields=false)
|
|||
/**
|
||||
* Get all the server availables.
|
||||
*
|
||||
* @return All the servers available.
|
||||
* @return array the servers available.
|
||||
*/
|
||||
function servers_get_names()
|
||||
{
|
||||
|
@ -1319,3 +1319,22 @@ function servers_get_server_string_name(int $server)
|
|||
return __('N/A');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return server name master where status is activated.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function servers_get_master()
|
||||
{
|
||||
$sql = 'SELECT `name` FROM tserver WHERE `status` = 1 order by `master` desc';
|
||||
|
||||
$result = db_get_value_sql($sql);
|
||||
|
||||
if ($result === false) {
|
||||
$result = '';
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue