X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fsqlradius.cgi;fp=httemplate%2Fsearch%2Fsqlradius.cgi;h=604f44ea0bbf6dc4227e63ff6a7eb9dc2df6d931;hp=f7873e72fbf37ef5e4121b444a1ed6fe16c50177;hb=b95256aad16c4bdafd089d26c0f9147f3ec7755e;hpb=dbf543b4433ed8dc96211fe1f18fd2f95db3ca7e diff --git a/httemplate/search/sqlradius.cgi b/httemplate/search/sqlradius.cgi index f7873e72f..604f44ea0 100644 --- a/httemplate/search/sqlradius.cgi +++ b/httemplate/search/sqlradius.cgi @@ -13,17 +13,6 @@ % 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', -% }, -% ); -% } <% $part_export->exportname || $part_export->exporttype |h %> @@ -384,6 +373,37 @@ tie %fields, 'Tie::IxHash', }, 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. ' ('. + (Net::MAC::Vendor::lookup($1))->[0]. + ')'; + + } + 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. ' ('. + (Net::MAC::Vendor::lookup($1))->[0]. + ')'; + } + length($dst) ? $dst : ' '; + }, + align => 'left', + }, 'acctstarttime' => { name => 'Start time', attrib => 'Acct-Start-Time',