torrus, UI, RT10574
[freeside.git] / torrus / templates / default-dir.html
index 4b653be..bcdc001 100644 (file)
@@ -1,8 +1,30 @@
 [% PROCESS 'html-incblocks.txt' %]
+[% thepath=path(token) %]
 [% INCLUDE htmlstart title=xmlnorm(nodeParam(token,'comment')) printpath=1 %]
 
 [% INCLUDE legend %]
 
+[% 
+ 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(slash2underscore(nodeName(token))),nms,serviceids);
+ 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">
 [%   hasLeaves = 0; hasSubtrees = 0;
       <A HREF="[%url(child)%]"[%urlTitle%]>[% nodeName(child) %]</A>
       [% hidden ? '</EM>':'';
          thisIsAlias ? '</EM>':''; %]
+      [% IF matches(thepath,'Interface_Counters/$') %]
+       <FONT SIZE="-1">
+        [% popup_link('nms-add_iface.html',router,uri_escape(slash2underscore(nodeName(child))),nms,serviceids) %]
+       </FONT>
+      [% END %]
     </SPAN>
        [% IF comment %]
     <SPAN CLASS="NodeDescr">