Fixed the connection to node in metaconsole when show the data module dialog. TICKET: #1870
This commit is contained in:
parent
4aa7c9eab0
commit
eea8e0d8ae
|
@ -85,9 +85,10 @@ if ($get_module_detail) {
|
|||
|
||||
if (defined ('METACONSOLE')) {
|
||||
$server = metaconsole_get_connection ($server_name);
|
||||
$conexion = mysql_connect ($server['dbhost'], $server['dbuser'],
|
||||
$server['dbpass']);
|
||||
$select_db = mysql_select_db ($server['dbname'], $conexion);
|
||||
|
||||
if (metaconsole_connect($server) != NOERR)
|
||||
return;
|
||||
$conexion = false;
|
||||
}
|
||||
else {
|
||||
$conexion = false;
|
||||
|
|
|
@ -1553,7 +1553,9 @@ function modules_get_next_data ($id_agent_module, $utimestamp = 0, $string = 0)
|
|||
*
|
||||
* @return array The module value and the timestamp
|
||||
*/
|
||||
function modules_get_agentmodule_data ($id_agent_module, $period, $date = 0, $trash=false, $conexion = false, $order = 'ASC') {
|
||||
function modules_get_agentmodule_data ($id_agent_module, $period,
|
||||
$date = 0, $trash=false, $conexion = false, $order = 'ASC') {
|
||||
|
||||
$module = db_get_row('tagente_modulo', 'id_agente_modulo',
|
||||
$id_agent_module);
|
||||
|
||||
|
@ -1578,7 +1580,7 @@ function modules_get_agentmodule_data ($id_agent_module, $period, $date = 0, $tr
|
|||
WHERE id_agente_modulo = %d
|
||||
AND utimestamp > %d AND utimestamp <= %d
|
||||
ORDER BY utimestamp %s",
|
||||
$id_agent_module, $datelimit, $date, $order);
|
||||
$id_agent_module, $datelimit, $date, $order);
|
||||
break;
|
||||
//log4x
|
||||
case 24:
|
||||
|
@ -1587,7 +1589,7 @@ function modules_get_agentmodule_data ($id_agent_module, $period, $date = 0, $tr
|
|||
WHERE id_agente_modulo = %d
|
||||
AND utimestamp > %d AND utimestamp <= %d
|
||||
ORDER BY utimestamp %s",
|
||||
$id_agent_module, $datelimit, $date, $order);
|
||||
$id_agent_module, $datelimit, $date, $order);
|
||||
break;
|
||||
default:
|
||||
$sql = sprintf ("SELECT datos AS data, utimestamp
|
||||
|
@ -1595,7 +1597,7 @@ function modules_get_agentmodule_data ($id_agent_module, $period, $date = 0, $tr
|
|||
WHERE id_agente_modulo = %d
|
||||
AND utimestamp > %d AND utimestamp <= %d
|
||||
ORDER BY utimestamp %s",
|
||||
$id_agent_module, $datelimit, $date, $order);
|
||||
$id_agent_module, $datelimit, $date, $order);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue