2012-11-29 Sergio Martin <sergio.martin@artica.es>

* operation/netflow/nf_live_view.php
	godmode/netflow/nf_edit_form.php
	godmode/netflow/nf_edit.php: Pass the parameter pure 
	to keep full screen



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7201 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2012-11-29 10:30:46 +00:00
parent 37ea4a197a
commit 90a0c45ea7
4 changed files with 22 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2012-11-29 Sergio Martin <sergio.martin@artica.es>
* operation/netflow/nf_live_view.php
godmode/netflow/nf_edit_form.php
godmode/netflow/nf_edit.php: Pass the parameter pure
to keep full screen
2012-11-28 Sergio Martin <sergio.martin@artica.es> 2012-11-28 Sergio Martin <sergio.martin@artica.es>
* include/functions_ui.php * include/functions_ui.php

View File

@ -29,6 +29,8 @@ if (! check_acl ($config["id_user"], 0, "AW")) {
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }
$pure = get_parameter('pure', 0);
//Header //Header
if (! defined ('METACONSOLE')) { if (! defined ('METACONSOLE')) {
@ -131,13 +133,10 @@ $total_filters = $total_filters[0]['total'];
foreach ($filters as $filter) { foreach ($filters as $filter) {
$data = array (); $data = array ();
$data[0] = '<a href="' . $config['homeurl'] . 'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&id='.$filter['id_sg'].'">'.$filter['id_name'].'</a>'; $data[0] = '<a href="' . $config['homeurl'] . 'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&id='.$filter['id_sg'].'&pure='.$pure.'">'.$filter['id_name'].'</a>';
$group = db_get_value('nombre','tgrupo', 'id_grupo', $filter['id_group']); $data[1] = ui_print_group_icon($filter['id_group'], true, "groups_small", '', !defined('METACONSOLE'));
if ($group == '')
$group = 'All';
$data[1] = $group;
$data[2] = "<a onclick='if(confirm(\"" . __('Are you sure?') . "\")) return true; else return false;' $data[2] = "<a onclick='if(confirm(\"" . __('Are you sure?') . "\")) return true; else return false;'
href='" . $config['homeurl'] . "index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id=".$filter['id_sg']."&offset=0'>" . href='" . $config['homeurl'] . "index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id=".$filter['id_sg']."&offset=0&pure=$pure'>" .
html_print_image('images/cross.png', true, array('title' => __('Delete'))) . "</a>" . html_print_image('images/cross.png', true, array('title' => __('Delete'))) . "</a>" .
html_print_checkbox_extended ('delete_multiple[]', $filter['id_sg'], false, false, '', 'class="check_delete"', true); html_print_checkbox_extended ('delete_multiple[]', $filter['id_sg'], false, false, '', 'class="check_delete"', true);
@ -145,7 +144,7 @@ foreach ($filters as $filter) {
} }
if(isset($data)) { if(isset($data)) {
echo "<form method='post' action='" . $config['homeurl'] . "index.php?sec=netf&sec2=godmode/netflow/nf_edit'>"; echo "<form method='post' action='" . $config['homeurl'] . "index.php?sec=netf&sec2=godmode/netflow/nf_edit&pure=$pure'>";
html_print_input_hidden('multiple_delete', 1); html_print_input_hidden('multiple_delete', 1);
html_print_table ($table); html_print_table ($table);
echo "<div style='padding-bottom: 20px; text-align: right; width:" . $table->width . "'>"; echo "<div style='padding-bottom: 20px; text-align: right; width:" . $table->width . "'>";
@ -157,7 +156,7 @@ else {
echo "<div class='nf'>".__('There are no defined filters')."</div>"; echo "<div class='nf'>".__('There are no defined filters')."</div>";
} }
echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">'; echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&pure='.$pure.'">';
echo "<div style='padding-bottom: 20px; text-align: right; width:" . $table->width . "'>"; echo "<div style='padding-bottom: 20px; text-align: right; width:" . $table->width . "'>";
html_print_submit_button (__('Create filter'), 'crt', false, 'class="sub wand"'); html_print_submit_button (__('Create filter'), 'crt', false, 'class="sub wand"');
echo "</div>"; echo "</div>";

View File

@ -36,6 +36,8 @@ $name = db_get_value('id_name', 'tnetflow_filter', 'id_sg', $id);
$update = (string)get_parameter('update', 0); $update = (string)get_parameter('update', 0);
$create = (string)get_parameter('create', 0); $create = (string)get_parameter('create', 0);
$pure = get_parameter('pure', 0);
if ($id){ if ($id){
$permission = netflow_check_filter_group ($id); $permission = netflow_check_filter_group ($id);
if (!$permission) { //no tiene permisos para acceder a un filtro if (!$permission) { //no tiene permisos para acceder a un filtro
@ -61,6 +63,8 @@ if (! defined ('METACONSOLE')) {
array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_edit_form', 'text' => __('Add filter'))); array('link' => 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_edit_form', 'text' => __('Add filter')));
ui_meta_print_page_header($nav_bar); ui_meta_print_page_header($nav_bar);
ui_meta_print_header(__("Netflow filters"));
} }
if ($id) { if ($id) {
@ -215,7 +219,7 @@ $show_output = array();
$show_output = array ('packets' => __('Packets'), 'bytes' => __('Bytes'), 'flows' =>__('Flows')); $show_output = array ('packets' => __('Packets'), 'bytes' => __('Bytes'), 'flows' =>__('Flows'));
$table->data[9][1] = html_print_select ($show_output, 'output', $output, '', '', 0, true, false, true, '', false); $table->data[9][1] = html_print_select ($show_output, 'output', $output, '', '', 0, true, false, true, '', false);
echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_edit_form">'; echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=' . $config['homedir'] . '/godmode/netflow/nf_edit_form&pure='.$pure.'">';
html_print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id) { if ($id) {

View File

@ -31,6 +31,8 @@ if (! check_acl ($config["id_user"], 0, "AR")) {
return; return;
} }
$pure = get_parameter('pure', 0);
// Ajax callbacks // Ajax callbacks
if (is_ajax()){ if (is_ajax()){
$get_filter_type = get_parameter('get_filter_type', 0); $get_filter_type = get_parameter('get_filter_type', 0);
@ -139,7 +141,7 @@ else if ($update != '' && check_acl ($config["id_user"], 0, "AW")) {
// The filter name will not be needed anymore // The filter name will not be needed anymore
$filter['id_name'] = ''; $filter['id_name'] = '';
echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=operation/netflow/nf_live_view">'; echo '<form method="post" action="' . $config['homeurl'] . 'index.php?sec=netf&sec2=operation/netflow/nf_live_view&pure='.$pure.'">';
// Chart options table // Chart options table
$table->width = '100%'; $table->width = '100%';