Fixed monitor details search by module name and module group. Ticket #4025
This commit is contained in:
parent
51519053b8
commit
dbb5aeee4c
|
@ -2397,7 +2397,19 @@ function modules_get_modules_name ($sql_from , $sql_conditions = '', $meta = fal
|
|||
return $return;
|
||||
}
|
||||
else {
|
||||
// For each server defined and not disabled:
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
case 'postgresql':
|
||||
$sql = 'SELECT distinct(tagente_modulo.nombre)
|
||||
'. $sql_from . $sql_conditions;
|
||||
break;
|
||||
case 'oracle':
|
||||
$sql = 'SELECT DISTINCT(tagente_modulo.nombre)' .
|
||||
$sql_from . $sql_conditions;
|
||||
break;
|
||||
}
|
||||
|
||||
// For each server defined and not disabled:h
|
||||
$servers = db_get_all_rows_sql ('SELECT *
|
||||
FROM tmetaconsole_setup
|
||||
WHERE disabled = 0');
|
||||
|
@ -2406,6 +2418,7 @@ function modules_get_modules_name ($sql_from , $sql_conditions = '', $meta = fal
|
|||
$servers = array();
|
||||
|
||||
$result = array();
|
||||
$modules = array();
|
||||
foreach($servers as $server) {
|
||||
// If connection was good then retrieve all data server
|
||||
if (metaconsole_connect($server) == NOERR) {
|
||||
|
@ -2414,7 +2427,6 @@ function modules_get_modules_name ($sql_from , $sql_conditions = '', $meta = fal
|
|||
else {
|
||||
$connection = false;
|
||||
}
|
||||
|
||||
// Get all info for filters of all nodes
|
||||
$modules_temp = db_get_all_rows_sql($sql);
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ if (!is_metaconsole()) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
if ($ag_group != 0 && check_acl ($config['id_user'], $id_ag_group, 'AR')) {
|
||||
if (((int)$ag_group !== 0) && (check_acl ($config['id_user'], $id_ag_group, 'AR'))) {
|
||||
$sql_conditions_group = sprintf (' AND tagente.id_grupo IN (%s) ', $ag_group);
|
||||
}
|
||||
elseif ($user_groups != '') {
|
||||
|
@ -124,8 +124,7 @@ else {
|
|||
// Module group
|
||||
if (is_metaconsole()) {
|
||||
if ($modulegroup != '-1')
|
||||
$sql_conditions .= sprintf (' AND tagente_modulo.id_module_group IN (SELECT id_mg
|
||||
FROM tmodule_group WHERE name = \'%s\')', $modulegroup);
|
||||
$sql_conditions .= sprintf (' AND tagente_modulo.id_module_group IN (%s)', $modulegroup);
|
||||
}
|
||||
else if ($modulegroup > -1) {
|
||||
$sql_conditions .= sprintf (' AND tagente_modulo.id_module_group = \'%d\'', $modulegroup);
|
||||
|
@ -293,8 +292,10 @@ if (!is_metaconsole()) {
|
|||
foreach ($rows as $module_group)
|
||||
$rows_select[$module_group['id_mg']] = $module_group['name'];
|
||||
}
|
||||
|
||||
$table->data[0][5] = html_print_select($rows_select, 'modulegroup', $modulegroup, '', __('All'),-1,true, false, true, '', false, 'width: 120px;');
|
||||
else {
|
||||
$rows_select = modules_get_modulegroups();
|
||||
}
|
||||
$table->data[0][5] = html_print_select($rows_select, 'modulegroup', $modulegroup, '', __('All'), -1, true, false, true, '', false, 'width: 120px;');
|
||||
|
||||
$table->rowspan[0][6] = 2;
|
||||
$table->data[0][6] = html_print_submit_button (__('Show'), 'uptbutton',
|
||||
|
|
Loading…
Reference in New Issue