From 8c37ba9a0caeffdbe133968750f5b4d1e7b7fb69 Mon Sep 17 00:00:00 2001 From: levinse Date: Mon, 7 Feb 2011 05:20:41 +0000 Subject: torrus, UI, RT10574 --- torrus/templates/default-dir.html | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'torrus/templates') diff --git a/torrus/templates/default-dir.html b/torrus/templates/default-dir.html index db1821260..7eec26744 100644 --- a/torrus/templates/default-dir.html +++ b/torrus/templates/default-dir.html @@ -4,13 +4,26 @@ [% INCLUDE legend %] -[% 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 %] +[% + IF matches(thepath,'Interface_Counters/$'); + freesideComponent('/elements/init_overlib.html'); + nms = load_nms(); + router = nodeName(parent(token)); + serviceids = get_serviceids(nms,router); + END; + IF matches(thepath,'Interface_Counters/.*?/$'); + nms = load_nms(); + router = nodeName(parent(parent(token))); + serviceids = get_serviceids(nms,router); + + # HACK! this doesn't do what you think it does... + popup_link('nms-add_iface.html',router,uri_escape(nodeName(token)),nms,serviceids); + END; + IF matches(thepath,'Routers/$'); + freesideComponent('/elements/init_overlib.html'); + popup_link('nms-add_router.html'); + END; +%]

Directories you can jump to:

@@ -50,7 +63,7 @@ thisIsAlias ? '':''; %] [% IF matches(thepath,'Interface_Counters/$') %] - [% popup_link('nms-add_iface.html',nodeName(parent(token)),uri_escape(nodeName(child))) %] + [% popup_link('nms-add_iface.html',router,uri_escape(nodeName(child)),nms,serviceids) %] [% END %] -- cgit v1.2.1