Ticket #36913 Torrus support in Debian packaging
[freeside.git] / httemplate / edit / torrus_srvderive.html
1 <% include( 'elements/edit.html',
2               'name_singular' => 'virtual port',
3               'table'         => 'torrus_srvderive',
4               'labels'        => { 'derivenum' => 'Virtual Port',
5                                    'serviceid' => 'Torrus serviceid',
6                                  },
7               'fields'        => [ 'serviceid',
8                                    { field=>'last_srv_date', type=>'hidden' },
9                                  ],
10               'viewall_dir'   => 'browse',
11               'html_bottom'   => $html_bottom_sub,
12           )
13 %>
14 <%init>
15
16 die "access denied"
17   unless $FS::CurrentUser::CurrentUser->access_right('Configure network monitoring');
18
19 my $html_bottom_sub = sub {
20   my $torrus_srvderive = shift;
21
22   my $nms = new FS::NetworkMonitoringSystem;
23   my @serviceids = $nms->torrus_serviceids;
24
25   ntable('#cccccc',2).'<TR><TD>'.
26     include( '/elements/checkboxes-table-name.html',
27                'source_obj'    => $torrus_srvderive,
28                'link_table'    => 'torrus_srvderive_component',
29                'num_col'       => 'derivenum',
30                'name_col'      => 'serviceid',
31                'names_list'    => \@serviceids,
32                'disable_links' => 1,
33            ).
34   '</TD></TR></TABLE>';
35
36 };
37
38
39 </%init>