]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/memory.cgi
vpn-statistic: change title of ovpn RW statistic page
[ipfire-2.x.git] / html / cgi-bin / memory.cgi
index 35ce7a0f1137882caa80af8c82904c8705f6622e..1708b0f3210edb905df93b7565390c21cb56ef34 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2005-2010  IPFire Team                                        #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -56,9 +56,11 @@ if ( $querry[0] =~ "memory"){
        &Graphs::makegraphbox("memory.cgi","memory","day");
        &Header::closebox();
 
-       &Header::openbox('100%', 'center', "Swap $Lang::tr{'graph'}");
-       &Graphs::makegraphbox("memory.cgi","swap","day");
-       &Header::closebox();
+       if ( `ls $mainsettings{'RRDLOG'}/collectd/localhost/swap 2>/dev/null` ) {
+           &Header::openbox('100%', 'center', "Swap $Lang::tr{'graph'}");
+           &Graphs::makegraphbox("memory.cgi","swap","day");
+           &Header::closebox();
+       }
        
        &Header::openbox('100%', 'center', $Lang::tr{'memory'});
        print "<table width='95%' cellspacing='5'>";