WUI: Make the shown uptime in the footer more beautiful.
authorJoern-Ingo Weigert <jiweigert@gmail.com>
Fri, 8 Mar 2013 15:39:32 +0000 (16:39 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 8 Mar 2013 15:39:32 +0000 (16:39 +0100)
html/html/themes/ipfire/include/functions.pl
html/html/themes/maniac/include/functions.pl
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index b97c32613bd8399d571518d8cd84b1e1672db355..b28547a891b06480b80abd3d8f669827a0a8a14a 100644 (file)
@@ -335,9 +335,14 @@ END
 }
 
 sub closepage () {
-    my $status = &connectionstatus();
-    $uptime = `/usr/bin/uptime`;
-        
+       my $status = &connectionstatus();
+       my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`;
+       $uptime =~ s/year(s|)/$Lang::tr{'year'}/;
+       $uptime =~ s/month(s|)/$Lang::tr{'month'}/;
+       $uptime =~ s/day(s|)/$Lang::tr{'day'}/;
+       $uptime =~ s/user(s|)/$Lang::tr{'user'}/;
+       $uptime =~ s/load average/$Lang::tr{'uptime load average'}/;     
+                               
     print <<END
                         </div>
                 </div>
index c3bf1c9e38c56534701e1708128ce0135a253e01..ae644306c9060c1007f916621b4e48f59a1890ca 100644 (file)
@@ -335,9 +335,14 @@ END
 }
 
 sub closepage () {
-    my $status = &connectionstatus();
-    $uptime = `/usr/bin/uptime`;
-       
+       my $status = &connectionstatus();
+       my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`;
+       $uptime =~ s/year(s|)/$Lang::tr{'year'}/;
+       $uptime =~ s/month(s|)/$Lang::tr{'month'}/;
+       $uptime =~ s/day(s|)/$Lang::tr{'day'}/;
+       $uptime =~ s/user(s|)/$Lang::tr{'user'}/;
+       $uptime =~ s/load average/$Lang::tr{'uptime load average'}/;     
+                               
     print <<END
                        </div>
                </div>
index 2c01256b9dc64b3098e45e7ec7211d3f8a82fce9..41e04408975082cd1ea6efc109effc94b0c07fa8 100644 (file)
 'upstream password' => 'Proxy-Passwort:',
 'upstream proxy host:port' => 'Vorgelagerter Proxy (hostname:port)',
 'upstream username' => 'Proxy-Benutzername:',
+'uptime' => 'Betriebszeit',
+'uptime load average' => 'Ø Systemlast',
 'uptime and users' => 'Uptime und Benutzer:',
 'url filter' => 'URL-Filter',
 'urlfilter access' => 'Zugriff',
index 17b117fdd32fa7d3b17037881ed0401210447ec4..b1d614e027a33cfa685288749e44625fcf24687d 100644 (file)
 'upstream password' => 'Upstream password:',
 'upstream proxy host:port' => 'Upstream proxy (host:port)',
 'upstream username' => 'Upstream username:',
+'uptime' => 'Uptime',
+'uptime load average' => 'Ø Load average',
 'uptime and users' => 'Uptime and users:',
 'url filter' => 'Content Filter',
 'urlfilter access' => 'Access',