From bc8bc32def6ab636129c205ebd5b7db76b805ac5 Mon Sep 17 00:00:00 2001 From: levinse Date: Sat, 5 Feb 2011 06:04:32 +0000 Subject: torrus, add interface UI, RT10574 --- httemplate/misc/process/nms-add_iface.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 httemplate/misc/process/nms-add_iface.html (limited to 'httemplate/misc/process') diff --git a/httemplate/misc/process/nms-add_iface.html b/httemplate/misc/process/nms-add_iface.html new file mode 100644 index 000000000..ffc70d9cc --- /dev/null +++ b/httemplate/misc/process/nms-add_iface.html @@ -0,0 +1,22 @@ +<% header('Interface added') %> + +<%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_\-.\\\/ ]+$/; + +my $conf = new FS::Conf; +my $system = $conf->config('network_monitoring_system'); + +my $nms = new FS::NetworkMonitoringSystem; +$nms->add_interface($host,$iface,$serviceid); + + -- cgit v1.2.1