--- /dev/null
+<% header('Add Router') %>
+
+<FORM NAME="nms-add_iface" ACTION="<% popurl(1) %>process/nms-add_router.html" METHOD=POST>
+Router Hostname/IP
+<% include('/elements/input-text.html',
+ 'field' => 'host',
+ )
+%>
+<BR>
+<INPUT TYPE="submit" NAME="submit" ID="submit_nms-add_router" VALUE="Add Router">
+</FORM>
+
+<%init>
+
+# XXX: access rights, disable/enable submit button, something's wrong with style
+
+</%init>
my $serviceid = $cgi->param('serviceid');
die 'invalid serviceid' unless $serviceid =~ /^[0-9A-Za-z_\-.\\\/ ]+$/;
-my $conf = new FS::Conf;
-my $system = $conf->config('network_monitoring_system');
-
my $nms = new FS::NetworkMonitoringSystem;
$nms->add_interface($host,$iface,$serviceid);
--- /dev/null
+<% header('Router added') %>
+</BODY></HTML>
+<%init>
+
+# XXX: access rights
+
+my $host = $cgi->param('host');
+die 'invalid host' unless $host =~ /^[0-9.a-zA-Z\-]+$/;
+
+my $nms = new FS::NetworkMonitoringSystem;
+$nms->add_router($host);
+
+</%init>
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-# $Id: HTML.pm,v 1.5 2011-01-28 02:49:15 levinse Exp $
+# $Id: HTML.pm,v 1.6 2011-02-05 06:32:36 levinse Exp $
# Stanislav Sinyagin <ssinyagin@yahoo.com>
package Torrus::Renderer::HTML;
'actionlabel' => 'Monitor interface',
);
}
+ elsif($type eq 'nms-add_router.html') {
+ return
+ $self->freesideComponent('/elements/popup_link.html',
+ 'action' => "/freeside/misc/$type",
+ 'label' => 'Add Router',
+ 'actionlabel' => 'Add Router',
+ );
+ }
+
'';
},
[% IF matches(thepath,'Interface_Counters/$') %]
[% freesideComponent('/elements/init_overlib.html') %]
[% END %]
+[% IF matches(thepath,'Routers/$') %]
+ [% freesideComponent('/elements/init_overlib.html') %]
+ [% popup_link('nms-add_router.html') %]
+[% END %]
<P>Directories you can jump to:</P>
<DIV CLASS="Listing">