[freeside-commits] freeside/httemplate/view svc_port.cgi,1.4,1.5
Ivan,,,
ivan at wavetail.420.am
Fri Feb 25 18:06:43 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv3672
Modified Files:
svc_port.cgi
Log Message:
fix error on port view when you haven't selected a torrus serviceid yet
Index: svc_port.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_port.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- svc_port.cgi 7 Feb 2011 23:22:34 -0000 1.4
+++ svc_port.cgi 26 Feb 2011 02:06:41 -0000 1.5
@@ -39,7 +39,8 @@
my $graph = '';
my $nms = new FS::NetworkMonitoringSystem;
- my $link = $nms->port_graphs_link($svc_port->serviceid);
+ my $url = $nms->port_graphs_link($svc_port->serviceid);
+ my $link = $url ? qq(<A HREF="$url">Torrus Graphs</A><BR><BR>) : '';
if($start && $end) {
$graph = "<BR><BR><IMG SRC=${p}/view/port_graph.html?svcnum=$svcnum;".
@@ -55,7 +56,7 @@
</script>
<FORM ACTION=? METHOD="GET">
<INPUT TYPE="HIDDEN" NAME="svcnum" VALUE="'.$svcnum.'">
- <A HREF="'.$link.'">Torrus Graphs</A><BR><BR>
+ '.$link.'
<B>Bandwidth Graph</B><BR>
'.preset_range($default_start,$default_end,'Last Day',$date_format)
.' | '.preset_range($default_end-86400*7,$default_end,'Last Week',$date_format)
More information about the freeside-commits
mailing list