fixed metaconsole tree view popup modules
This commit is contained in:
parent
f123bac915
commit
022adeb24d
|
@ -19,6 +19,7 @@ class Tree {
|
||||||
protected $id = -1;
|
protected $id = -1;
|
||||||
protected $rootID = -1;
|
protected $rootID = -1;
|
||||||
protected $serverID = false;
|
protected $serverID = false;
|
||||||
|
protected $serverName = '';
|
||||||
protected $tree = array();
|
protected $tree = array();
|
||||||
protected $filter = array();
|
protected $filter = array();
|
||||||
protected $childrenMethod = "on_demand";
|
protected $childrenMethod = "on_demand";
|
||||||
|
@ -50,6 +51,9 @@ class Tree {
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->rootID = !empty($rootID) ? $rootID : $id;
|
$this->rootID = !empty($rootID) ? $rootID : $id;
|
||||||
$this->serverID = $serverID;
|
$this->serverID = $serverID;
|
||||||
|
if (is_metaconsole()) {
|
||||||
|
$this->serverName = metaconsole_get_server_by_id($serverID);
|
||||||
|
}
|
||||||
$this->childrenMethod = $childrenMethod;
|
$this->childrenMethod = $childrenMethod;
|
||||||
$this->access = $access;
|
$this->access = $access;
|
||||||
|
|
||||||
|
@ -481,9 +485,9 @@ class Tree {
|
||||||
$module['status'] = $module['estado'];
|
$module['status'] = $module['estado'];
|
||||||
$module['value'] = $module['datos'];
|
$module['value'] = $module['datos'];
|
||||||
|
|
||||||
if (is_metaconsole() && !empty($server)) {
|
if (is_metaconsole()) {
|
||||||
$module['serverID'] = $server['id'];
|
$module['serverID'] = $this->serverID;
|
||||||
$module['serverName'] = $server['server_name'];
|
$module['serverName'] = $this->serverName;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$module['serverName'] = false;
|
$module['serverName'] = false;
|
||||||
|
@ -576,7 +580,7 @@ class Tree {
|
||||||
"refresh" => SECONDS_10MINUTES
|
"refresh" => SECONDS_10MINUTES
|
||||||
);
|
);
|
||||||
|
|
||||||
if (is_metaconsole() && !empty($server)) {
|
if (is_metaconsole()) {
|
||||||
// Set the server id
|
// Set the server id
|
||||||
$graph_params["server"] = $module['serverID'];
|
$graph_params["server"] = $module['serverID'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue