[freeside-commits] branch FREESIDE_2_3_BRANCH updated. afc580a583985de909ca9a9e60f15ceb38b5557a
Mark Wells
mark at 420.am
Tue Oct 2 14:27:59 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via afc580a583985de909ca9a9e60f15ceb38b5557a (commit)
from 8b1ba5b29a5bdc0968e0ac9f0f1591a5d6badbd2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit afc580a583985de909ca9a9e60f15ceb38b5557a
Author: Mark Wells <mark at freeside.biz>
Date: Tue Oct 2 14:27:38 2012 -0700
DMA Radius Manager export, #18456
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index c932d7f..4e13951 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -2454,6 +2454,8 @@ sub tables_hashref {
'groupname', 'varchar', '', $char_d, '', '',
'description', 'varchar', 'NULL', $char_d, '', '',
'priority', 'int', '', '', '1', '',
+ 'speed_up', 'int', 'NULL', '', '', '',
+ 'speed_down', 'int', 'NULL', '', '', '',
],
'primary_key' => 'groupnum',
'unique' => [ ['groupname'] ],
diff --git a/FS/FS/radius_group.pm b/FS/FS/radius_group.pm
index 37aa0f3..f1a4efe 100644
--- a/FS/FS/radius_group.pm
+++ b/FS/FS/radius_group.pm
@@ -47,6 +47,8 @@ description
priority - for export
+=item speed_up, speed_down - connection speeds in bits per second. Some
+exports may use this to generate appropriate RADIUS attributes.
=back
@@ -176,6 +178,8 @@ sub check {
|| $self->ut_text('groupname')
|| $self->ut_textn('description')
|| $self->ut_numbern('priority')
+ || $self->ut_numbern('speed_up')
+ || $self->ut_numbern('speed_down')
;
return $error if $error;
diff --git a/httemplate/browse/radius_group.html b/httemplate/browse/radius_group.html
index fbf6d37..98e81ab 100644
--- a/httemplate/browse/radius_group.html
+++ b/httemplate/browse/radius_group.html
@@ -5,15 +5,26 @@
'query' => { 'table' => 'radius_group' },
'count_query' => 'SELECT COUNT(*) FROM radius_group',
'header' => [ '#', 'RADIUS Group', 'Description', 'Priority',
- 'Check', 'Reply' ],
+ 'Check', 'Reply', 'Speed' ],
'fields' => [ 'groupnum',
'groupname',
'description',
'priority',
- $check_attr, $reply_attr
+ $check_attr, $reply_attr,
+ sub {
+ my $group = shift;
+ if ($group->speed_down and $group->speed_up) {
+ return join (' / ', $group->speed_down, $group->speed_up);
+ } elsif ( $group->speed_down ) {
+ return $group->speed_down . ' down';
+ } elsif ( $group->speed_up ) {
+ return $group->speed_up . ' up';
+ }
+ '';
+ },
],
- 'align' => 'lllcll',
- 'links' => [ $link, $link, '', '', '', '',
+ 'align' => 'lllcllc',
+ 'links' => [ $link, $link, '', '', '', '', ''
],
&>
<%init>
diff --git a/httemplate/edit/radius_group.html b/httemplate/edit/radius_group.html
index 0255611..2324a5e 100644
--- a/httemplate/edit/radius_group.html
+++ b/httemplate/edit/radius_group.html
@@ -7,6 +7,8 @@
'description' => 'Description',
'attrnum' => 'Attribute',
'priority' => 'Priority',
+ 'speed_down' => 'Download speed',
+ 'speed_up' => 'Upload speed',
},
'menubar' => \@menubar,
'edit_callback' => $edit_callback,
@@ -27,6 +29,16 @@
'size' => 2,
'colspan' => 6, # just to not interfere with radius_attr columns
},
+ { 'field' => 'speed_down',
+ 'type' => 'text',
+ 'size' => 8,
+ 'colspan' => 6,
+ },
+ { 'field' => 'speed_up',
+ 'type' => 'text',
+ 'size' => 8,
+ 'colspan' => 6,
+ },
{
'field' => 'attrnum',
'type' => 'radius_attr',
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Schema.pm | 2 ++
FS/FS/radius_group.pm | 4 ++++
httemplate/browse/radius_group.html | 19 +++++++++++++++----
httemplate/edit/radius_group.html | 12 ++++++++++++
4 files changed, 33 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list