% delete $efields{'framedipaddress'} if $part_export->option('hide_ip');
% if ( $part_export->option('hide_data') ) {
% delete $efields{$_} foreach qw(acctinputoctets acctoutputoctets);
-% }
-% if ( $part_export->option('show_called_station') ) {
-% $efields->Splice(1, 0,
-% 'calledstationid' => {
-% 'name' => 'Destination',
-% 'attrib' => 'Called-Station-ID',
-% 'fmt' =>
-% sub { length($_[0]) ? shift : ' '; },
-% 'align' => 'left',
-% },
-% );
% }
<FONT CLASS="fsinnerbox-title">
my $octets_format = sub {
my $octets = shift;
- my $megs = $octets / 1048576;
- sprintf('<B>%.3f</B> megs', $megs);
- #my $gigs = $octets / 1073741824
- #sprintf('<B>%.3f</B> gigabytes', $gigs);
+ #my $megs = $octets / 1048576;
+ #sprintf('<B>%.3f</B> megs', $megs);
+ my $gigs = $octets / 1073741824;
+ sprintf('<B>%.3f</B> gigs', $gigs);
};
###
},
align => 'right',
},
+ 'callingstationid' => {
+ name => 'Source or MAC',
+ attrib => 'Calling-Station-Id',
+ fmt => sub {
+ my $src = shift;
+ if ( $src =~
+ /^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
+ return $src. ' <span style="white-space: nowrap">('.
+ (Net::MAC::Vendor::lookup($1))->[0].
+ ')</span>';
+
+ }
+ length($src) ? $src : ' ';
+ },
+ align => 'right',
+ },
+ 'calledstationid' => {
+ name => 'Destination',
+ attrib => 'Called-Station-ID',
+ fmt => sub {
+ my $dst = shift;
+ if ( $dst =~
+ /^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
+ return $dst. ' <span style="white-space: nowrap">('.
+ (Net::MAC::Vendor::lookup($1))->[0].
+ ')</span>';
+ }
+ length($dst) ? $dst : ' ';
+ },
+ align => 'left',
+ },
'acctstarttime' => {
name => 'Start time',
attrib => 'Acct-Start-Time',