summaryrefslogtreecommitdiff
path: root/httemplate/misc/process/nms-add_iface.html
blob: 0d37ea233b87a6c72b12d501021a8a6efed5522b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<% header('Interface added') %>
<SCRIPT TYPE="text/javascript">
  window.top.location.reload();
</SCRIPT>
</BODY></HTML>
<%init>

# XXX: access rights

my $host = $cgi->param('host'); 
die 'invalid host' unless $host =~ /^[0-9.a-zA-Z\-]+$/;

my $iface = $cgi->param('iface');
die 'invalid iface' unless $iface =~ /^[0-9A-Za-z_\-.\\\/ ]+$/;

my $serviceid = $cgi->param('serviceid');
#die 'invalid serviceid' unless $serviceid =~ /^[0-9A-Za-z_\-.\\\/ ]+$/;
die 'invalid serviceid' unless $serviceid =~ /^[0-9A-Za-z_]+$/;
  
my $nms = new FS::NetworkMonitoringSystem;
$nms->add_interface($host,$iface,$serviceid);

</%init>