diff options
| author | Mark Wells <mark@freeside.biz> | 2012-10-02 14:27:38 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2012-10-02 14:27:38 -0700 |
| commit | afc580a583985de909ca9a9e60f15ceb38b5557a (patch) | |
| tree | efe5a6f13dd324aff204e572c20dd5800ed4fefb /httemplate | |
| parent | 8b1ba5b29a5bdc0968e0ac9f0f1591a5d6badbd2 (diff) | |
DMA Radius Manager export, #18456
Diffstat (limited to 'httemplate')
| -rw-r--r-- | httemplate/browse/radius_group.html | 19 | ||||
| -rw-r--r-- | httemplate/edit/radius_group.html | 12 |
2 files changed, 27 insertions, 4 deletions
diff --git a/httemplate/browse/radius_group.html b/httemplate/browse/radius_group.html index fbf6d3766..98e81ab86 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 025561159..2324a5ec7 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', |
