mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2011-12-21 Vanessa Gil <vanessa.gil@artica.es>
* operation/netflow/nf_view.php godmode/netflow/nf_report_item.php godmode/netflow/nf_report.php: Allow repeat filters in reports. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5293 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ddf147ddbd
commit
d15dfd4b82
@ -1,3 +1,9 @@
|
|||||||
|
2011-12-21 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
* operation/netflow/nf_view.php
|
||||||
|
godmode/netflow/nf_report_item.php
|
||||||
|
godmode/netflow/nf_report.php: Allow repeat filters
|
||||||
|
in reports.
|
||||||
|
|
||||||
2011-12-21 Vanessa Gil <vanessa.gil@artica.es>
|
2011-12-21 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
* godmode/netflow/nf_edit.php
|
* godmode/netflow/nf_edit.php
|
||||||
godmode/netflow/nf_edit_form.php
|
godmode/netflow/nf_edit_form.php
|
||||||
|
@ -98,7 +98,7 @@ $reports_item = db_get_all_rows_sql('
|
|||||||
WHERE id_report = ' . $id);
|
WHERE id_report = ' . $id);
|
||||||
|
|
||||||
if ($reports_item === false)
|
if ($reports_item === false)
|
||||||
$filter = array ();
|
$reports_item = array ();
|
||||||
|
|
||||||
$table->width = '90%';
|
$table->width = '90%';
|
||||||
$table->head = array ();
|
$table->head = array ();
|
||||||
|
@ -86,7 +86,7 @@ $filter['limit'] = (int) $config['block_size'];
|
|||||||
$reports = db_get_all_rows_filter ('tnetflow_report', $filter);
|
$reports = db_get_all_rows_filter ('tnetflow_report', $filter);
|
||||||
|
|
||||||
if ($reports === false)
|
if ($reports === false)
|
||||||
$filter = array ();
|
$reports = array();
|
||||||
|
|
||||||
$table->width = '80%';
|
$table->width = '80%';
|
||||||
$table->head = array ();
|
$table->head = array ();
|
||||||
@ -148,10 +148,6 @@ echo '<form method="post" action="index.php?sec=netf&sec2=godmode/netflow/nf_rep
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
$(document).ready (function () {
|
|
||||||
$("textarea").TextAreaResizer ();
|
|
||||||
});
|
|
||||||
|
|
||||||
function check_all_checkboxes() {
|
function check_all_checkboxes() {
|
||||||
if ($("input[name=all_delete]").attr('checked')) {
|
if ($("input[name=all_delete]").attr('checked')) {
|
||||||
$(".check_delete").attr('checked', true);
|
$(".check_delete").attr('checked', true);
|
||||||
|
@ -102,17 +102,6 @@ if ($create){
|
|||||||
$timedate = $date .".".$time;
|
$timedate = $date .".".$time;
|
||||||
$date_time = strtotime ($date." ".$time);
|
$date_time = strtotime ($date." ".$time);
|
||||||
|
|
||||||
$sql1 = "select id_filter from tnetflow_report_content where id_report='".$id."'";
|
|
||||||
$filters_aux = db_get_all_rows_sql($sql1);
|
|
||||||
$exist = false;
|
|
||||||
foreach($filters_aux as $filter_aux){
|
|
||||||
if ($name_filter == $filter_aux['id_filter']){
|
|
||||||
$exist = true;
|
|
||||||
echo '<h3 class="error">'.__ ('Error creating item. Filter already exists.').'</h3>';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$exist){
|
|
||||||
$values = array (
|
$values = array (
|
||||||
'id_report' => $id,
|
'id_report' => $id,
|
||||||
'id_filter' => $name_filter,
|
'id_filter' => $name_filter,
|
||||||
@ -128,7 +117,7 @@ if ($create){
|
|||||||
else
|
else
|
||||||
echo '<h3 class="suc">'.__ ('Item created successfully').'</h3>';
|
echo '<h3 class="suc">'.__ ('Item created successfully').'</h3>';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$table->width = '80%';
|
$table->width = '80%';
|
||||||
$table->border = 0;
|
$table->border = 0;
|
||||||
$table->cellspacing = 3;
|
$table->cellspacing = 3;
|
||||||
|
@ -2056,7 +2056,9 @@ echo"<h4>Gráfica de área</h4>";
|
|||||||
|
|
||||||
// Average
|
// Average
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
|
if (isset($chart[$timestamp_short][$ag])){
|
||||||
$chart[$timestamp_short][$ag] = $chart[$timestamp_short][$ag]/$count;
|
$chart[$timestamp_short][$ag] = $chart[$timestamp_short][$ag]/$count;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$chart[$timestamp_short][$ag] = 0;
|
$chart[$timestamp_short][$ag] = 0;
|
||||||
}
|
}
|
||||||
@ -2235,7 +2237,6 @@ function grafico_netflow_aggregate_pie ($data) {
|
|||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
html_debug_print($values);
|
|
||||||
return pie3d_graph($config['flash_charts'], $values, 320, 200,
|
return pie3d_graph($config['flash_charts'], $values, 320, 200,
|
||||||
__('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png",
|
__('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png",
|
||||||
$config['fontpath'], $config['font_size']);
|
$config['fontpath'], $config['font_size']);
|
||||||
|
@ -39,6 +39,9 @@ $filter['offset'] = (int) get_parameter ('offset');
|
|||||||
$filter['limit'] = (int) $config['block_size'];
|
$filter['limit'] = (int) $config['block_size'];
|
||||||
|
|
||||||
$reports = db_get_all_rows_filter ('tnetflow_report', $filter);
|
$reports = db_get_all_rows_filter ('tnetflow_report', $filter);
|
||||||
|
if ($reports == false){
|
||||||
|
$reports = array();
|
||||||
|
}
|
||||||
|
|
||||||
$table->width = '98%';
|
$table->width = '98%';
|
||||||
$table->head = array ();
|
$table->head = array ();
|
||||||
|
@ -220,13 +220,14 @@ echo'</form>';
|
|||||||
|
|
||||||
if ($id!=''){
|
if ($id!=''){
|
||||||
echo"<h3>$report_name</h3>";
|
echo"<h3>$report_name</h3>";
|
||||||
$sql1 = "select id_filter from tnetflow_report_content where id_report='".$id."'";
|
|
||||||
$all_filters = db_get_all_rows_sql($sql1);
|
$sql1 = "select id_rc from tnetflow_report_content where id_report='".$id."'";
|
||||||
|
$all_rcs = db_get_all_rows_sql($sql1);
|
||||||
|
|
||||||
$x = 0;
|
$x = 0;
|
||||||
while(isset($all_filters[$x]['id_filter'])) {
|
while(isset($all_rcs[$x]['id_rc'])) {
|
||||||
$filter = $all_filters[$x]['id_filter'];
|
$rc = $all_rcs[$x]['id_rc'];
|
||||||
$sql = "SELECT * FROM tnetflow_report_content WHERE id_report='".$id."' and id_filter='".$filter."'";
|
$sql = "SELECT * FROM tnetflow_report_content WHERE id_rc='".$rc."'";
|
||||||
|
|
||||||
$content_report = db_get_row_sql($sql);
|
$content_report = db_get_row_sql($sql);
|
||||||
$name_filter = $content_report['id_filter'];
|
$name_filter = $content_report['id_filter'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user