]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Test page improvments
authorDavide Franco <bacula-dev@dflc.ch>
Wed, 16 Mar 2011 17:48:41 +0000 (18:48 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 2 Aug 2011 09:56:15 +0000 (11:56 +0200)
 - PHP - MySQL support check added
 - PHP - PostgreSQL support check added
 - HTML and css fixes

gui/bacula-web/templates/test.tpl
gui/bacula-web/test.php

index 97173764ad7121f1f2dc0f606d4c05cc3798c8c8..af4d943328a252ae27a011e8fc6abd9fe3c7e03d 100644 (file)
 <div id="main_center">
        <div class="box">
          <p class="title">Required components</p>
-       <table>
+       <table border="0">
                {foreach from=$checks item=check}
                  <tr>
-                   <td> <b>{$check.check_label}</b> </td>
-                       <td>{$check.check_descr}</td>
-                       <td> <img src='style/images/{$check.check_result}' width='20' alt=''/></td>
+                   <td width="250">{$check.check_label}</td>
+                       <td width="450">{$check.check_descr}</td>
+                       <td  style="text-align:center;"> <img src='style/images/{$check.check_result}' width='20' alt=''/></td>
                  </tr>
                {/foreach}
        </table>
@@ -29,7 +29,7 @@
        <table>
          <tr>
            <td>
-                       <b>Graph system capabilities (Bacula-web only use PNG)</b>
+                       Graph system capabilities (Bacula-web only use PNG image format)
                </td>
            <td colspan="2">
                  <img src="{$graph_test}" alt='' />
index cc27d28c43c7c273a457de94c455ad3d5b982b28..ed52f8ffb9191c9a0cc8a9dd4eefc0d4bff56bb5 100644 (file)
                                                 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') ];
                        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" );