diff options
Diffstat (limited to 'httemplate/misc/process/nms-add_router.html')
| -rw-r--r-- | httemplate/misc/process/nms-add_router.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/httemplate/misc/process/nms-add_router.html b/httemplate/misc/process/nms-add_router.html new file mode 100644 index 000000000..a77d897d2 --- /dev/null +++ b/httemplate/misc/process/nms-add_router.html @@ -0,0 +1,17 @@ +<% header('Router added') %> +</BODY></HTML> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configure network monitoring'); + +my $host = $cgi->param('host'); +die 'invalid host' unless $host =~ /^[0-9.a-zA-Z\-]+$/; + +my $community = $cgi->param('community'); +die 'invalid SNMP community string' unless $community =~ /^[0-9.a-zA-Z\-]*$/; + +my $nms = new FS::NetworkMonitoringSystem; +$nms->add_router($host,$community); + +</%init> |
