summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/search/sqlradius.cgi16
-rw-r--r--httemplate/view/elements/svc_radius_usage.html8
2 files changed, 12 insertions, 12 deletions
diff --git a/httemplate/search/sqlradius.cgi b/httemplate/search/sqlradius.cgi
index 604f44ea0..5d6aeea1e 100644
--- a/httemplate/search/sqlradius.cgi
+++ b/httemplate/search/sqlradius.cgi
@@ -302,10 +302,10 @@ my $duration_format = sub {
my $octets_format = sub {
my $octets = shift;
- my $megs = $octets / 1048576;
- sprintf('<B>%.3f</B>&nbsp;megs', $megs);
- #my $gigs = $octets / 1073741824
- #sprintf('<B>%.3f</B> gigabytes', $gigs);
+ #my $megs = $octets / 1048576;
+ #sprintf('<B>%.3f</B>&nbsp;megs', $megs);
+ my $gigs = $octets / 1073741824;
+ sprintf('<B>%.3f</B>&nbsp;gigs', $gigs);
};
###
@@ -380,9 +380,9 @@ tie %fields, 'Tie::IxHash',
my $src = shift;
if ( $src =~
/^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
- return $src. ' ('.
+ return $src. ' <span style="white-space: nowrap">('.
(Net::MAC::Vendor::lookup($1))->[0].
- ')';
+ ')</span>';
}
length($src) ? $src : '&nbsp';
@@ -396,9 +396,9 @@ tie %fields, 'Tie::IxHash',
my $dst = shift;
if ( $dst =~
/^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
- return $dst. ' ('.
+ return $dst. ' <span style="white-space: nowrap">('.
(Net::MAC::Vendor::lookup($1))->[0].
- ')';
+ ')</span>';
}
length($dst) ? $dst : '&nbsp';
},
diff --git a/httemplate/view/elements/svc_radius_usage.html b/httemplate/view/elements/svc_radius_usage.html
index 08d6d53d3..471969175 100644
--- a/httemplate/view/elements/svc_radius_usage.html
+++ b/httemplate/view/elements/svc_radius_usage.html
@@ -21,10 +21,10 @@
%
% my $input = $svc->attribute_since_sqlradacct(
% $last_bill, time, 'AcctInputOctets'
-% ) / 1048576;
+% ) / 1073741824;
% my $output = $svc->attribute_since_sqlradacct(
% $last_bill, time, 'AcctOutputOctets'
-% ) / 1048576;
+% ) / 1073741824;
%
% my $last_mac = $svc->attribute_last_sqlradacct( 'CallingStationId' );
% if ( $last_mac =~ /^\s*(([\dA-F]{2}[\-:]){5}[\dA-F]{2})/i ) {
@@ -57,8 +57,8 @@
% }
- Upload: <B><% sprintf("%.3f", $input) %></B> megabytes<BR>
- Download: <B><% sprintf("%.3f", $output) %></B> megabytes<BR>
+ Upload: <B><% sprintf("%.3f", $input) %></B> gigabytes<BR>
+ Download: <B><% sprintf("%.3f", $output) %></B> gigabytes<BR>
% if ( $svc->table eq 'svc_acct' ) {
Last Login: <B><% $svc->last_login_text %></B><BR>
% }