X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fnms-add_router.html;h=c3b42a8d3cdfeb3629aa52cca6f9ae34ccf1f23c;hp=a77d897d27773bff9cf47429f42c75604bc28d00;hb=a69c2b61cdf4e866e36bab91de1dd71666e7cfb7;hpb=d7a9f5c6dbf89aa85c281578bb553e04a573cbd0 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' &> + <%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;