summaryrefslogtreecommitdiff
path: root/httemplate/elements
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements')
-rw-r--r--httemplate/elements/checkboxes-table-name.html1
-rw-r--r--httemplate/elements/checkboxes.html4
-rw-r--r--httemplate/elements/menu.html13
-rw-r--r--httemplate/elements/select-torrus_serviceid.html14
4 files changed, 18 insertions, 14 deletions
diff --git a/httemplate/elements/checkboxes-table-name.html b/httemplate/elements/checkboxes-table-name.html
index 31652f330..8ee2f7736 100644
--- a/httemplate/elements/checkboxes-table-name.html
+++ b/httemplate/elements/checkboxes-table-name.html
@@ -45,6 +45,7 @@ Example:
'names_list' => $opt{'names_list'},
'checked_callback' => $checked_callback,
'element_name_prefix' => $opt{'link_table'}. '.',
+ 'disable_links' => $opt{'disable_links'},
)
%>
diff --git a/httemplate/elements/checkboxes.html b/httemplate/elements/checkboxes.html
index b120adab7..69ef18fb9 100644
--- a/httemplate/elements/checkboxes.html
+++ b/httemplate/elements/checkboxes.html
@@ -29,6 +29,8 @@ Example:
<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 @@ Example:
)</FONT></TD>
</TR>
+% }
+
% my $num=0;
% foreach my $item ( @{ $opt{'names_list'} } ) {
%
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index 651b04d28..d0741596b 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -501,6 +501,10 @@ tie my %config_phone, 'Tie::IxHash',
'View/Edit bulk DID vendors' => [ $fsurl.'browse/did_vendor.html', 'Bulk DID vendors' ],
;
+tie my %config_nms, 'Tie::IxHash',
+ 'View/Edit virtual ports' => [ $fsurl.'browse/torrus_srvderive.html', '' ],
+;
+
tie my %config_misc, 'Tie::IxHash';
$config_misc{'Message templates'} = [ $fsurl.'browse/msg_template.html', 'Templates for customer notices' ]
if $curuser->access_right('Edit templates')
@@ -545,11 +549,14 @@ $config_menu{'Ticketing'} = [ \%config_ticketing, '' ]
if $conf->config('ticket_system')
&& FS::TicketSystem->access_right(\%session, 'ShowConfigTab');
$config_menu{'Dialup'} = [ \%config_dialup, '' ]
- if ( $curuser->access_right('Dialup configuration') );
+ if $curuser->access_right('Dialup configuration');
$config_menu{'Broadband'} = [ \%config_broadband, '' ]
- if ( $curuser->access_right('Broadband configuration') );
+ if $curuser->access_right('Broadband configuration');
$config_menu{'Phone'} = [ \%config_phone, '' ]
- if ( $curuser->access_right('Configuration') );
+ if $curuser->access_right('Configuration');
+$config_menu{'Network Monitoring'} = [ \%config_nms, '' ]
+ if $curuser->access_right('Configuration')
+ && $conf->config('network_monitoring_system') eq 'Torrus_Internal';
$config_menu{'Miscellaneous'} = [ \%config_misc, '' ]
if $curuser->access_right('Configuration' )
|| $curuser->access_right('Edit advertising sources')
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 @@
<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 %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>