From: Davide Franco Date: Fri, 22 Oct 2010 16:22:37 +0000 (+0200) Subject: bacula-web: Improved test page X-Git-Tag: Release-5.2.1~1003 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3b0f86094d9a359ca4e52d54075928a5996cdcb3;p=bacula%2Fbacula bacula-web: Improved test page - Added smarty cache directory test - Added new simplegraph.php script - Improved php code - Improved lisibility of test page --- diff --git a/gui/bacula-web/simplegraph.php b/gui/bacula-web/simplegraph.php new file mode 100644 index 0000000000..9dcfa26491 --- /dev/null +++ b/gui/bacula-web/simplegraph.php @@ -0,0 +1,18 @@ +SetImageBorderType('plain'); +$plot->SetDataType('text-data'); +$plot->SetDataValues($data); +$plot->SetPlotType('pie'); +//$plot->SetShading( '5' ) + +$plot->DrawGraph(); + +?> \ No newline at end of file diff --git a/gui/bacula-web/test.php b/gui/bacula-web/test.php index 688f109b1e..cba418ea83 100644 --- a/gui/bacula-web/test.php +++ b/gui/bacula-web/test.php @@ -1,51 +1,118 @@ NO ".$text." disabled ".$description; - else - echo "YES ".$text." enabled "; -} - + function Checkold($function,$text,$description="") + { + if (!function_exists($function) ) + echo " ".$text." disabled " . $description; + else + echo " " . $text . " enabled "; + } + + function Check( $support, $description, $error_message ) + { + $result = "Checking " . $description . " "; + $ok = false; + + switch( $support ) + { + case 'php-gettext': + if( function_exists( 'gettext') ) + $ok = true; + break; + case 'php-gd': + if( function_exists( 'gd_info') ) + $ok = true; + break; + case 'pear-db': + if ( class_exists('DB') ) + $ok = true; + break; + case 'smarty-cache': + if ( is_writable( "./templates_c" ) ) + $ok = true; + break; + } + if( $ok ) + $result .= "  "; + else + $result .= "$error_message "; + + echo $result; + } ?> - + + - Testing page + Bacula-web - Test page + + -Checking system for dependencies...


- +
- - + + + -
- Checking gettext: - + +
- Checking Pear(DB): - YES Pear DB enabled "; - else - echo "NO Pear DB NOT FOUNDThis is required. Please download from http://pear.php.net/package/DB/download ."; + +
- Checking GD: - + +
+
-

-Please, click the link below to test your graph system capabilities (Bacula-web only use PNG):
+ + +
+ Testing your graph system capabilities (Bacula-web only use PNG)
+ +
+ + + -Test + \ No newline at end of file