torrus, UI, RT10574
authorlevinse <levinse>
Thu, 10 Feb 2011 01:08:44 +0000 (01:08 +0000)
committerlevinse <levinse>
Thu, 10 Feb 2011 01:08:44 +0000 (01:08 +0000)
FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm
torrus/perllib/Torrus/Renderer/HTML.pm
torrus/templates/default-dir.html

index e48b6a6..e7d3db1 100644 (file)
@@ -97,7 +97,7 @@ sub find_svc {
 sub report {
   my $self = shift;
 
-  my @lt = localtime(time);
+  my @ls = localtime(time);
   my ($d,$m,$y) = ($ls[3], $ls[4]+1, $ls[5]+1900);
   if ( $ls[3] == 1 ) {
     $m--;
index 657f66f..bf6ba99 100644 (file)
@@ -14,7 +14,7 @@
 #  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.7 2011-02-07 05:20:41 levinse Exp $
+# $Id: HTML.pm,v 1.8 2011-02-10 01:08:44 levinse Exp $
 # Stanislav Sinyagin <ssinyagin@yahoo.com>
 
 package Torrus::Renderer::HTML;
@@ -120,6 +120,7 @@ sub render_html
         'freesideComponent' => sub { return $self->freesideComponent(@_); },
         'uri_escape'        => sub { return uri_escape(@_); },
        'matches'        => sub { return $_[0] =~ $_[1]; },
+       'slash2underscore' => sub { $_[0] =~ s/\//_/g; return $_[0]; },
        'load_nms'       => sub { return $self->load_nms; },
        'get_serviceids'    => sub { my $nms = shift; 
                                  my $router = shift;
index 7eec267..bcdc001 100644 (file)
@@ -17,7 +17,7 @@
     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);
+    popup_link('nms-add_iface.html',router,uri_escape(slash2underscore(nodeName(token))),nms,serviceids);
  END; 
  IF matches(thepath,'Routers/$');
    freesideComponent('/elements/init_overlib.html');
@@ -63,7 +63,7 @@
          thisIsAlias ? '</EM>':''; %]
       [% IF matches(thepath,'Interface_Counters/$') %]
        <FONT SIZE="-1">
-        [% popup_link('nms-add_iface.html',router,uri_escape(nodeName(child)),nms,serviceids) %]
+        [% popup_link('nms-add_iface.html',router,uri_escape(slash2underscore(nodeName(child))),nms,serviceids) %]
        </FONT>
       [% END %]
     </SPAN>