X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-torrus_serviceid.html;h=e13a6e80d1b1a44dffa64de48a94b342624fac8d;hb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;hp=34e8e930f08c23e16c22b3319aebeb4b0cb5840f;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git
diff --git a/httemplate/elements/select-torrus_serviceid.html b/httemplate/elements/select-torrus_serviceid.html
index 34e8e930f..e13a6e80d 100644
--- a/httemplate/elements/select-torrus_serviceid.html
+++ b/httemplate/elements/select-torrus_serviceid.html
@@ -4,7 +4,7 @@
% }
-% foreach my $serviceid ( keys %serviceid ) {
+% foreach my $serviceid ( @serviceids ) {
@@ -18,15 +18,7 @@ my %opt = @_;
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>