From 6be61875327d5c7b90f2a4afa8b307895bdff414 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 29 Apr 2023 11:15:30 +0200 Subject: [PATCH] Add base build info. --- app/Http/Controllers/DebugController.php | 13 ++++++++++++- resources/views/debug.twig | 6 +++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php index deac77a499..1cb72fa4ed 100644 --- a/app/Http/Controllers/DebugController.php +++ b/app/Http/Controllers/DebugController.php @@ -34,8 +34,8 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; -use Illuminate\View\View; use Illuminate\Support\Facades\Log; +use Illuminate\View\View; use Monolog\Handler\RotatingFileHandler; /** @@ -121,6 +121,8 @@ class DebugController extends Controller $now = today(config('app.timezone'))->format('Y-m-d H:i:s e'); $buildNr = '(unknown)'; $buildDate = '(unknown)'; + $baseBuildNr = '(unknown)'; + $baseBuildDate = '(unknown)'; $expectedDBversion = config('firefly.db_version'); $foundDBversion = FireflyConfig::get('db_version', 1)->data; if (file_exists('/var/www/counter-main.txt')) { @@ -129,6 +131,13 @@ class DebugController extends Controller if (file_exists('/var/www/build-date-main.txt')) { $buildDate = trim(file_get_contents('/var/www/build-date-main.txt')); } + if('' !== (string)env('BASE_IMAGE_BUILD')) { + $baseBuildNr = env('BASE_IMAGE_BUILD'); + } + if('' !== (string)env('BASE_IMAGE_DATE')) { + $baseBuildDate = env('BASE_IMAGE_DATE'); + } + $phpVersion = PHP_VERSION; $phpOs = PHP_OS; @@ -220,6 +229,8 @@ class DebugController extends Controller 'loginProvider', 'buildNr', 'buildDate', + 'baseBuildNr', + 'baseBuildDate', 'bcscale', 'userAgent', 'displayErrors', diff --git a/resources/views/debug.twig b/resources/views/debug.twig index ad21d35f07..ef88c89273 100644 --- a/resources/views/debug.twig +++ b/resources/views/debug.twig @@ -18,11 +18,15 @@ Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION | --- | --- | | Firefly III | {{ FF_VERSION }} | | Firefly III API | {{ config('firefly.api_version') }} | -| Build | {{ buildNr }}, {{ buildDate }} | +{% if isDocker %}| Build | {{ buildNr }}, {{ buildDate }} | +| Base Build | {{ baseBuildNr }}, {{ baseBuildDate }} |{% endif %} | DB version | {{ foundDBversion }} (exp. {{ expectedDBversion}}) | +{% if not isDocker %}| Docker | No |{% endif %} + | PHP | `{{ phpVersion }}` | | Host | `{{ phpOs }}` | + | System info | Value | | --- | --- | | System TZ | {{ tz }} |