Show server configuration in settings page

This commit is contained in:
Frederic Guillot 2016-03-12 09:52:00 -05:00
parent 241ca53e47
commit b061945f0e
5 changed files with 56 additions and 25 deletions

View File

@ -3,6 +3,7 @@ Version 1.0.27 (unreleased)
Improvements:
* Show configuration in settings page
* Added "?" to display list of keyboard shortcuts
* Added new keyboard shortcuts for task view
* Always display project name and task title in task views

View File

@ -61,6 +61,8 @@ class Config extends Base
{
$this->response->html($this->helper->layout->config('config/about', array(
'db_size' => $this->config->getDatabaseSize(),
'db_version' => $this->db->getDriver()->getDatabaseVersion(),
'user_agent' => $this->request->getServerVariable('HTTP_USER_AGENT'),
'title' => t('Settings').' > '.t('About'),
)));
}

View File

@ -7,10 +7,6 @@
<?= t('Official website:') ?>
<a href="http://kanboard.net/" target="_blank" rel="noreferer">http://kanboard.net/</a>
</li>
<li>
<?= t('Application version:') ?>
<strong><?= APP_VERSION ?></strong>
</li>
<li>
<?= t('Author:') ?>
<strong>Frédéric Guillot</strong> (<a href="https://github.com/fguillot/kanboard/blob/master/CONTRIBUTORS.md" target="_blank"><?= t('contributors') ?></a>)
@ -23,15 +19,47 @@
</div>
<div class="page-header">
<h2><?= t('Database') ?></h2>
<h2><?= t('Configuration') ?></h2>
</div>
<div class="listing">
<ul>
<li>
<?= t('Database driver:') ?>
<strong><?= $this->text->e(DB_DRIVER) ?></strong>
<?= t('Application version:') ?>
<strong><?= APP_VERSION ?></strong>
</li>
<?php if (DB_DRIVER === 'sqlite'): ?>
<li>
<?= t('PHP version:') ?>
<strong><?= PHP_VERSION ?></strong>
</li>
<li>
<?= t('PHP SAPI:') ?>
<strong><?= PHP_SAPI ?></strong>
</li>
<li>
<?= t('OS version:') ?>
<strong><?= php_uname('s').' '.php_uname('r') ?></strong>
</li>
<li>
<?= t('Database driver:') ?>
<strong><?= DB_DRIVER ?></strong>
</li>
<li>
<?= t('Database version:') ?>
<strong><?= $this->text->e($db_version) ?></strong>
</li>
<li>
<?= t('Browser:') ?>
<strong><?= $this->text->e($user_agent) ?></strong>
</li>
</ul>
</div>
<?php if (DB_DRIVER === 'sqlite'): ?>
<div class="page-header">
<h2><?= t('Database') ?></h2>
</div>
<div class="listing">
<ul>
<li>
<?= t('Database size:') ?>
<strong><?= $this->text->bytes($db_size) ?></strong>
@ -44,9 +72,9 @@
<?= $this->url->link(t('Optimize the database'), 'config', 'optimizeDb', array(), true) ?>&nbsp;
<?= t('(VACUUM command)') ?>
</li>
<?php endif ?>
</ul>
</div>
</ul>
</div>
<?php endif ?>
<?= $this->render('config/keyboard_shortcuts') ?>

View File

@ -27,7 +27,7 @@
"eluceo/ical": "0.8.0",
"erusev/parsedown" : "1.6.0",
"fguillot/json-rpc" : "1.0.3",
"fguillot/picodb" : "1.0.5",
"fguillot/picodb" : "1.0.7",
"fguillot/simpleLogger" : "1.0.0",
"fguillot/simple-validator" : "1.0.0",
"paragonie/random_compat": "@stable",

26
composer.lock generated
View File

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "0e754e4bc3eec85b3d14c748f1ed857a",
"content-hash": "c7f7baadd60fdcf8fb9e2e3a7214357f",
"hash": "d60e4b6b7ceb60202c48112ffbc33fba",
"content-hash": "fbb704fa621ed6dd3c60241913ea1686",
"packages": [
{
"name": "christian-riesen/base32",
@ -239,16 +239,16 @@
},
{
"name": "fguillot/picodb",
"version": "v1.0.5",
"version": "v1.0.7",
"source": {
"type": "git",
"url": "https://github.com/fguillot/picoDb.git",
"reference": "3b388ef12f8c57f3bca85d278a53cf6fa2d832b8"
"reference": "7f36dc3a7814ca0fc63439cd948e8acfeda672de"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fguillot/picoDb/zipball/3b388ef12f8c57f3bca85d278a53cf6fa2d832b8",
"reference": "3b388ef12f8c57f3bca85d278a53cf6fa2d832b8",
"url": "https://api.github.com/repos/fguillot/picoDb/zipball/7f36dc3a7814ca0fc63439cd948e8acfeda672de",
"reference": "7f36dc3a7814ca0fc63439cd948e8acfeda672de",
"shasum": ""
},
"require": {
@ -272,7 +272,7 @@
],
"description": "Minimalist database query builder",
"homepage": "https://github.com/fguillot/picoDb",
"time": "2016-02-20 02:56:11"
"time": "2016-03-12 14:31:33"
},
{
"name": "fguillot/simple-validator",
@ -397,16 +397,16 @@
},
{
"name": "paragonie/random_compat",
"version": "v1.2.1",
"version": "v1.2.2",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
"reference": "f078eba3bcf140fd69b5fcc3ea5ac809abf729dc"
"reference": "b3313b618f4edd76523572531d5d7e22fe747430"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/f078eba3bcf140fd69b5fcc3ea5ac809abf729dc",
"reference": "f078eba3bcf140fd69b5fcc3ea5ac809abf729dc",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/b3313b618f4edd76523572531d5d7e22fe747430",
"reference": "b3313b618f4edd76523572531d5d7e22fe747430",
"shasum": ""
},
"require": {
@ -441,7 +441,7 @@
"pseudorandom",
"random"
],
"time": "2016-02-29 17:25:04"
"time": "2016-03-11 19:54:08"
},
{
"name": "pimple/pimple",
@ -747,7 +747,7 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.1.0",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",