1 <& /elements/header-popup.html, 'Router added' &>
2 <SCRIPT TYPE="text/javascript">
9 unless $FS::CurrentUser::CurrentUser->access_right('Configure network monitoring');
11 my $host = $cgi->param('host');
12 errorpage_popup('invalid host') unless $host =~ /^[0-9.a-zA-Z\-]+$/;
14 my $community = $cgi->param('community');
15 errorpage_popup('invalid SNMP community string') unless $community =~ /^[0-9.a-zA-Z\-]*$/;
17 my $nms = new FS::NetworkMonitoringSystem;
18 my $error = $nms->add_router($host,$community);
19 errorpage_popup($error) if $error;