mirror of
https://github.com/nidebr/as-stats-gui.git
synced 2025-02-20 11:23:18 +08:00
fix some errors on linkusage page
This commit is contained in:
parent
902d6263d6
commit
f37a9352e7
@ -17,6 +17,8 @@ $show95th = true;
|
|||||||
$ntop = 20;
|
$ntop = 20;
|
||||||
$showv6 = true;
|
$showv6 = true;
|
||||||
$showtitledetail = true;
|
$showtitledetail = true;
|
||||||
|
$hidelinkusagename = false;
|
||||||
|
|
||||||
$vertical_label = true; # vertical IN/OUT label in graph
|
$vertical_label = true; # vertical IN/OUT label in graph
|
||||||
$brighten_negative = true; # brighten the "negative" part of graphs
|
$brighten_negative = true; # brighten the "negative" part of graphs
|
||||||
|
|
||||||
|
@ -54,6 +54,13 @@ $cmd = "$rrdtool graph - " .
|
|||||||
if (!$compat_rrdtool12)
|
if (!$compat_rrdtool12)
|
||||||
$cmd .= "--full-size-mode ";
|
$cmd .= "--full-size-mode ";
|
||||||
|
|
||||||
|
if ($vertical_label) {
|
||||||
|
if($outispositive)
|
||||||
|
$cmd .= "--vertical-label '<- IN | OUT ->' ";
|
||||||
|
else
|
||||||
|
$cmd .= "--vertical-label '<- OUT | IN ->' ";
|
||||||
|
}
|
||||||
|
|
||||||
if($showtitledetail && @$_GET['dname'] != "")
|
if($showtitledetail && @$_GET['dname'] != "")
|
||||||
$cmd .= "--title " . escapeshellarg($_GET['dname']) . " ";
|
$cmd .= "--title " . escapeshellarg($_GET['dname']) . " ";
|
||||||
else
|
else
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php include("func.inc"); ?>
|
<?php include("func.inc"); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
$selected_links = array();
|
||||||
$knownlinks = getknownlinks();
|
$knownlinks = getknownlinks();
|
||||||
$hours = 24;
|
$hours = 24;
|
||||||
if (@$_GET['numhours'])
|
if (@$_GET['numhours'])
|
||||||
@ -10,10 +11,10 @@ $i = 0;
|
|||||||
foreach ($knownlinks as $link) {
|
foreach ($knownlinks as $link) {
|
||||||
$class = (($i % 2) == 0) ? "" : "even";
|
$class = (($i % 2) == 0) ? "" : "even";
|
||||||
if ($showv6) {
|
if ($showv6) {
|
||||||
$list_img[$link['tag']] = '<img alt="link graph" src="linkgraph.php?link='.$link['tag'].'&numhours='.$hours.'&width='.$linkusage_graph_width.'&height='.$linkusage_graph_height.'&dname='.rawurlencode($link['descr'] . " - IPv4").'" width="'.$linkusage_graph_width.'" height="'.$linkusage_graph_height.'" border="0" />';
|
$list_img[$link['tag']] = '<img alt="link graph" src="linkgraph.php?link='.$link['tag'].'&numhours='.$hours.'&width='.$default_graph_width.'&height='.$default_graph_height.'&dname='.rawurlencode($link['descr'] . " - IPv4").'&v=4" width="'.$default_graph_width.'" height="'.$default_graph_height.'" border="0" />';
|
||||||
$list_img_v6[$link['tag']] = '<img alt="link graph" src="linkgraph.php?link='.$link['tag'].'&numhours='.$hours.'&width='.$linkusage_graph_width.'&height='.$linkusage_graph_height.'&dname='.rawurlencode($link['descr'] . " - IPv6").'&v=6" width="'.$linkusage_graph_width.'" height="'.$linkusage_graph_height.'" border="0" />';
|
$list_img_v6[$link['tag']] = '<img alt="link graph" src="linkgraph.php?link='.$link['tag'].'&numhours='.$hours.'&width='.$default_graph_width.'&height='.$default_graph_height.'&dname='.rawurlencode($link['descr'] . " - IPv6").'&v=6" width="'.$default_graph_width.'" height="'.$default_graph_height.'" border="0" />';
|
||||||
} else {
|
} else {
|
||||||
$list_img[$link['tag']] = '<img alt="link graph" src="linkgraph.php?link='.$link['tag'].'&numhours='.$hours.'&width='.$linkusage_graph_width.'&height='.$linkusage_graph_height.'&dname='.rawurlencode($link['descr']).'" width="'.$linkusage_graph_width.'" height="'.$linkusage_graph_height.'" border="0" />';
|
$list_img[$link['tag']] = '<img alt="link graph" src="linkgraph.php?link='.$link['tag'].'&numhours='.$hours.'&width='.$default_graph_width.'&height='.$default_graph_height.'&dname='.rawurlencode($link['descr']).'&v=4" width="'.$default_graph_width.'" height="'.$default_graph_height.'" border="0" />';
|
||||||
}
|
}
|
||||||
if ( ($showtitledetail && !$hidelinkusagename) || (!$showtitledetail) ) {
|
if ( ($showtitledetail && !$hidelinkusagename) || (!$showtitledetail) ) {
|
||||||
$txt_title[$link['tag']] = $link['descr'];
|
$txt_title[$link['tag']] = $link['descr'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user