mirror of
https://github.com/grocy/grocy.git
synced 2025-08-14 17:54:40 +00:00
Include OS and client information in easy error info copy/paste and on the about dialog
This commit is contained in:
@@ -77,7 +77,8 @@ class ExceptionController extends BaseApiController
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->renderPage($response->withStatus(500), 'errors/500', [
|
return $this->renderPage($response->withStatus(500), 'errors/500', [
|
||||||
'exception' => $exception
|
'exception' => $exception,
|
||||||
|
'system_info' => $this->getApplicationService()->GetSystemInfo()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -60,7 +60,7 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"/system/info": {
|
"/system/info": {
|
||||||
"get": {
|
"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": [
|
"tags": [
|
||||||
"System"
|
"System"
|
||||||
],
|
],
|
||||||
|
@@ -71,7 +71,9 @@ class ApplicationService extends BaseService
|
|||||||
return [
|
return [
|
||||||
'grocy_version' => $this->GetInstalledVersion(),
|
'grocy_version' => $this->GetInstalledVersion(),
|
||||||
'php_version' => phpversion(),
|
'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>
|
<p>
|
||||||
PHP Version <code>{{ $system_info['php_version'] }}</code><br>
|
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>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@@ -32,6 +32,11 @@ Error message:
|
|||||||
Stack trace:
|
Stack trace:
|
||||||
```
|
```
|
||||||
{!! $exception->getTraceAsString() !!}
|
{!! $exception->getTraceAsString() !!}
|
||||||
|
```
|
||||||
|
|
||||||
|
System info:
|
||||||
|
```
|
||||||
|
{!! json_encode($system_info, JSON_PRETTY_PRINT) !!}
|
||||||
```
|
```
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user