mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Include OS and client information in easy error info copy/paste and on the about dialog
This commit is contained in:
parent
b9fff4954a
commit
c06bb7784a
@ -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()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
],
|
||||
|
@ -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'
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,9 @@
|
||||
|
||||
<p>
|
||||
PHP Version <code>{{ $system_info['php_version'] }}</code><br>
|
||||
SQLite Version <code>{{ $system_info['sqlite_version'] }}</code>
|
||||
SQLite Version <code>{{ $system_info['sqlite_version'] }}</code><br>
|
||||
OS <code>{{ $system_info['os'] }}</code><br>
|
||||
Client <code>{{ $system_info['client'] }}</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -32,6 +32,11 @@ Error message:
|
||||
Stack trace:
|
||||
```
|
||||
{!! $exception->getTraceAsString() !!}
|
||||
```
|
||||
|
||||
System info:
|
||||
```
|
||||
{!! json_encode($system_info, JSON_PRETTY_PRINT) !!}
|
||||
```
|
||||
</textarea>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user