summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-06-02 17:01:40 -0700
committerIvan Kohler <ivan@freeside.biz>2014-06-02 17:01:40 -0700
commit9b27a2b16c37b060ef48029581e4196990a9963b (patch)
tree2668cf4dc367afc1ec2cbbb951bd0ad9c82cd34f /httemplate
parente1e4c54b07804e5d9c3d9b45f8e82ccdbc902f90 (diff)
show MAC address vendors
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/view/elements/svc_Common.html11
-rw-r--r--httemplate/view/svc_broadband.cgi4
2 files changed, 10 insertions, 5 deletions
diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html
index d34ed509a..1818d34cf 100644
--- a/httemplate/view/elements/svc_Common.html
+++ b/httemplate/view/elements/svc_Common.html
@@ -107,9 +107,14 @@ function areyousure(href) {
%>
</TD>
-% $value = time2str($date_format,$value) if ( $type eq 'date' && $value );
-% $value = time2str("$date_format %H:%M",$value) if ( $type eq 'datetime' && $value );
-% $value = $value eq 'Y' ? emt('Yes') : emt('No') if ( $type eq 'checkbox' );
+% $value = time2str($date_format,$value)
+% if $type eq 'date' && $value;
+% $value = time2str("$date_format %H:%M",$value)
+% if $type eq 'datetime' && $value;
+% $value = $value eq 'Y' ? emt('Yes') : emt('No')
+% if $type eq 'checkbox';
+% $value .= ' ('. (Net::MAC::Vendor::lookup($value))->[0]. ')'
+% if $type =~ /mac_addr$/ && $value =~ /\w/i;
% #eventually more options for <SELECT>, etc. fields
<TD BGCOLOR="#ffffff"><% $value %><TD>
diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi
index 3325416b8..ec73c6d52 100644
--- a/httemplate/view/svc_broadband.cgi
+++ b/httemplate/view/svc_broadband.cgi
@@ -32,7 +32,7 @@ my @fields = (
'speed_up',
{ field => 'ip_addr', value_callback => \&ip_addr },
{ field => 'sectornum', value_callback => \&sectornum },
- { field => 'mac_addr', value_callback => \&mac_addr },
+ { field => 'mac_addr', type=>'mac_addr', value_callback => \&mac_addr },
#'latitude',
#'longitude',
{ field => 'coordinates', value_callback => \&coordinates },
@@ -78,7 +78,7 @@ sub ip_addr {
sub mac_addr {
my $svc = shift;
- join(':', $svc->mac_addr =~ /../g);
+ $svc->mac_addr_formatted('U',':');
}
sub usergroup {