projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
httemplate
/
view
/
svc_broadband.cgi
diff --git
a/httemplate/view/svc_broadband.cgi
b/httemplate/view/svc_broadband.cgi
index
05ae632
..
75e673c
100644
(file)
--- a/
httemplate/view/svc_broadband.cgi
+++ b/
httemplate/view/svc_broadband.cgi
@@
-17,7
+17,6
@@
my %labels = map { $_ => ( ref($fields->{$_})
#my %labels = ();
$labels{'description'} = emt('Description');
#my %labels = ();
$labels{'description'} = emt('Description');
-$labels{'router'} = emt('Router');
$labels{'speed_down'} = emt('Download Speed');
$labels{'speed_up'} = emt('Upload Speed');
$labels{'ip_addr'} = emt('IP Address');
$labels{'speed_down'} = emt('Download Speed');
$labels{'speed_up'} = emt('Upload Speed');
$labels{'ip_addr'} = emt('IP Address');
@@
-32,7
+31,7
@@
my @fields = (
'speed_up',
{ field => 'ip_addr', value => \&ip_addr },
{ field => 'sectornum', value => \§ornum },
'speed_up',
{ field => 'ip_addr', value => \&ip_addr },
{ field => 'sectornum', value => \§ornum },
-
'mac_addr'
,
+
{ field => 'mac_addr', value => \&mac_addr }
,
#'latitude',
#'longitude',
{ field => 'coordinates', value => \&coordinates },
#'latitude',
#'longitude',
{ field => 'coordinates', value => \&coordinates },
@@
-48,10
+47,11
@@
push @fields,
sub router {
my $svc = shift;
sub router {
my $svc = shift;
- my $router = $svc->router
or return ''
;
+ my $router = $svc->router;
my $block = $svc->addr_block;
my $block = $svc->addr_block;
+ $router = $router->routernum . ': ' . $router->routername if $router;
$block = '; '.$block->cidr if $block;
$block = '; '.$block->cidr if $block;
- $router
->routernum . ': ' . $router->routername
. $block
+ $router . $block
}
sub ip_addr {
}
sub ip_addr {
@@
-67,6
+67,11
@@
sub ip_addr {
$out;
}
$out;
}
+sub mac_addr {
+ my $svc = shift;
+ join(':', $svc->mac_addr =~ /../g);
+}
+
sub usergroup {
my $svc = shift;
my $usergroup = $svc->usergroup;
sub usergroup {
my $svc = shift;
my $usergroup = $svc->usergroup;
@@
-89,14
+94,22
@@
sub coordinates {
return '' unless $s->latitude && $s->longitude;
my $d = $s->description;
return '' unless $s->latitude && $s->longitude;
my $d = $s->description;
+ my $agentnum;
unless ($d) {
unless ($d) {
- my $cust_pkg = $s->cust_svc->cust_pkg;
- $d = $cust_pkg->cust_main->name_short if $cust_pkg;
+ if ( my $cust_pkg = $s->cust_svc->cust_pkg ) {
+ $d = $cust_pkg->cust_main->name_short;
+ $agentnum = $cust_pkg->cust_main->agentnum;
+ }
}
#'Latitude: '. $s->latitude. ', Longitude: '. $s->longitude. ' '.
$s->latitude. ', '. $s->longitude. ' '.
}
#'Latitude: '. $s->latitude. ', Longitude: '. $s->longitude. ' '.
$s->latitude. ', '. $s->longitude. ' '.
- include('/elements/coord-links.html', $s->latitude, $s->longitude, $d);
+ include('/elements/coord-links.html',
+ $s->latitude,
+ $s->longitude,
+ $d,
+ $agentnum
+ );
}
sub svc_callback {
}
sub svc_callback {