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
002cf78783
commit
9b57dc11e8
|
@ -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>
|
2013-06-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* godmode/alerts/configure_alert_action.php,
|
* godmode/alerts/configure_alert_action.php,
|
||||||
|
|
|
@ -76,6 +76,7 @@ if ($add_networkmap) {
|
||||||
$font_size, $group, $module_group, $depth, $modwithalerts,
|
$font_size, $group, $module_group, $depth, $modwithalerts,
|
||||||
$hidepolicymodules, $zoom, $ranksep, $center, $text_filter,
|
$hidepolicymodules, $zoom, $ranksep, $center, $text_filter,
|
||||||
$dont_show_subgroups);
|
$dont_show_subgroups);
|
||||||
|
|
||||||
$message = ui_print_result_message ($id_networkmap,
|
$message = ui_print_result_message ($id_networkmap,
|
||||||
__('Network map created successfully'),
|
__('Network map created successfully'),
|
||||||
__('Could not create network map'), '', true);
|
__('Could not create network map'), '', true);
|
||||||
|
@ -85,6 +86,7 @@ if ($add_networkmap) {
|
||||||
$layout, $nooverlap, $simple, $regen, $font_size, $group,
|
$layout, $nooverlap, $simple, $regen, $font_size, $group,
|
||||||
$module_group, $depth, $modwithalerts, $hidepolicymodules,
|
$module_group, $depth, $modwithalerts, $hidepolicymodules,
|
||||||
$zoom, $ranksep, $center, $text_filter, $dont_show_subgroups);
|
$zoom, $ranksep, $center, $text_filter, $dont_show_subgroups);
|
||||||
|
|
||||||
$message = ui_print_result_message ($id_networkmap,
|
$message = ui_print_result_message ($id_networkmap,
|
||||||
__('Network map created successfully'),
|
__('Network map created successfully'),
|
||||||
__('Could not create network map'), '', true);
|
__('Could not create network map'), '', true);
|
||||||
|
@ -110,38 +112,31 @@ if ($save_networkmap || $update_networkmap) {
|
||||||
$module_group = (int) get_parameter ('module_group', 0);
|
$module_group = (int) get_parameter ('module_group', 0);
|
||||||
$center = (int) get_parameter ('center', 0);
|
$center = (int) get_parameter ('center', 0);
|
||||||
$name = (string) get_parameter ('name', $activeTab);
|
$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 ($save_networkmap) {
|
||||||
if (!$check || $subcheck == $name) {
|
$result = networkmap_update_networkmap($id_networkmap,
|
||||||
$result = networkmap_update_networkmap($id_networkmap,
|
array('name' => $name,
|
||||||
array('name' => $name,
|
'type' => $activeTab,
|
||||||
'type' => $activeTab,
|
'layout' => $layout,
|
||||||
'layout' => $layout,
|
'nooverlap' => $nooverlap,
|
||||||
'nooverlap' => $nooverlap,
|
'simple' => $simple,
|
||||||
'simple' => $simple,
|
'regenerate' => $regen,
|
||||||
'regenerate' => $regen,
|
'font_size' => $font_size,
|
||||||
'font_size' => $font_size,
|
'id_group' => $group,
|
||||||
'id_group' => $group,
|
'id_module_group' => $module_group,
|
||||||
'id_module_group' => $module_group,
|
'depth' => $depth,
|
||||||
'depth' => $depth,
|
'only_modules_with_alerts' => $modwithalerts,
|
||||||
'only_modules_with_alerts' => $modwithalerts,
|
'hide_policy_modules' => $hidepolicymodules,
|
||||||
'hide_policy_modules' => $hidepolicymodules,
|
'zoom' => $zoom,
|
||||||
'zoom' => $zoom,
|
'distance_nodes' => $ranksep,
|
||||||
'distance_nodes' => $ranksep,
|
'text_filter' => $text_filter,
|
||||||
'text_filter' => $text_filter,
|
'dont_show_subgroups' => $dont_show_subgroups,
|
||||||
'dont_show_subgroups' => $dont_show_subgroups,
|
'center' => $center,
|
||||||
'center' => $center,
|
'show_snmp_modules' => (int)$show_snmp_modules));
|
||||||
'show_snmp_modules' => (int)$show_snmp_modules));
|
|
||||||
|
$message = ui_print_result_message ($result,
|
||||||
$message = ui_print_result_message ($result,
|
__('Network map saved successfully'),
|
||||||
__('Network map saved successfully'),
|
__('Could not save network map'), '', true);
|
||||||
__('Could not save network map'), '', true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$message = ui_print_error_message(__('Each network map must have a different name'),'',true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue