From: Davide Franco Date: Wed, 16 Mar 2011 17:48:41 +0000 (+0100) Subject: bacula-web: Test page improvments X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=14a3b6aa19ef676bad5a8ad9765f606d7bdd1e8a;p=bacula%2Fbacula bacula-web: Test page improvments - PHP - MySQL support check added - PHP - PostgreSQL support check added - HTML and css fixes --- diff --git a/gui/bacula-web/templates/test.tpl b/gui/bacula-web/templates/test.tpl index 97173764ad..af4d943328 100644 --- a/gui/bacula-web/templates/test.tpl +++ b/gui/bacula-web/templates/test.tpl @@ -13,12 +13,12 @@

Required components

- +
{foreach from=$checks item=check} - - - + + + {/foreach}
{$check.check_label} {$check.check_descr} {$check.check_label}{$check.check_descr}
@@ -29,7 +29,7 @@
- Graph system capabilities (Bacula-web only use PNG) + Graph system capabilities (Bacula-web only use PNG image format) diff --git a/gui/bacula-web/test.php b/gui/bacula-web/test.php index cc27d28c43..ed52f8ffb9 100644 --- a/gui/bacula-web/test.php +++ b/gui/bacula-web/test.php @@ -29,6 +29,12 @@ array( 'check_cmd' => 'php-gd', 'check_label' => 'PHP - GD support', 'check_descr' => 'This is required by phplot, please compile php with GD support'), + array( 'check_cmd' => 'php-mysql', + 'check_label' => 'PHP - MySQL support', + 'check_descr' => 'PHP MySQL support must be installed in order to run bacula-web with MySQL bacula catalog'), + array( 'check_cmd' => 'php-postgres', + 'check_label' => 'PHP - PostgreSQL support', + 'check_descr' => 'PHP PostgreSQL support must be installed in order to run bacula-web with PostgreSQL bacula catalog'), array( 'check_cmd' => 'smarty-cache', 'check_label' => 'Smarty cache folder write permission', 'check_descr' => 'Smarty template engine need write permissions to templates_c folder') @@ -39,7 +45,7 @@ switch( $check['check_cmd'] ) { case 'php-gettext': - $check['check_result'] = $check_result[ function_exists( 'gettext') ]; + $check['check_result'] = $check_result[ function_exists( 'gettext' ) ]; break; case 'php-gd': $check['check_result'] = $check_result[ function_exists( 'gd_info') ]; @@ -47,11 +53,19 @@ case 'pear-db': $check['check_result'] = $check_result[ class_exists('DB') ]; break; + case 'php-mysql': + $check['check_result'] = $check_result[ function_exists('mysql_connect') ]; + break; + case 'php-postgres': + $check['check_result'] = $check_result[ function_exists('pg_connect') ]; + break; case 'smarty-cache': $check['check_result'] = $check_result[ is_writable( "./templates_c" ) ]; break; - } + } + } + // Generate test graph $data = array( array('test', 100, 100, 200, 100), array('test1', 150, 100, 150, 100 ) ); $graph = new BGraph( "graph3.png" );