2013-05-30 Miguel de Dios <miguel.dedios@artica.es>

* operation/agentes/networkmap.php: fixed the string of button to
	refresh the networkmap.
	
	Fixes: #2254




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8235 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-05-30 14:28:18 +00:00
parent 17274a32c6
commit c4267df092
2 changed files with 32 additions and 17 deletions

View File

@ -1,3 +1,10 @@
2013-05-30 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/networkmap.php: fixed the string of button to
refresh the networkmap.
Fixes: #2254
2013-05-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/groups/group_list.php, include/functions_groups.php: fixed

View File

@ -67,7 +67,8 @@ if ($add_networkmap) {
$center = 0;
$name = $activeTab;
$check = db_get_value('name', 'tnetwork_map', 'name', $name);
$sql = db_get_value_filter('COUNT(name)', 'tnetwork_map', array('name' => "%$name"));
$sql = db_get_value_filter('COUNT(name)', 'tnetwork_map',
array('name' => "%$name"));
if ($check) {
$id_networkmap = networkmap_create_networkmap("($sql) ".$name,
@ -150,10 +151,6 @@ $nomaps = false;
if ($networkmaps === false) {
$nomaps = true;
}
/*// When is the first map, we create one
if($nomaps && $id_networkmap == 0) {
$add_networkmap = 1;
}*/
// If the map id is not defined, we set the first id of the active type
if (!$nomaps && $id_networkmap == 0) {
@ -263,7 +260,8 @@ if (!empty($name)) {
$title .= " &raquo; ". mb_substr($name, 0, 25);
}
ui_print_page_header (__('Network map')." - ".$title, "images/op_network.png", false, "network_map", false, $buttons);
ui_print_page_header (__('Network map') . " - " . $title,
"images/op_network.png", false, "network_map", false, $buttons);
if (tags_has_user_acl_tags()) {
ui_print_tags_warning();
@ -274,7 +272,8 @@ if ($delete_networkmap || $add_networkmap || $save_networkmap) {
}
if ($id_networkmap == 0) {
echo "<div class='nf'>".__('There are no defined maps in this view')."</div>";
echo "<div class='nf'>" .
__('There are no defined maps in this view') . "</div>";
return;
}
@ -306,6 +305,7 @@ if ($activeTab == 'groups' || $activeTab == 'policies') {
$table->data[0][] = __('Module group') . '&nbsp;' .
html_print_select_from_sql ('SELECT id_mg, name FROM tmodule_group', 'module_group', $module_group, '', 'All', 0, true);
}
if ($activeTab == 'topology') {
$table->data[0][] = __('Show interfaces') . '&nbsp;' .
html_print_checkbox ('show_snmp_modules', '1', $show_snmp_modules, true);
@ -313,18 +313,25 @@ if ($activeTab == 'topology') {
$table->data[0][] = __('Layout') . '&nbsp;' .
html_print_select ($layout_array, 'layout', $layout, '', '', '', true);
if ($activeTab == 'groups') {
$depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'group' => __('Groups'));
$depth_levels = array(
'all' => __('All'),
'agent' => __('Agents'),
'group' => __('Groups'));
$table->data[0][] = __('Depth') . '&nbsp;' .
html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
}
if ($activeTab == 'policies') {
$depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'policy' => __('Policies'));
$depth_levels = array(
'all' => __('All'),
'agent' => __('Agents'),
'policy' => __('Policies'));
$table->data[0][] = __('Depth') . '&nbsp;' .
html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
}
$table->data[1][] = __('No Overlap') . '&nbsp;' .
html_print_checkbox ('nooverlap', '1', $nooverlap, true);
if (($activeTab == 'groups' || $activeTab == 'policies') &&
$depth == 'all') {
$table->data[1][] = __('Only modules with alerts') . '&nbsp;' .
@ -356,6 +363,7 @@ if ($pure == "1") {
$table->data[1][] = __('Zoom') . '&nbsp;' .
html_print_select ($zoom_array, 'zoom', $zoom, '', '', '', true, false, false, false);
}
if ($nooverlap == 1) {
$table->data[1][] = __('Distance between nodes') . '&nbsp;' .
html_print_input_text ('ranksep', $ranksep, __('Separation between elements in the map (in Non-overlap mode)'), 3, 4, true);
@ -375,7 +383,7 @@ $options_form .= html_print_input_hidden('update_networkmap',1, true) .
html_print_input_hidden('hidden_options',0, true);
$options_form .= html_print_table ($table, true);
$options_form .= "<div style='width: " . $table->width . "; text-align: right;'>" .
html_print_submit_button (__('Apply'), "updbutton", false, 'class="sub next"', true) .
html_print_submit_button (__('Refresh'), "updbutton", false, 'class="sub next"', true) .
"</div>";
$options_form .= '</form>';