Skip to content

Commit

Permalink
Add new view checking requirements (setup wizard tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Aug 10, 2012
1 parent 2f9c837 commit 8857637
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 4 deletions.
14 changes: 11 additions & 3 deletions classes/sysinfomodule.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ class sysinfoModule{
'name' => 'System status',
'description' => 'Executes tests to verify the functioning of various parts of the system (e.g. connection to the database or to the eZFind indexing server)' ),

'systemcheck' => array(
//'functions' => array( 'system_info' ), - we check in the module itself
'script' => 'genericview.php',
'default_navigation_part' => 'ezsysinfonavigationpart',
//'params' => array( 'output_format' ),
'name' => 'System check',
'description' => 'Executes tests to verify that the envitonment can properly support eZ Publish (i.e. the tests normally run by the setup wizard)' ),

'cachestats' => array(
//'functions' => array( 'system_info' ), - we check in the module itself
'script' => 'genericview.php',
Expand Down Expand Up @@ -232,14 +240,14 @@ class sysinfoModule{
'script' => 'genericview.php',
'default_navigation_part' => 'ezsysinfonavigationpart',
'name' => 'Security checks',
'description' => 'Executes tests to verify the proper configuration of the system for security-related aspects' ),
'description' => 'Executes tests to verify the proper configuration of the system for security-related aspects (taken from phpsecinfo)' ),

'databaseqa' => array(
//'functions' => array( 'system_info' ), - we check in the module itself
'script' => 'genericview.php',
'default_navigation_part' => 'ezsysinfonavigationpart',
'name' => 'Database problems',
'description' => 'Checks for common database misconfigurations',
'description' => 'Checks for common database misconfigurations (character set and storage engine of all tables)',
'disabled' => true ),

'inifilesqa' => array(
Expand All @@ -262,7 +270,7 @@ class sysinfoModule{
'unordered_params' => array( 'view' => 'viewmode' ),
'default_navigation_part' => 'ezsysinfonavigationpart',
'name' => 'Php files problems',
'description' => 'Checks for all php files found the presence of opening and closing php tags' ),
'description' => 'Checks for all php files found the presence of opening and closing php tags, syntax validity' ),

'tplfilesqa' => array(
//'functions' => array( 'system_info' ), - we check in the module itself
Expand Down
36 changes: 36 additions & 0 deletions design/standard/templates/sysinfo/systemcheck.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div class="context-block">
{* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr">

<h1 class="context-title">{$title|wash()}</h1>

{* DESIGN: Mainline *}<div class="header-mainline"></div>

{* DESIGN: Header END *}</div></div></div></div></div></div>

{* DESIGN: Content START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-bl"><div class="box-br"><div class="box-content">

<div class="context-attributes">

{if ne($css, "")}
<link rel="stylesheet" type="text/css" href={concat('stylesheets/',$css)|ezdesign()} />
{/if}

{if $warnings}
<table class="list" cellspacing="0">
<tr>
<th>Problems detected</th>
</tr>
{foreach $warnings as $warning => $details sequence array( 'bglight', 'bgdark') as $style}
<td>{include uri=concat('design:setup/tests/', $warning, '_error.tpl') test_result=$details result_number=''}</td>
</tr>
{/foreach}
</table>
{else}
No problems detected
{/if}

</div>

{* DESIGN: Content END *}</div></div></div></div></div></div>

</div>
1 change: 1 addition & 0 deletions doc/changelogs/CHANGELOG-0.5-to-0.6
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Changes from 0.5 to 0.6 - released 2012/yy/zz
New:
- a new page with statistics about the mysql client (only available with the mysqlnd extension)
- a new page checking syntax errors in template files
- a new page running all tests from setup wizard (usecase: check requirements after moving to a new server)

Improved:
- in log file list, show all log files found, not just eZ standard ones
Expand Down
1 change: 0 additions & 1 deletion doc/todo
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ qa views:
- use ajax calls to test php and tpl validity to avoid very long page load time
- allow to specify location of php executable via ini
- add a cache for parsed ini files
- view that runs setup wizard tests
- extensions that have mysql .sql files but not db_schema.dba
- duplicate values for designlist, relatedsa, etc...
- if the ezcodingstyle extension is installed, parse php files for code style compliance
Expand Down
12 changes: 12 additions & 0 deletions modules/sysinfo/systemcheck.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2012
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

$warnings = systemChecker::checkSetupRequirements();

$tpl->setVariable( 'warnings', $warnings );

?>

0 comments on commit 8857637

Please sign in to comment.