show unknown and not init modules. Ticket #3844.

This commit is contained in:
Daniel Maya 2016-06-29 10:41:34 +02:00
parent 5ebb77368b
commit e4cdef363e
3 changed files with 4 additions and 2 deletions

View File

@ -486,7 +486,7 @@ $table->data['form_agents_3'][1] = html_print_select ($agents, 'id_agents[]',
$agents_id, false, '', '', true, true, false, '', false, 'width:100%');
$table->data['form_agents_3'][2] = __('When select agents');
$table->data['form_agents_3'][2] .= '<br>';
$table->data['form_agents_3'][2] .= html_print_select (array('common' => __('Show common modules'), 'all' => __('Show all modules')), 'modules_selection_mode',
$table->data['form_agents_3'][2] .= html_print_select (array('common' => __('Show common modules'), 'all' => __('Show all modules'),'unknown' => __('Show unknown and not init modules')), 'modules_selection_mode',
'common', false, '', '', true);
$table->data['form_agents_3'][3] = html_print_select (array(), 'module[]',
$modules_select, false, '', '', true, true, false, '', false, 'width:100%');

View File

@ -333,7 +333,7 @@ $table->data['form_agents_3'][2] = __('When select agents');
$table->data['form_agents_3'][2] .= '<br>';
$table->data['form_agents_3'][2] .= html_print_select (
array('common' => __('Show common modules'),
'all' => __('Show all modules')),
'all' => __('Show all modules'),'unknown' => __('Show unknown and not init modules')),
'modules_selection_mode',
'common', false, '', '', true);
$table->data['form_agents_3'][3] = html_print_select (array(), 'module[]',

View File

@ -395,6 +395,8 @@ if (is_ajax ()) {
WHERE t2.delete_pending = 0
AND t1.nombre = t2.nombre
AND t2.id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')';
}elseif ($selection_mode == 'unknown'){
$sql .= 'AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where estado = 3 OR estado = 4)';
}
$sql .= ' ORDER BY nombre';