projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
missing commit from nms auto-addition fixdes, RT#15536
[freeside.git]
/
httemplate
/
misc
/
process
/
nms-add_router.html
diff --git
a/httemplate/misc/process/nms-add_router.html
b/httemplate/misc/process/nms-add_router.html
index
a77d897
..
c3b42a8
100644
(file)
--- 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>
</BODY></HTML>
<%init>
@@
-6,12
+9,13
@@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configure network monitoring');
my $host = $cgi->param('host');
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');
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;
my $nms = new FS::NetworkMonitoringSystem;
-$nms->add_router($host,$community);
+my $error = $nms->add_router($host,$community);
+errorpage_popup($error) if $error;
</%init>
</%init>