X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_broadband.cgi;h=ae23386a18b56525c99f35ee307bf3f624b36122;hp=156edfaec4610642e82c6232a25d38a15adf7a97;hb=55263a2dfeb16ea313c5aed37ed30686c946a299;hpb=44398c83f25bf4e43838df9f39331c29fdeff19d diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi index 156edfaec..ae23386a1 100644 --- a/httemplate/view/svc_broadband.cgi +++ b/httemplate/view/svc_broadband.cgi @@ -20,56 +20,123 @@ if ($pkgnum) { } #eofalse -my $ac = qsearchs('ac', { acnum => $svc_broadband->getfield('acnum') }); +my $router = $svc_broadband->addr_block->router; + +if (not $router) { die "Could not lookup router for svc_broadband (svcnum $svcnum)" }; my ( - $acname, - $acnum, + $routername, + $routernum, $speed_down, $speed_up, - $ip_addr, - $ip_netmask, - $mac_addr, - $location + $ip_addr ) = ( - $ac->getfield('acname'), - $ac->getfield('acnum'), + $router->getfield('routername'), + $router->getfield('routernum'), $svc_broadband->getfield('speed_down'), $svc_broadband->getfield('speed_up'), - $svc_broadband->getfield('ip_addr'), - $svc_broadband->getfield('ip_netmask'), - $svc_broadband->getfield('mac_addr'), - $svc_broadband->getfield('location') + $svc_broadband->getfield('ip_addr') ); +%> -print header('Broadband Service View', menubar( +<%=header('Broadband Service View', menubar( ( ( $custnum ) - ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", + ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", ) : ( "Cancel this (unaudited) website" => "${p}misc/cancel-unaudited.cgi?$svcnum" ) ), "Main menu" => $p, -)). - qq!Edit this information
!. - ntable("#cccccc"). ''. ntable("#cccccc",2). - qq!Service number!. - qq!$svcnum!. - qq!AC!. - qq!$acnum: $acname!. - qq!Download Speed!. - qq!$speed_down!. - qq!Upload Speed!. - qq!$speed_up!. - qq!IP Address/Mask!. - qq!$ip_addr/$ip_netmask!. - qq!MAC Address!. - qq!$mac_addr!. - qq!Location!. - qq!
$location
!. - ''. - '
'. joblisting({'svcnum'=>$svcnum}, 1). - '' -; +)) +%> + +Edit this information +
+<%=ntable("#cccccc")%> + + + <%=ntable("#cccccc",2)%> + + Service number + <%=$svcnum%> + + + Router + <%=$routernum%>: <%=$routername%> + + + Download Speed + <%=$speed_down%> + + + Upload Speed + <%=$speed_up%> + + + IP Address + <%=$ip_addr%> + + + +<% +foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) { + print $svc_broadband->pvf($_)->widget('HTML', 'view', + $svc_broadband->getfield($_)), "\n"; +} + +%> + + + + + +
+<%=ntable("#cccccc", 2)%> +<% + my $sb_router = qsearchs('router', { svcnum => $svcnum }); + if ($sb_router) { + %> + Router associated: <%=$sb_router->routername%> + + (details) + +
+ <% my @addr_block; + if (@addr_block = $sb_router->addr_block) { + %> + Address space + + (edit) + +
+ <% print ntable("#cccccc", 1); + foreach (@addr_block) { %> + + <%=$_->ip_gateway%>/<%=$_->ip_netmask%> + + <% } %> + + <% } else { %> + No address space allocated. + <% } %> +
+ <% + } else { %> + +
+ +Add router named + + +
+ +<% +} +%> + +
+<%=joblisting({'svcnum'=>$svcnum}, 1)%> + + +