[freeside-commits] freeside/httemplate/misc/process nms-add_iface.html, 1.5, 1.6 nms-add_router.html, 1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Sun Dec 18 17:32:13 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail.420.am:/tmp/cvs-serv21603/process
Modified Files:
nms-add_iface.html nms-add_router.html
Log Message:
missing commit from nms auto-addition fixdes, RT#15536
Index: nms-add_iface.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/nms-add_iface.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- nms-add_iface.html 15 May 2011 01:43:39 -0000 1.5
+++ nms-add_iface.html 19 Dec 2011 01:32:11 -0000 1.6
@@ -1,4 +1,4 @@
-<% header('Interface added') %>
+<& /elements/header-popup.html, 'Interface added') &>
<SCRIPT TYPE="text/javascript">
window.top.location.reload();
</SCRIPT>
@@ -9,16 +9,17 @@
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 $iface = $cgi->param('iface');
-die 'invalid iface' unless $iface =~ /^[0-9A-Za-z_\-.\\\/ ]+$/;
+errorpage_popup('invalid iface') unless $iface =~ /^[0-9A-Za-z_\-.\\\/ ]+$/;
my $serviceid = $cgi->param('serviceid');
#die 'invalid serviceid' unless $serviceid =~ /^[0-9A-Za-z_\-.\\\/ ]+$/;
-die 'invalid serviceid' unless $serviceid =~ /^[0-9A-Za-z_]+$/;
+errorpage_popup('invalid serviceid') unless $serviceid =~ /^[0-9A-Za-z_]+$/;
my $nms = new FS::NetworkMonitoringSystem;
-$nms->add_interface($host,$iface,$serviceid);
+my $error = $nms->add_interface($host,$iface,$serviceid);
+errorpage_popup($error) if $error;
</%init>
Index: nms-add_router.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/nms-add_router.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- nms-add_router.html 15 May 2011 01:43:38 -0000 1.2
+++ nms-add_router.html 19 Dec 2011 01:32:11 -0000 1.3
@@ -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 @@
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>
More information about the freeside-commits
mailing list