mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-03-19 12:00:01 +01:00
Add tests to the info page.
This commit is contained in:
parent
82d3b5040e
commit
30993e40f6
@ -134,7 +134,7 @@ body#h5ai-info {
|
||||
margin: 4px 0 12px 12px;
|
||||
font-size: 0.7em;
|
||||
color: #aaa;
|
||||
width: 380px;
|
||||
width: 460px;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,21 @@ modulejs.define('info', ['$', 'config'], function ($, config) {
|
||||
|
||||
$(testsTemp).appendTo('body');
|
||||
|
||||
addTest(
|
||||
'Index file found', 'Add <code>' + setup.INDEX_HREF + '</code> to your index file list',
|
||||
setup.INDEX_HREF
|
||||
);
|
||||
|
||||
addTest(
|
||||
'Options parsable', 'File <code>options.json</code> is readable and syntax seams to be correct',
|
||||
config.options !== null
|
||||
);
|
||||
|
||||
addTest(
|
||||
'Types parsable', 'File <code>types.json</code> is readable and syntax seams to be correct',
|
||||
config.types !== null
|
||||
);
|
||||
|
||||
addTest(
|
||||
'Server software', 'Server is one of apache, lighttpd, nginx or cherokee',
|
||||
setup.HAS_SERVER, setup.SERVER_NAME + ' ' + setup.SERVER_VERSION
|
||||
|
@ -72,9 +72,13 @@ function setup() {
|
||||
define("CURRENT_HREF", $current_href);
|
||||
define("CURRENT_PATH", $current_path);
|
||||
|
||||
define("INDEX_HREF", normalize_path(APP_HREF . "server/php/index.php", false));
|
||||
$index_href = null;
|
||||
if (@is_readable(normalize_path(APP_PATH . "/server/php/index.php", false))) {
|
||||
$index_href = normalize_path(APP_HREF . "/server/php/index.php", false);
|
||||
}
|
||||
define("INDEX_HREF", $index_href);
|
||||
|
||||
define("CACHE_HREF", normalize_path(APP_HREF . "cache", true));
|
||||
define("CACHE_HREF", normalize_path(APP_HREF . "/cache", true));
|
||||
define("CACHE_PATH", normalize_path(APP_PATH . "/cache", false));
|
||||
define("HAS_WRITABLE_CACHE", @is_writable(CACHE_PATH));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user