[freeside-commits] freeside/httemplate/elements select-torrus_serviceid.html, 1.2, 1.3 checkboxes.html, 1.2, 1.3 checkboxes-table-name.html, 1.5, 1.6
Ivan,,,
ivan at wavetail.420.am
Sat Feb 26 16:49:50 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv19842/httemplate/elements
Modified Files:
select-torrus_serviceid.html checkboxes.html
checkboxes-table-name.html
Log Message:
torrus virtual ports, RT#10574
Index: select-torrus_serviceid.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/select-torrus_serviceid.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- select-torrus_serviceid.html 24 Jan 2011 02:59:48 -0000 1.2
+++ select-torrus_serviceid.html 27 Feb 2011 00:49:48 -0000 1.3
@@ -4,7 +4,7 @@
<OPTION VALUE="">Select serviceid</OPTION>
% }
-% foreach my $serviceid ( keys %serviceid ) {
+% foreach my $serviceid ( @serviceids ) {
<OPTION VALUE="<%$serviceid%>"
<% $serviceid eq $value ? 'SELECTED' : '' %>
><% $serviceid %></OPTION>
@@ -18,15 +18,7 @@
my $value = $opt{'curr_value'} || $opt{'value'};
-#is this going to get too slow or will the index make it okay?
-my $sth = dbh->prepare("SELECT DISTINCT(serviceid) FROM srvexport")
- or die dbh->errstr;
-$sth->execute or die $sth->errstr;
-my %serviceid = ();
-while ( my $row = $sth->fetchrow_arrayref ) {
- my $serviceid = $row->[0];
- $serviceid =~ s/_(IN|OUT)$//;
- $serviceid{$serviceid}=1;
-}
+my $nms = new FS::NetworkMonitoringSystem;
+my @serviceids = $nms->torrus_serviceids;
</%init>
Index: checkboxes.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/checkboxes.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- checkboxes.html 5 Jul 2009 21:35:52 -0000 1.2
+++ checkboxes.html 27 Feb 2011 00:49:48 -0000 1.3
@@ -29,6 +29,8 @@
<TABLE CELLSPACING=0 CELLPADDING=0>
+% unless ( $opt{'disable_links'} ) {
+
<TR>
<TD COLSPAN=2 ALIGN="center"><FONT SIZE="-1">(
<A HREF="javascript:setAll<%$prefix%>(true)">select all</A> |
@@ -37,6 +39,8 @@
)</FONT></TD>
</TR>
+% }
+
% my $num=0;
% foreach my $item ( @{ $opt{'names_list'} } ) {
%
Index: checkboxes-table-name.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/checkboxes-table-name.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- checkboxes-table-name.html 5 Jan 2009 00:26:53 -0000 1.5
+++ checkboxes-table-name.html 27 Feb 2011 00:49:48 -0000 1.6
@@ -45,6 +45,7 @@
'names_list' => $opt{'names_list'},
'checked_callback' => $checked_callback,
'element_name_prefix' => $opt{'link_table'}. '.',
+ 'disable_links' => $opt{'disable_links'},
)
%>
More information about the freeside-commits
mailing list