diff --git a/controllers/ExceptionController.php b/controllers/ExceptionController.php index 84a3b2a8..73e6f46b 100644 --- a/controllers/ExceptionController.php +++ b/controllers/ExceptionController.php @@ -77,7 +77,8 @@ class ExceptionController extends BaseApiController } return $this->renderPage($response->withStatus(500), 'errors/500', [ - 'exception' => $exception + 'exception' => $exception, + 'system_info' => $this->getApplicationService()->GetSystemInfo() ]); } } diff --git a/grocy.openapi.json b/grocy.openapi.json index ac5f9795..fa92de2c 100644 --- a/grocy.openapi.json +++ b/grocy.openapi.json @@ -60,7 +60,7 @@ "paths": { "/system/info": { "get": { - "summary": "Returns information about the installed grocy, PHP and SQLite version", + "summary": "Returns information about the installed grocy version, PHP runtime and OS", "tags": [ "System" ], diff --git a/services/ApplicationService.php b/services/ApplicationService.php index ef244d13..4115a7bc 100644 --- a/services/ApplicationService.php +++ b/services/ApplicationService.php @@ -71,7 +71,9 @@ class ApplicationService extends BaseService return [ 'grocy_version' => $this->GetInstalledVersion(), 'php_version' => phpversion(), - 'sqlite_version' => $sqliteVersion + 'sqlite_version' => $sqliteVersion, + 'os' => php_uname('s') . ' ' . php_uname('r') . ' ' . php_uname('v') . ' ' . php_uname('m'), + 'client' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'unknown' ]; } diff --git a/views/about.blade.php b/views/about.blade.php index dea55f33..d6814274 100644 --- a/views/about.blade.php +++ b/views/about.blade.php @@ -35,7 +35,9 @@

PHP Version {{ $system_info['php_version'] }}
- SQLite Version {{ $system_info['sqlite_version'] }} + SQLite Version {{ $system_info['sqlite_version'] }}
+ OS {{ $system_info['os'] }}
+ Client {{ $system_info['client'] }}

diff --git a/views/errors/base.blade.php b/views/errors/base.blade.php index 6e551f69..7b4e5322 100644 --- a/views/errors/base.blade.php +++ b/views/errors/base.blade.php @@ -32,6 +32,11 @@ Error message: Stack trace: ``` {!! $exception->getTraceAsString() !!} +``` + +System info: +``` +{!! json_encode($system_info, JSON_PRETTY_PRINT) !!} ```