mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
#8642 Fixed meta
This commit is contained in:
parent
52231615f6
commit
e311c81f84
@ -26,6 +26,8 @@
|
|||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use PandoraFMS\Enterprise\Metaconsole\Node;
|
||||||
|
|
||||||
if (is_ajax() === true) {
|
if (is_ajax() === true) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -216,6 +218,12 @@ if (is_ajax() === true) {
|
|||||||
if ($getInfo === true) {
|
if ($getInfo === true) {
|
||||||
enterprise_include_once('include/functions_agents.php');
|
enterprise_include_once('include/functions_agents.php');
|
||||||
$id = get_parameter('id', 0);
|
$id = get_parameter('id', 0);
|
||||||
|
$id_server = get_parameter('id_server', 0);
|
||||||
|
if (empty($id_server) === false) {
|
||||||
|
$nd = new Node($id_server);
|
||||||
|
$nd->connect();
|
||||||
|
}
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 3:
|
case 3:
|
||||||
case 2:
|
case 2:
|
||||||
@ -375,6 +383,10 @@ if (is_ajax() === true) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($id_server) === false) {
|
||||||
|
$nd->disconnect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Heatmap class.
|
* Heatmap class.
|
||||||
*
|
*
|
||||||
@ -27,6 +28,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PandoraFMS;
|
namespace PandoraFMS;
|
||||||
|
|
||||||
|
use PandoraFMS\Enterprise\Metaconsole\Node;
|
||||||
|
|
||||||
class Heatmap
|
class Heatmap
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -208,7 +212,7 @@ class Heatmap
|
|||||||
let cont = 0;
|
let cont = 0;
|
||||||
while (cont < Math.ceil(totalModules / 10)) {
|
while (cont < Math.ceil(totalModules / 10)) {
|
||||||
oneSquare(getRandomInteger(1, 10), getRandomInteger(100, 900));
|
oneSquare(getRandomInteger(1, 10), getRandomInteger(100, 900));
|
||||||
cont ++;
|
cont++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -261,7 +265,9 @@ class Heatmap
|
|||||||
// Object to array.
|
// Object to array.
|
||||||
let lista = Object.values(data);
|
let lista = Object.values(data);
|
||||||
// randomly sort.
|
// randomly sort.
|
||||||
lista = lista.sort(function() {return Math.random() - 0.5});
|
lista = lista.sort(function() {
|
||||||
|
return Math.random() - 0.5
|
||||||
|
});
|
||||||
|
|
||||||
let countPerSecond = total / refresh;
|
let countPerSecond = total / refresh;
|
||||||
if (countPerSecond < 1) {
|
if (countPerSecond < 1) {
|
||||||
@ -276,6 +282,7 @@ class Heatmap
|
|||||||
while (cont <= limit) {
|
while (cont <= limit) {
|
||||||
if (typeof lista[cont] !== 'undefined') {
|
if (typeof lista[cont] !== 'undefined') {
|
||||||
const rect = document.getElementsByName(`${lista[cont]['id']}`);
|
const rect = document.getElementsByName(`${lista[cont]['id']}`);
|
||||||
|
console.log(rect[0]);
|
||||||
$(`#${rect[0].id}`).removeClass();
|
$(`#${rect[0].id}`).removeClass();
|
||||||
$(`#${rect[0].id}`).addClass(`${lista[cont]['status']} hover`);
|
$(`#${rect[0].id}`).addClass(`${lista[cont]['status']} hover`);
|
||||||
}
|
}
|
||||||
@ -288,7 +295,7 @@ class Heatmap
|
|||||||
);
|
);
|
||||||
|
|
||||||
setTimeout(
|
setTimeout(
|
||||||
function(){
|
function() {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
},
|
},
|
||||||
(refresh * 1000)
|
(refresh * 1000)
|
||||||
@ -397,9 +404,72 @@ class Heatmap
|
|||||||
$id_grupo
|
$id_grupo
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$agents = [];
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$nodes = metaconsole_get_connections();
|
||||||
|
$cont = 0;
|
||||||
|
foreach ($nodes as $node) {
|
||||||
|
try {
|
||||||
|
$nd = new Node($node['id']);
|
||||||
|
$nd->connect();
|
||||||
|
|
||||||
|
$result = db_get_all_rows_sql($sql);
|
||||||
|
// Agent status.
|
||||||
|
foreach ($result as $agent) {
|
||||||
|
if ($agent['total_count'] === 0 || $agent['total_count'] === $agent['notinit_count']) {
|
||||||
|
$status = 'notinit';
|
||||||
|
} else if ($agent['critical_count'] > 0) {
|
||||||
|
$status = 'critical';
|
||||||
|
} else if ($agent['warning_count'] > 0) {
|
||||||
|
$status = 'warning';
|
||||||
|
} else if ($agent['unknown_count'] > 0) {
|
||||||
|
$status = 'unknown';
|
||||||
|
} else {
|
||||||
|
$status = 'normal';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($agent['last_status_change'] != 0) {
|
||||||
|
$seconds = (time() - $agent['last_status_change']);
|
||||||
|
|
||||||
|
if ($seconds >= SECONDS_1DAY) {
|
||||||
|
$status .= '_10';
|
||||||
|
} else if ($seconds >= 77760) {
|
||||||
|
$status .= '_9';
|
||||||
|
} else if ($seconds >= 69120) {
|
||||||
|
$status .= '_8';
|
||||||
|
} else if ($seconds >= 60480) {
|
||||||
|
$status .= '_7';
|
||||||
|
} else if ($seconds >= 51840) {
|
||||||
|
$status .= '_6';
|
||||||
|
} else if ($seconds >= 43200) {
|
||||||
|
$status .= '_5';
|
||||||
|
} else if ($seconds >= 34560) {
|
||||||
|
$status .= '_4';
|
||||||
|
} else if ($seconds >= 25920) {
|
||||||
|
$status .= '_3';
|
||||||
|
} else if ($seconds >= 17280) {
|
||||||
|
$status .= '_2';
|
||||||
|
} else if ($seconds >= 8640) {
|
||||||
|
$status .= '_1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$agents[$cont] = $agent;
|
||||||
|
$agents[$cont]['status'] = $status;
|
||||||
|
$agents[$cont]['server'] = $node['id'];
|
||||||
|
|
||||||
|
++$cont;
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$nd->disconnect();
|
||||||
|
$agents = [];
|
||||||
|
} finally {
|
||||||
|
$nd->disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$result = db_get_all_rows_sql($sql);
|
$result = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
$agents = [];
|
|
||||||
// Agent status.
|
// Agent status.
|
||||||
foreach ($result as $key => $agent) {
|
foreach ($result as $key => $agent) {
|
||||||
if ($agent['total_count'] === 0 || $agent['total_count'] === $agent['notinit_count']) {
|
if ($agent['total_count'] === 0 || $agent['total_count'] === $agent['notinit_count']) {
|
||||||
@ -443,6 +513,7 @@ class Heatmap
|
|||||||
$agents[$key] = $agent;
|
$agents[$key] = $agent;
|
||||||
$agents[$key]['status'] = $status;
|
$agents[$key]['status'] = $status;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $agents;
|
return $agents;
|
||||||
}
|
}
|
||||||
@ -491,6 +562,91 @@ class Heatmap
|
|||||||
$filter_name
|
$filter_name
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$nodes = metaconsole_get_connections();
|
||||||
|
$cont = 0;
|
||||||
|
$result = [];
|
||||||
|
foreach ($nodes as $node) {
|
||||||
|
try {
|
||||||
|
$nd = new Node($node['id']);
|
||||||
|
$nd->connect();
|
||||||
|
|
||||||
|
$modules = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
|
// Module status.
|
||||||
|
foreach ($modules as $key => $module) {
|
||||||
|
$status = '';
|
||||||
|
switch ($module['status']) {
|
||||||
|
case AGENT_MODULE_STATUS_CRITICAL_BAD:
|
||||||
|
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
|
||||||
|
case 1:
|
||||||
|
case 100:
|
||||||
|
$status = 'critical';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AGENT_MODULE_STATUS_NORMAL:
|
||||||
|
case AGENT_MODULE_STATUS_NORMAL_ALERT:
|
||||||
|
case 0:
|
||||||
|
case 300:
|
||||||
|
$status = 'normal';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AGENT_MODULE_STATUS_WARNING:
|
||||||
|
case AGENT_MODULE_STATUS_WARNING_ALERT:
|
||||||
|
case 2:
|
||||||
|
case 200:
|
||||||
|
$status = 'warning';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
case AGENT_MODULE_STATUS_UNKNOWN:
|
||||||
|
case 3:
|
||||||
|
$status = 'unknown';
|
||||||
|
break;
|
||||||
|
case AGENT_MODULE_STATUS_NOT_INIT:
|
||||||
|
case 5:
|
||||||
|
$status = 'notinit';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($module['last_status_change'] != 0) {
|
||||||
|
$seconds = (time() - $module['last_status_change']);
|
||||||
|
|
||||||
|
if ($seconds >= SECONDS_1DAY) {
|
||||||
|
$status .= '_10';
|
||||||
|
} else if ($seconds >= 77760) {
|
||||||
|
$status .= '_9';
|
||||||
|
} else if ($seconds >= 69120) {
|
||||||
|
$status .= '_8';
|
||||||
|
} else if ($seconds >= 60480) {
|
||||||
|
$status .= '_7';
|
||||||
|
} else if ($seconds >= 51840) {
|
||||||
|
$status .= '_6';
|
||||||
|
} else if ($seconds >= 43200) {
|
||||||
|
$status .= '_5';
|
||||||
|
} else if ($seconds >= 34560) {
|
||||||
|
$status .= '_4';
|
||||||
|
} else if ($seconds >= 25920) {
|
||||||
|
$status .= '_3';
|
||||||
|
} else if ($seconds >= 17280) {
|
||||||
|
$status .= '_2';
|
||||||
|
} else if ($seconds >= 8640) {
|
||||||
|
$status .= '_1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result[$cont] = $module;
|
||||||
|
$result[$cont]['status'] = $status;
|
||||||
|
$result[$cont]['server'] = $node['id'];
|
||||||
|
++$cont;
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$nd->disconnect();
|
||||||
|
} finally {
|
||||||
|
$nd->disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$result = db_get_all_rows_sql($sql);
|
$result = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
// Module status.
|
// Module status.
|
||||||
@ -557,6 +713,7 @@ class Heatmap
|
|||||||
|
|
||||||
$result[$key]['status'] = $status;
|
$result[$key]['status'] = $status;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -600,12 +757,97 @@ class Heatmap
|
|||||||
ae.last_status_change FROM tagente_estado ae
|
ae.last_status_change FROM tagente_estado ae
|
||||||
%s
|
%s
|
||||||
INNER JOIN ttag_module tm ON tm.id_agente_modulo = ae.id_agente_modulo
|
INNER JOIN ttag_module tm ON tm.id_agente_modulo = ae.id_agente_modulo
|
||||||
WHERE 1=1 %s %s GROUP BY tm.id_tag, ae.id_agente_modulo',
|
WHERE 1=1 %s %s GROUP BY ae.id_agente_modulo',
|
||||||
$id_user_groups,
|
$id_user_groups,
|
||||||
$filter_tag,
|
$filter_tag,
|
||||||
$filter_name
|
$filter_name
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$nodes = metaconsole_get_connections();
|
||||||
|
$result = [];
|
||||||
|
$cont = 0;
|
||||||
|
foreach ($nodes as $node) {
|
||||||
|
try {
|
||||||
|
$nd = new Node($node['id']);
|
||||||
|
$nd->connect();
|
||||||
|
|
||||||
|
$modules = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
|
// Module status.
|
||||||
|
foreach ($modules as $key => $module) {
|
||||||
|
$status = '';
|
||||||
|
switch ($module['status']) {
|
||||||
|
case AGENT_MODULE_STATUS_CRITICAL_BAD:
|
||||||
|
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
|
||||||
|
case 1:
|
||||||
|
case 100:
|
||||||
|
$status = 'critical';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AGENT_MODULE_STATUS_NORMAL:
|
||||||
|
case AGENT_MODULE_STATUS_NORMAL_ALERT:
|
||||||
|
case 0:
|
||||||
|
case 300:
|
||||||
|
$status = 'normal';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AGENT_MODULE_STATUS_WARNING:
|
||||||
|
case AGENT_MODULE_STATUS_WARNING_ALERT:
|
||||||
|
case 2:
|
||||||
|
case 200:
|
||||||
|
$status = 'warning';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
case AGENT_MODULE_STATUS_UNKNOWN:
|
||||||
|
case 3:
|
||||||
|
$status = 'unknown';
|
||||||
|
break;
|
||||||
|
case AGENT_MODULE_STATUS_NOT_INIT:
|
||||||
|
case 5:
|
||||||
|
$status = 'notinit';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($module['last_status_change'] != 0) {
|
||||||
|
$seconds = (time() - $module['last_status_change']);
|
||||||
|
|
||||||
|
if ($seconds >= SECONDS_1DAY) {
|
||||||
|
$status .= '_10';
|
||||||
|
} else if ($seconds >= 77760) {
|
||||||
|
$status .= '_9';
|
||||||
|
} else if ($seconds >= 69120) {
|
||||||
|
$status .= '_8';
|
||||||
|
} else if ($seconds >= 60480) {
|
||||||
|
$status .= '_7';
|
||||||
|
} else if ($seconds >= 51840) {
|
||||||
|
$status .= '_6';
|
||||||
|
} else if ($seconds >= 43200) {
|
||||||
|
$status .= '_5';
|
||||||
|
} else if ($seconds >= 34560) {
|
||||||
|
$status .= '_4';
|
||||||
|
} else if ($seconds >= 25920) {
|
||||||
|
$status .= '_3';
|
||||||
|
} else if ($seconds >= 17280) {
|
||||||
|
$status .= '_2';
|
||||||
|
} else if ($seconds >= 8640) {
|
||||||
|
$status .= '_1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result[$cont] = $module;
|
||||||
|
$result[$cont]['status'] = $status;
|
||||||
|
$result[$cont]['server'] = $node['id'];
|
||||||
|
++$cont;
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$nd->disconnect();
|
||||||
|
} finally {
|
||||||
|
$nd->disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$result = db_get_all_rows_sql($sql);
|
$result = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
// Module status.
|
// Module status.
|
||||||
@ -672,6 +914,7 @@ class Heatmap
|
|||||||
|
|
||||||
$result[$key]['status'] = $status;
|
$result[$key]['status'] = $status;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -714,6 +957,91 @@ class Heatmap
|
|||||||
$filter_name
|
$filter_name
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$result = [];
|
||||||
|
$nodes = metaconsole_get_connections();
|
||||||
|
$cont = 0;
|
||||||
|
foreach ($nodes as $node) {
|
||||||
|
try {
|
||||||
|
$nd = new Node($node['id']);
|
||||||
|
$nd->connect();
|
||||||
|
|
||||||
|
$modules = db_get_all_rows_sql($sql);
|
||||||
|
// Module status.
|
||||||
|
foreach ($modules as $key => $module) {
|
||||||
|
$status = '';
|
||||||
|
switch ($module['status']) {
|
||||||
|
case AGENT_MODULE_STATUS_CRITICAL_BAD:
|
||||||
|
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
|
||||||
|
case 1:
|
||||||
|
case 100:
|
||||||
|
$status = 'critical';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AGENT_MODULE_STATUS_NORMAL:
|
||||||
|
case AGENT_MODULE_STATUS_NORMAL_ALERT:
|
||||||
|
case 0:
|
||||||
|
case 300:
|
||||||
|
$status = 'normal';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AGENT_MODULE_STATUS_WARNING:
|
||||||
|
case AGENT_MODULE_STATUS_WARNING_ALERT:
|
||||||
|
case 2:
|
||||||
|
case 200:
|
||||||
|
$status = 'warning';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
case AGENT_MODULE_STATUS_UNKNOWN:
|
||||||
|
case 3:
|
||||||
|
$status = 'unknown';
|
||||||
|
break;
|
||||||
|
case AGENT_MODULE_STATUS_NOT_INIT:
|
||||||
|
case 5:
|
||||||
|
$status = 'notinit';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($module['last_status_change'] != 0) {
|
||||||
|
$seconds = (time() - $module['last_status_change']);
|
||||||
|
|
||||||
|
if ($seconds >= SECONDS_1DAY) {
|
||||||
|
$status .= '_10';
|
||||||
|
} else if ($seconds >= 77760) {
|
||||||
|
$status .= '_9';
|
||||||
|
} else if ($seconds >= 69120) {
|
||||||
|
$status .= '_8';
|
||||||
|
} else if ($seconds >= 60480) {
|
||||||
|
$status .= '_7';
|
||||||
|
} else if ($seconds >= 51840) {
|
||||||
|
$status .= '_6';
|
||||||
|
} else if ($seconds >= 43200) {
|
||||||
|
$status .= '_5';
|
||||||
|
} else if ($seconds >= 34560) {
|
||||||
|
$status .= '_4';
|
||||||
|
} else if ($seconds >= 25920) {
|
||||||
|
$status .= '_3';
|
||||||
|
} else if ($seconds >= 17280) {
|
||||||
|
$status .= '_2';
|
||||||
|
} else if ($seconds >= 8640) {
|
||||||
|
$status .= '_1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result[$cont] = $module;
|
||||||
|
$result[$cont]['status'] = $status;
|
||||||
|
$result[$cont]['server'] = $node['id'];
|
||||||
|
++$cont;
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$nd->disconnect();
|
||||||
|
$result = [];
|
||||||
|
} finally {
|
||||||
|
$nd->disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$result = db_get_all_rows_sql($sql);
|
$result = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
// Module status.
|
// Module status.
|
||||||
@ -780,6 +1108,7 @@ class Heatmap
|
|||||||
|
|
||||||
$result[$key]['status'] = $status;
|
$result[$key]['status'] = $status;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -876,7 +1205,6 @@ class Heatmap
|
|||||||
{
|
{
|
||||||
$yAxis = sqrt(($total / $relation));
|
$yAxis = sqrt(($total / $relation));
|
||||||
return $yAxis;
|
return $yAxis;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -887,7 +1215,7 @@ class Heatmap
|
|||||||
*
|
*
|
||||||
* @return boolean True allowed, false not.
|
* @return boolean True allowed, false not.
|
||||||
*/
|
*/
|
||||||
public function ajaxMethod(string $method):bool
|
public function ajaxMethod(string $method): bool
|
||||||
{
|
{
|
||||||
return in_array($method, $this->AJAXMethods);
|
return in_array($method, $this->AJAXMethods);
|
||||||
}
|
}
|
||||||
@ -933,8 +1261,13 @@ class Heatmap
|
|||||||
$contY = 0;
|
$contY = 0;
|
||||||
$cont = 1;
|
$cont = 1;
|
||||||
foreach ($result as $value) {
|
foreach ($result as $value) {
|
||||||
|
$name = $value['id'];
|
||||||
|
if (empty($value['server']) === false) {
|
||||||
|
$name .= '|'.$value['server'];
|
||||||
|
}
|
||||||
|
|
||||||
echo '<rect id="'.$this->randomId.'_'.$cont.'" class="'.$value['status'].' hover"
|
echo '<rect id="'.$this->randomId.'_'.$cont.'" class="'.$value['status'].' hover"
|
||||||
width="1" height="1" x ="'.$contX.' "y="'.$contY.'" name="'.$value['id'].'" />';
|
width="1" height="1" x ="'.$contX.' "y="'.$contY.'" name="'.$name.'" />';
|
||||||
|
|
||||||
$contX++;
|
$contX++;
|
||||||
if ($contX >= $Xaxis) {
|
if ($contX >= $Xaxis) {
|
||||||
@ -955,7 +1288,9 @@ class Heatmap
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('rect').click(function() {
|
$('rect').click(function() {
|
||||||
const type = <?php echo $this->type; ?>;
|
const type = <?php echo $this->type; ?>;
|
||||||
const id = $(`#${this.id}`).attr("name");
|
const name = $(`#${this.id}`).attr("name");
|
||||||
|
const id = name.split('|')[0];
|
||||||
|
const server = name.split('|')[1];
|
||||||
|
|
||||||
$("#info_dialog").dialog({
|
$("#info_dialog").dialog({
|
||||||
resizable: true,
|
resizable: true,
|
||||||
@ -974,6 +1309,7 @@ class Heatmap
|
|||||||
getInfo: 1,
|
getInfo: 1,
|
||||||
type: type,
|
type: type,
|
||||||
id: id,
|
id: id,
|
||||||
|
id_server: server,
|
||||||
},
|
},
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user