Skip to content

Commit

Permalink
Release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Oct 10, 2014
1 parent 45acd64 commit 7a3d66b
Show file tree
Hide file tree
Showing 48 changed files with 120 additions and 69 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ dist
pakefile.php
.idea/
composer.phar
composer.lock
composer.lock
vendor
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Extension ggsysinfo for eZ publish
Goals:

Allow eZ Publish administrators to have better insight into their working installation:
- have the complete informations from the phpinfo() page within the eZ Publish admin interface
- have the complete informations from the installed php accelerator within the eZ Publish admin interface, and, in case, allow to clear its cache
- have the complete information from the phpinfo() page within the eZ Publish admin interface
- have the complete information from the installed php accelerator within the eZ Publish admin interface, and, in case, allow to clear its cache
- have a more detailed view on eZ Publish cache files, allowing to grep through them and delete them if needed
- have a more detailed view on eZ Publish log files, allowing to grep through them
- have a stats page with all types of content in the db listed
- have a page with more detailed status tests than ezinfo/isalive
Some pages that can be of help to developers too:
- all available modules
- all available module views with their parameteres
- all available module views with their parameters
- all available fetch functions
- all available policy functions
- all available policy module operations
Expand Down
8 changes: 4 additions & 4 deletions bin/php/ezreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* - using a custom autoloader
*
* @author G. Giunta
* @copyright (C) G. Giunta 2012
* @copyright (C) G. Giunta 2012-2014
* @license Licensed under GNU General Public License v2.0. See file license.txt
*
* @todo add options to let users to select which tests to run (ALL by default)
Expand All @@ -22,9 +22,9 @@
$cli = eZCLI::instance();

$script = eZScript::instance( array( 'description' => ( "Generate System Information Report" ),
'use-session' => false,
'use-modules' => true,
'use-extensions' => true ) );
'use-session' => false,
'use-modules' => true,
'use-extensions' => true ) );
$script->startup();
$options = $script->getOptions(
'',
Expand Down
2 changes: 1 addition & 1 deletion classes/contentstatsgatherer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
*
* @author G. Giunta
* @copyright (C) G. Giunta 2012
* @copyright (C) G. Giunta 2012-2014
* @license Licensed under GNU General Public License v2.0. See file license.txt
*
* @todo add more classes of content that have no stats in main admin interface
Expand Down
4 changes: 2 additions & 2 deletions classes/dbchecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2012
* @copyright (C) G. Giunta 2012-2014
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down Expand Up @@ -36,7 +36,7 @@ static function checkDatabase()
return $warnings;

//case 'oracle':
/// @todo check for stored procs which are not compiled; tables with max id bigger than their associtaed sequence; double triggers on tables
/// @todo check for stored procs which are not compiled; tables with max id bigger than their associated sequence; double triggers on tables

default:
return array( 'Database type ' . $db->databaseName() . ' can currently not be checked for problems' );
Expand Down
22 changes: 21 additions & 1 deletion classes/ezlogsgrapher.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2008-2012
* @copyright (C) G. Giunta 2008-2014
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand All @@ -18,6 +18,8 @@ function calcChurnLabel( $pos, $step )
class ezLogsGrapher
{

static $lastError = '';

/**
* Parses an eZ log file, returns a (nested) array with one value per log message
* @return array
Expand All @@ -29,6 +31,8 @@ static function splitLog( $logfile, $exclude_regexp='#\] Timing Point: #' )
$content = '';
$time = 0;
$ip = '';
$date = '';
$label = '';
foreach ( $file as $line )
{
if ( preg_match( '/^\[ ([A-Za-z0-9: ]+) \] \[([0-9.]*)\] (.*)/', $line, $matches ) )
Expand Down Expand Up @@ -103,15 +107,25 @@ static function parseLog( $logfile, $scale=60, $exclude_regexp='#\] Timing Point
* create graph via ezc/gd2
* @todo verify availability of gd2?
* @todo improve layout: col. width, x axis labels, etc...
* @todo if zetacomponent graph is not there, create an error image using gd
*/
static function graph( $data, $dataname, $scale = 60 )
{
$content = false;
self::$lastError = '';

$times = array_keys( $data );
$min = $times[0];
$max = end( $times );

if ( !class_exists( 'ezcGraphBarChart' ) )
{
$errormsg = "Error while rendering graph: missing Zetacomponents Graph library";
self::$lastError = $errormsg;
eZDebug::writeError( $errormsg );
return false;
}

$graph = new ezcGraphBarChart();
$locale = eZLocale::instance();
$graph->title = "From " . $locale->formatShortDateTime( $min ) . " to " . $locale->formatShortDateTime( $max );
Expand Down Expand Up @@ -143,6 +157,7 @@ static function graph( $data, $dataname, $scale = 60 )
} catch( exception $e )
{
$errormsg = "Error while rendering graph: " . $e->getMessage();
self::$lastError = $errormsg;
eZDebug::writeError( $errormsg );
}
return $content;
Expand All @@ -163,5 +178,10 @@ static function asum( $a1, $a2 )
}
return $a1;
}

static function lastError()
{
return self::$lastError;
}
}
?>
2 changes: 1 addition & 1 deletion classes/reportgenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A helper class for generating reports
*
* @author G. Giunta
* @copyright (C) G. Giunta 2012
* @copyright (C) G. Giunta 2012-2014
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
18 changes: 15 additions & 3 deletions classes/sysinfomodule.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Class used to help managing in a single place all module/view info
*
* @author G. Giunta
* @copyright (C) G. Giunta 2010-2012
* @copyright (C) G. Giunta 2010-2014
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down Expand Up @@ -100,7 +100,7 @@ class sysinfoModule{
'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)' ),
'description' => 'Executes tests to verify that the environment 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
Expand Down Expand Up @@ -426,7 +426,7 @@ static function viewList( $group='' )
return $viewlist;
}

/// @todo use name if title is missing
// we use name if title is missing
static function viewTitle( $viewname )
{
foreach( self::$view_groups as $views )
Expand All @@ -451,6 +451,18 @@ static function viewName( $viewname )
return 'title-for-path';
}

static function viewDescription( $viewname )
{
foreach( self::$view_groups as $views )
{
if ( array_key_exists( $viewname, $views ) )
{
return isset( $views[$viewname]['description'] ) ? $views[$viewname]['description'] : $views[$viewname];
}
}
return '';
}

/// true if view is neither hidden nor disabled
static function viewActive( $viewname )
{
Expand Down
2 changes: 1 addition & 1 deletion classes/systemchecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2012
* @copyright (C) G. Giunta 2014
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion classes/tplchecker.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @author G. Giunta
* @copyright (C) G. Giunta 2012
* @copyright (C) G. Giunta 2014
* @license Licensed under GNU General Public License v2.0. See file license.txt
*/

Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"homepage": "http://projects.ez.no/ggsysinfo",
"minimum-stability": "dev",
"require": {
"ezsystems/ezpublish-legacy-installer": "*"
"ezsystems/ezpublish-legacy-installer": "*",
"zetacomponents/graph": "dev-master"
},
"require-dev": {
"gggeek/ezextensionbuilder": "*"
}
}
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/cachesearch.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<h1 class="context-title">{"Cache search"|i18n('SysInfo')}{if or(ne($searchtext, ""), gt($list_count, 0))} [{$list_count} files found]{/if}</h1>

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/cachestats.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/classesreport.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/contentstats.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/databaseqa.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/fetchlist.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/info.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/inireport.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<h2>{'Siteaccess'|i18n('SysInfo')}: {$current_siteaccess|wash()}</h2>

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/logchurn.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<h1 class="context-title">{'Log churn'|i18n('SysInfo')}</h1>

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/logstats.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/logview.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/modulelist.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/operationlist.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/operatorlist.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/policiesreport.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/policylist.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/secinfo.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion design/standard/templates/sysinfo/storagechurn.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<h1 class="context-title">{'Storage churn'|i18n('SysInfo')}</h1>

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

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

Expand Down
Loading

0 comments on commit 7a3d66b

Please sign in to comment.