beta of cache debug view

This commit is contained in:
HB9HIL
2026-02-02 13:37:06 +01:00
parent 9fa0604810
commit 02eccc6f1a
3 changed files with 41 additions and 15 deletions

View File

@@ -408,40 +408,53 @@
<p><u><?= __("Current Configuration"); ?></u></p>
<table width="100%" class="table table-sm table-striped">
<tr>
<td><strong><?= __("Adapter"); ?></strong></td>
<td><strong><?= _pgettext("Cache Adapter","Primary adapter"); ?></strong></td>
<td>
<span class="badge text-bg-info"><?php echo ucfirst($cache_info['config']['cache_adapter'] ?? 'file'); ?></span>
<span class="badge text-bg-primary"><?php echo $cache_adapter; ?></span>
<?php if ($cache_adapter == $active_adapter) { ?>
<span class="badge text-bg-success float-end"><?= __("Active"); ?></span>
<?php } else { ?>
<span class="badge text-bg-danger float-end"><?= __("Failed"); ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><strong><?= __("Backup"); ?></strong></td>
<td><strong><?= _pgettext("Cache Backup Adapter (Fallback)","Backup adapter"); ?></strong></td>
<td>
<span class="badge text-bg-secondary"><?php echo ucfirst($cache_info['config']['cache_backup'] ?? 'file'); ?></span>
<span class="badge text-bg-primary"><?php echo $cache_backup; ?></span>
<?php if ($cache_backup == $active_adapter) { ?>
<span class="badge text-bg-success float-end"><?= __("Active"); ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td><strong><?= __("Path"); ?></strong></td>
<td><code><?php echo $cache_info['config']['cache_path'] ?: 'application/cache'; ?></code></td>
<td><strong><?= _pgettext("Cache Path","Path for files adapter"); ?></strong></td>
<td><code><?php echo $cache_path; ?></code></td>
</tr>
<tr>
<td><strong><?= __("Key Prefix"); ?></strong></td>
<td><code><?php echo $cache_info['config']['cache_key_prefix'] ?: __("(empty)"); ?></code></td>
<td><strong><?= _pgettext("Cache Key Prefix","Key Prefix"); ?></strong></td>
<td><code><?php echo $cache_key_prefix; ?></code></td>
</tr>
</table>
<?php if ($using_backup) { ?>
<div class="alert alert-danger mt-2 mb-0" role="alert">
<?= __("Cache is currently using the backup adapter because the primary is unavailable."); ?>
</div>
<?php } ?>
</div>
<div class="col-md-6">
<p><u><?= __("Cache Details"); ?></u></p>
<table width="100%" class="table table-sm table-striped">
<tr>
<td><strong><?= __("Total Size"); ?></strong></td>
<td><strong><?= _pgettext("Cache Details","Total Size"); ?></strong></td>
<td>
<span class="badge text-bg-primary"><?php echo $cache_info['details']['size'] ?? '0 B'; ?></span>
<span class="badge text-bg-primary"><?php echo $details_cache_size; ?></span>
</td>
</tr>
<tr>
<td><strong><?= __("Number of Keys"); ?></strong></td>
<td><strong><?= _pgettext("Cache Key","Number of Keys"); ?></strong></td>
<td>
<span class="badge text-bg-primary"><?php echo $cache_info['details']['keys_count'] ?? '0'; ?></span>
<span class="badge text-bg-primary"><?php echo $details_cache_keys_count; ?></span>
</td>
</tr>
</table>
@@ -455,7 +468,7 @@
<div class="border-top pt-3 mt-3">
<p><u><?= __("Available Adapters"); ?></u></p>
<div>
<?php foreach ($cache_info['adapters'] as $adapter => $supported) { ?>
<?php foreach ($cache_available_adapters as $adapter => $supported) { ?>
<?php if ($supported) { ?>
<span class="badge text-bg-success"><?php echo ucfirst($adapter); ?></span>
<?php } else { ?>