diff options
Diffstat (limited to 'httemplate/view')
-rw-r--r-- | httemplate/view/elements/svc_Common.html | 4 | ||||
-rw-r--r-- | httemplate/view/elements/svc_devices.html | 3 | ||||
-rw-r--r-- | httemplate/view/elements/svc_radius_usage.html | 7 | ||||
-rw-r--r-- | httemplate/view/svc_broadband.cgi | 1 |
4 files changed, 10 insertions, 5 deletions
diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index d7a1dcf30..296c27bbc 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -283,8 +283,8 @@ my $format_field = sub { } elsif ( $type eq 'checkbox' ) { $value = $value eq 'Y' ? emt('Yes') : emt('No'); } elsif ( $type =~ /(input-)?mac_addr/ and $value =~ /\w/) { - my $vendor = Net::MAC::Vendor::lookup($value)->[0]; - $value .= " ($vendor)" if $vendor; + my $vendor = Net::MAC::Vendor::lookup($value); + $value .= ' ('. $vendor->[0]. ')' if $vendor; $value = $m->scomp('/elements/mac_addr.html', $value); } diff --git a/httemplate/view/elements/svc_devices.html b/httemplate/view/elements/svc_devices.html index 899e6aa47..3d4e1bbc5 100644 --- a/httemplate/view/elements/svc_devices.html +++ b/httemplate/view/elements/svc_devices.html @@ -63,7 +63,8 @@ <% $td %><% $device->part_device->devicename |h %></TD> % } <% $td %><% $device->mac_addr_pretty %> - (<% (Net::MAC::Vendor::lookup($device->mac_addr_formatted('U',':')))->[0] %>) +% my $vendor = Net::MAC::Vendor::lookup($device->mac_addr_formatted('U',':')); + (<% $vendor ? $vendor->[0] : '' %>) </TD> <% $td %><% $export_links %></TD> <% $td %>( diff --git a/httemplate/view/elements/svc_radius_usage.html b/httemplate/view/elements/svc_radius_usage.html index 471969175..56198524c 100644 --- a/httemplate/view/elements/svc_radius_usage.html +++ b/httemplate/view/elements/svc_radius_usage.html @@ -27,8 +27,11 @@ % ) / 1073741824; % % my $last_mac = $svc->attribute_last_sqlradacct( 'CallingStationId' ); -% if ( $last_mac =~ /^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) { -% $last_mac .= ' ('. (Net::MAC::Vendor::lookup($1))->[0]. ')'; +% if ( $last_mac =~ /^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i +% && my $vendor = Net::MAC::Vendor::lookup($1) +% ) +% { +% $last_mac .= ' ('. $vendor->[0]. ')'; % } diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi index 4935a1096..bc272e844 100644 --- a/httemplate/view/svc_broadband.cgi +++ b/httemplate/view/svc_broadband.cgi @@ -72,6 +72,7 @@ sub ip_addr { my $out = $ip_addr; $out .= ' (' . include('/elements/popup_link-ping.html', ip => $ip_addr) . ')' if $ip_addr; + $out .= include('/elements/broadband_snmp_get-dialog.html', svc => $svc); if ($svc->cust_svc->part_svc->part_export('cacti')) { $out .= ' (<A HREF="' . popurl(2) |