X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fsqlradius.cgi;h=b506ba1cb1c80b42cee142f70208368e2725a112;hp=bb51acb7ae800e5a85659a411f3f4b826f738267;hb=6083603212ea08b80c0f48ad61f4421aae85c31d;hpb=8590a91eb0d64755dff5622a152ab6b5136d8520 diff --git a/httemplate/search/sqlradius.cgi b/httemplate/search/sqlradius.cgi index bb51acb7a..b506ba1cb 100644 --- a/httemplate/search/sqlradius.cgi +++ b/httemplate/search/sqlradius.cgi @@ -64,7 +64,7 @@ $svc_acct = $user2svc_acct{$user}; } else { my %search = (); - if ( $part_export->exporrtype eq 'sqlradius_withdomain' ) { + if ( $part_export->exporttype eq 'sqlradius_withdomain' ) { my $domain; if ( $user =~ /^([^@]+)\@([^@]+)$/ ) { $search{'username'} = $1; @@ -82,7 +82,8 @@ } elsif ( $part_export->exporttype eq 'sqlradius' ) { $search{'username'} = $user; } else { - die "guru meditation #420"; + die 'unknown export type '. $part_export->exporttype. + " for $part_export\n"; } if ( keys %search ) { my @svc_acct = @@ -125,7 +126,7 @@ my $time = shift; return ' ' if $time == 0; my $pretty = time2str('%T%P %a %b %o %Y', $time ); - $pretty =~ s/ (\d)(st|dn|rd|th)/ $1$2/; + $pretty =~ s/ (\d)(st|dn|rd|th)/$1$2/; $pretty; }; @@ -161,15 +162,18 @@ name => 'User', attrib => 'UserName', fmt => $user_format, + align => 'left', }, 'realm' => { name => 'Realm', attrib => 'Realm', + align => 'left', }, 'dummy' => { name => 'Customer', attrib => '', fmt => $customer_format, + align => 'left', }, 'framedipaddress' => { name => 'IP Address', @@ -177,31 +181,37 @@ fmt => sub { my $ip = shift; length($ip) ? $ip : ' '; }, + align => 'right', }, 'acctstarttime' => { name => 'Start time', attrib => 'Acct-Start-Time', fmt => $time_format, + align => 'left', }, 'acctstoptime' => { name => 'End time', attrib => 'Acct-Stop-Time', fmt => $time_format, + align => 'left', }, 'acctsessiontime' => { name => 'Duration', attrib => 'Acct-Session-Time', fmt => $duration_format, + align => 'right', }, 'acctinputoctets' => { name => 'Upload', # (from user)', attrib => 'Acct-Input-Octets', fmt => $octets_format, + align => 'right', }, 'acctoutputoctets' => { name => 'Download', # (to user)', attrib => 'Acct-Output-Octets', fmt => $octets_format, + align => 'right', }, ; $fields{$_}->{fmt} ||= sub { length($_[0]) ? shift : ' '; } @@ -233,7 +243,7 @@ ) { %> <% foreach my $field ( keys %fields ) { %> - + <%= &{ $fields{$field}->{fmt} }( $session->{$field}, $session, $part_export,