Browse Source

Add build nr

pull/24/head
James Cole 4 years ago
parent
commit
2cd3803ebb
No known key found for this signature in database GPG Key ID: BDE6667570EADBD5
  1. 6
      app/Http/Controllers/DebugController.php
  2. 3
      resources/views/debug.twig

6
app/Http/Controllers/DebugController.php

@ -48,6 +48,7 @@ class DebugController extends Controller
$search = ['~', '#'];
$replace = ['\~', '# '];
$buildNr = '(unknown)';
$now = Carbon::now()->format('Y-m-d H:i:s e');
$phpVersion = str_replace($search, $replace, PHP_VERSION);
$phpOs = str_replace($search, $replace, PHP_OS);
@ -65,6 +66,10 @@ class DebugController extends Controller
$tz = env('TZ');
$isDocker = env('IS_DOCKER', false);
if(file_exists('/var/www/counter-main.txt')) {
$buildNr = file_get_contents('/var/www/counter-main.txt');
}
// get latest log file:
$logger = Log::driver();
$handlers = $logger->getHandlers();
@ -105,6 +110,7 @@ class DebugController extends Controller
'phpOs',
'interface',
'logContent',
'buildNr',
'cacheDriver',
'trustedProxies',
'isDocker'

3
resources/views/debug.twig

@ -8,7 +8,7 @@
Firefly III data importer debug page
</p>
<p style="font-family:Arial, Arial, Helvetica, sans-serif;font-size:12pt;width:600px;">
Copy and paste this textarea in your issue.
Copy and paste this textarea in your issue. DO NOT ADD BACKTICKS.
</p>
<textarea rows="30" cols="100" name="debug_info" id="debug_info" style="font-family:Menlo, Monaco, Consolas, monospace;font-size:8pt;">
Debug information generated at {{ now }} for Firefly III Data Importer version **{{ config('importer.version') }}**.
@ -16,6 +16,7 @@ Debug information generated at {{ now }} for Firefly III Data Importer version *
| Scope | Version |
| --- | --- |
| FIDI | {{ config('importer.version') }} |
| Build | {{ buildNr }} |
| PHP | {{ phpVersion }} |
| Host | {{ phpOs }} |

Loading…
Cancel
Save