diff options
author | ivan <ivan> | 2011-12-19 01:32:11 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-12-19 01:32:11 +0000 |
commit | 42ea39c6e35c370369fdcccb7c303c1812146355 (patch) | |
tree | 22c62e3a8c1029dc78afca055bafc189d6ff74a7 /httemplate/misc/process/nms-add_router.html | |
parent | 425b5f85e183064be4cc3e1a8ce444f11fe011df (diff) |
missing commit from nms auto-addition fixdes, RT#15536
Diffstat (limited to 'httemplate/misc/process/nms-add_router.html')
-rw-r--r-- | httemplate/misc/process/nms-add_router.html | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/httemplate/misc/process/nms-add_router.html b/httemplate/misc/process/nms-add_router.html index a77d897d2..c3b42a8d3 100644 --- a/httemplate/misc/process/nms-add_router.html +++ b/httemplate/misc/process/nms-add_router.html @@ -1,4 +1,7 @@ -<% header('Router added') %> +<& /elements/header-popup.html, 'Router added' &> + <SCRIPT TYPE="text/javascript"> + window.top.location.reload(); + </SCRIPT> </BODY></HTML> <%init> @@ -6,12 +9,13 @@ 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\-]+$/; +errorpage_popup('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\-]*$/; +errorpage_popup('invalid SNMP community string') unless $community =~ /^[0-9.a-zA-Z\-]*$/; my $nms = new FS::NetworkMonitoringSystem; -$nms->add_router($host,$community); +my $error = $nms->add_router($host,$community); +errorpage_popup($error) if $error; </%init> |