2013-06-17 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/networkmap.php: fixed to create networkmaps with the same name (for example users with diferent groups ACL). Fixes: #2285 MERGED FROM THE BRANCH PANDORA_4.0 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8339 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
fe53f75f60
commit
c4fa3c8efd
|
@ -1,3 +1,12 @@
|
|||
2013-06-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* operation/agentes/networkmap.php: fixed to create networkmaps
|
||||
with the same name (for example users with diferent groups ACL).
|
||||
|
||||
Fixes: #2285
|
||||
|
||||
MERGED FROM THE BRANCH PANDORA_4.0
|
||||
|
||||
2013-06-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/alerts/configure_alert_action.php,
|
||||
|
|
|
@ -76,6 +76,7 @@ if ($add_networkmap) {
|
|||
$font_size, $group, $module_group, $depth, $modwithalerts,
|
||||
$hidepolicymodules, $zoom, $ranksep, $center, $text_filter,
|
||||
$dont_show_subgroups);
|
||||
|
||||
$message = ui_print_result_message ($id_networkmap,
|
||||
__('Network map created successfully'),
|
||||
__('Could not create network map'), '', true);
|
||||
|
@ -85,6 +86,7 @@ if ($add_networkmap) {
|
|||
$layout, $nooverlap, $simple, $regen, $font_size, $group,
|
||||
$module_group, $depth, $modwithalerts, $hidepolicymodules,
|
||||
$zoom, $ranksep, $center, $text_filter, $dont_show_subgroups);
|
||||
|
||||
$message = ui_print_result_message ($id_networkmap,
|
||||
__('Network map created successfully'),
|
||||
__('Could not create network map'), '', true);
|
||||
|
@ -110,38 +112,31 @@ if ($save_networkmap || $update_networkmap) {
|
|||
$module_group = (int) get_parameter ('module_group', 0);
|
||||
$center = (int) get_parameter ('center', 0);
|
||||
$name = (string) get_parameter ('name', $activeTab);
|
||||
$check = db_get_value('name', 'tnetwork_map', 'name', $name);
|
||||
$subcheck = db_get_value('name', 'tnetwork_map', 'id_networkmap', $id_networkmap);
|
||||
|
||||
if ($save_networkmap) {
|
||||
if (!$check || $subcheck == $name) {
|
||||
$result = networkmap_update_networkmap($id_networkmap,
|
||||
array('name' => $name,
|
||||
'type' => $activeTab,
|
||||
'layout' => $layout,
|
||||
'nooverlap' => $nooverlap,
|
||||
'simple' => $simple,
|
||||
'regenerate' => $regen,
|
||||
'font_size' => $font_size,
|
||||
'id_group' => $group,
|
||||
'id_module_group' => $module_group,
|
||||
'depth' => $depth,
|
||||
'only_modules_with_alerts' => $modwithalerts,
|
||||
'hide_policy_modules' => $hidepolicymodules,
|
||||
'zoom' => $zoom,
|
||||
'distance_nodes' => $ranksep,
|
||||
'text_filter' => $text_filter,
|
||||
'dont_show_subgroups' => $dont_show_subgroups,
|
||||
'center' => $center,
|
||||
'show_snmp_modules' => (int)$show_snmp_modules));
|
||||
|
||||
$message = ui_print_result_message ($result,
|
||||
__('Network map saved successfully'),
|
||||
__('Could not save network map'), '', true);
|
||||
}
|
||||
else {
|
||||
$message = ui_print_error_message(__('Each network map must have a different name'),'',true);
|
||||
}
|
||||
$result = networkmap_update_networkmap($id_networkmap,
|
||||
array('name' => $name,
|
||||
'type' => $activeTab,
|
||||
'layout' => $layout,
|
||||
'nooverlap' => $nooverlap,
|
||||
'simple' => $simple,
|
||||
'regenerate' => $regen,
|
||||
'font_size' => $font_size,
|
||||
'id_group' => $group,
|
||||
'id_module_group' => $module_group,
|
||||
'depth' => $depth,
|
||||
'only_modules_with_alerts' => $modwithalerts,
|
||||
'hide_policy_modules' => $hidepolicymodules,
|
||||
'zoom' => $zoom,
|
||||
'distance_nodes' => $ranksep,
|
||||
'text_filter' => $text_filter,
|
||||
'dont_show_subgroups' => $dont_show_subgroups,
|
||||
'center' => $center,
|
||||
'show_snmp_modules' => (int)$show_snmp_modules));
|
||||
|
||||
$message = ui_print_result_message ($result,
|
||||
__('Network map saved successfully'),
|
||||
__('Could not save network map'), '', true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue