From ca81cbc37f1a91a2fe7ca23beb97087ff26d921e Mon Sep 17 00:00:00 2001 From: mscherer Date: Wed, 18 Mar 2026 19:01:31 +0100 Subject: [PATCH] Add optional logs link to dashboard Conditionally shows a "Logs" button in the dashboard status banner: - Log.engine = 'db': Links to DatabaseLog plugin admin (if loaded) - Log.engine = URL: Links to external logging service - Otherwise: No link shown --- templates/Admin/Queue/index.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/templates/Admin/Queue/index.php b/templates/Admin/Queue/index.php index cdcbf0d6..57a84ff4 100644 --- a/templates/Admin/Queue/index.php +++ b/templates/Admin/Queue/index.php @@ -19,6 +19,18 @@ */ use Cake\Core\Configure; +use Cake\Core\Plugin; + +// Determine logs URL based on Log.engine config +$logsUrl = null; +$logsExternal = false; +$logEngine = Configure::read('Log.engine'); +if ($logEngine === 'db' && Plugin::isLoaded('DatabaseLog')) { + $logsUrl = $this->Url->build(['plugin' => 'DatabaseLog', 'prefix' => 'Admin', 'controller' => 'Logs', 'action' => 'index']); +} elseif ($logEngine && is_string($logEngine) && str_starts_with($logEngine, 'http')) { + $logsUrl = $logEngine; + $logsExternal = true; +} ?> @@ -57,12 +69,20 @@ -
+
Html->link( '' . __d('queue', 'Manage Workers'), ['action' => 'processes'], ['class' => 'btn btn-sm btn-outline-dark', 'escapeTitle' => false] ) ?> + + > + + + + + +