mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-16 10:24:56 +02:00
fix module name finish % pandora_enterprise#8570
This commit is contained in:
parent
bc9bb070df
commit
c8daf0a977
@ -631,44 +631,30 @@ switch ($activeTab) {
|
|||||||
'message' => $message,
|
'message' => $message,
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
// One item per module
|
if (is_metaconsole() === true) {
|
||||||
if (empty($name_modules)) {
|
$agents_ids = [];
|
||||||
$statusProcessInDB = [
|
foreach ($id_agents as $id_agent_id) {
|
||||||
'flag' => true,
|
$server_and_agent = explode('|', $id_agent_id);
|
||||||
'message' => ui_print_error_message(
|
|
||||||
__('No modules selected'),
|
|
||||||
'',
|
|
||||||
true
|
|
||||||
),
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
if (defined('METACONSOLE')) {
|
|
||||||
$agents_ids = [];
|
|
||||||
foreach ($id_agents as $id_agent_id) {
|
|
||||||
$server_and_agent = explode('|', $id_agent_id);
|
|
||||||
|
|
||||||
$agents_ids[] = $server_and_agent[1];
|
$agents_ids[] = $server_and_agent[1];
|
||||||
}
|
|
||||||
|
|
||||||
$rows = db_get_all_rows_filter(
|
|
||||||
'tmetaconsole_agent',
|
|
||||||
['id_tagente' => $agents_ids]
|
|
||||||
);
|
|
||||||
|
|
||||||
$agents = [];
|
|
||||||
foreach ($rows as $row) {
|
|
||||||
$agents[$row['id_tmetaconsole_setup']][] = $row['id_tagente'];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$agents[0] = $id_agents;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$rows = db_get_all_rows_filter(
|
||||||
|
'tmetaconsole_agent',
|
||||||
|
['id_tagente' => $agents_ids]
|
||||||
|
);
|
||||||
|
|
||||||
|
$agents = [];
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
$agents[$row['id_tmetaconsole_setup']][] = $row['id_tagente'];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$agents[0] = $id_agents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($agents as $id_server => $id_agents) {
|
foreach ($agents as $id_server => $id_agents) {
|
||||||
// Any module
|
// Any module.
|
||||||
if ($name_modules[0] == '0') {
|
if (empty($name_modules) === true || $name_modules[0] === '0') {
|
||||||
$message .= visual_map_process_wizard_add_agents(
|
$message .= visual_map_process_wizard_add_agents(
|
||||||
$id_agents,
|
$id_agents,
|
||||||
$image,
|
$image,
|
||||||
@ -710,13 +696,10 @@ switch ($activeTab) {
|
|||||||
$id_module = $agent->searchModules(
|
$id_module = $agent->searchModules(
|
||||||
['nombre' => $mod],
|
['nombre' => $mod],
|
||||||
1
|
1
|
||||||
)->toArray();
|
)->toArray()['id_agente_modulo'];
|
||||||
|
|
||||||
if (empty($id_module) === true) {
|
if (empty($id_module) === true) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
|
||||||
$id_module = reset($id_module);
|
|
||||||
$id_module = $id_module['id_agente_modulo'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$id_modules[] = $id_module;
|
$id_modules[] = $id_module;
|
||||||
|
@ -533,7 +533,7 @@ echo '</div>';
|
|||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
// Trick for it have a traduct text for javascript.
|
// Trick for it have a traduct text for javascript.
|
||||||
echo '<span id="any_text" class="invisible">'.__('Any').'</span>';
|
echo '<span id="any_text" class="invisible">'.__('None').'</span>';
|
||||||
echo '<span id="none_text" class="invisible">'.__('None').'</span>';
|
echo '<span id="none_text" class="invisible">'.__('None').'</span>';
|
||||||
echo '<span id="loading_text" class="invisible">'.__('Loading...').'</span>';
|
echo '<span id="loading_text" class="invisible">'.__('Loading...').'</span>';
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user