Added new messages to massive operationso

This commit is contained in:
Arturo Gonzalez 2017-05-11 10:13:46 +02:00
parent ee7185c03b
commit 495fc6d50f
2 changed files with 11 additions and 3 deletions

View File

@ -178,10 +178,9 @@ if ($update_agents) {
}
}
ui_print_result_message ($result !== false,
__('Agents updated successfully') . '(' . $n_edited . ')',
__('Agents cannot be updated'));
__('Agents cannot be updated (maybe there was no field to update)'));
}
$id_group = 0;

View File

@ -110,6 +110,9 @@ if ($update) {
$success += (int)$result;
}
}
if ($success == 0) {
$error_msg = __("Error updating the modules from a module type");
}
}
else if ($force == 'group') {
$agents_ = array_keys(agents_get_group_agents($group_select, false, 'none'));
@ -129,6 +132,9 @@ if ($update) {
$success += (int)$result;
}
}
if ($success == 0) {
$error_msg = __("Error updating the modules from an agent group");
}
}
}
else {
@ -146,11 +152,14 @@ if ($update) {
}
}
if ($success == 0) {
$error_msg = __("Error updating the modules (maybe there was no field to update)");
}
}
ui_print_result_message ($success > 0,
__('Successfully updated') . "(" . $success . "/" . $count . ")",
__('Could not be updated'));
$error_msg);
$info = 'Modules: ' . json_encode($modules_) . ' Agents: ' . json_encode($agents_);
if ($success > 0) {