From 3422ca1893d421e933f15670299b23c5f61f8f32 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 11 Dec 2013 14:59:21 -0800 Subject: [PATCH] RADIUS usage for svc_broadband: show on service view, RT#26451 --- httemplate/view/svc_acct/radius_usage.html | 77 ------------------------------ 1 file changed, 77 deletions(-) delete mode 100644 httemplate/view/svc_acct/radius_usage.html diff --git a/httemplate/view/svc_acct/radius_usage.html b/httemplate/view/svc_acct/radius_usage.html deleted file mode 100644 index e2253a34a..000000000 --- a/httemplate/view/svc_acct/radius_usage.html +++ /dev/null @@ -1,77 +0,0 @@ -% if ( $part_svc->part_export_usage ) { -% -% my $last_bill; -% my %plandata; -% if ( $cust_pkg ) { -% #false laziness w/httemplate/edit/part_pkg... this stuff doesn't really -% #belong in plan data -% %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); } -% split("\n", $cust_pkg->part_pkg->plandata ); -% -% $last_bill = $cust_pkg->last_bill; -% } else { -% $last_bill = 0; -% %plandata = (); -% } -% -% my $seconds = $svc_acct->seconds_since_sqlradacct( $last_bill, time ); -% my $hour = int($seconds/3600); -% my $min = int( ($seconds%3600) / 60 ); -% my $sec = $seconds%60; -% -% my $input = $svc_acct->attribute_since_sqlradacct( -% $last_bill, time, 'AcctInputOctets' -% ) / 1048576; -% my $output = $svc_acct->attribute_since_sqlradacct( -% $last_bill, time, 'AcctOutputOctets' -% ) / 1048576; -% -% - - - RADIUS session information
- <% ntable('#cccccc',2) %> - -% if ( $seconds ) { - - Online <% $hour %>h <% $min %>m <% $sec %>s -% } else { - - Has not logged on -% } -% if ( $cust_pkg ) { - - since last bill (<% time2str('%a %b %o %Y', $last_bill) %>) -% if ( length($plandata{recur_included_hours}) ) { - - - <% $plandata{recur_included_hours} %> total hours in plan -% } - -
-% } else { - - (no billing cycle available for unaudited account)
-% } - - - Upload: <% sprintf("%.3f", $input) %> megabytes
- Download: <% sprintf("%.3f", $output) %> megabytes
- Last Login: <% $svc_acct->last_login_text %>
-% my $href = qq!this billing cycle - | <% $href %>;begin=<% time-15552000 %>">past six months - | <% $href %>">all sessions - -
-% } -<%init> - -my %opt = @_; - -my $svc_acct = $opt{'svc_acct'}; -my $part_svc = $opt{'part_svc'}; -my $cust_pkg = $opt{'cust_pkg'}; - - -- 2.11.0