fix(cpanel): add missing sitename/db_type to helper, pill button group
Universal: PR Check / Branch Policy (pull_request) Successful in 4s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 10s
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 17s
Universal: PR Check / Validate PR (pull_request) Failing after 12s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 2s
Universal: Auto Version Bump / Version Bump (push) Successful in 20s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 15s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 40s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 14s
Generic: Project CI / Lint & Validate (pull_request) Successful in 41s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 42s
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled

- CpanelHelper now returns sitename and db_type for info bar
- Cache module renders as single pill with three joined buttons
  (domain key, cache clear, temp clear)
This commit is contained in:
Jonathan Miller
2026-06-23 12:29:53 -05:00
parent 1e081139e6
commit d7efb61207
2 changed files with 15 additions and 18 deletions
@@ -16,25 +16,20 @@ $tempUrl = 'index.php?option=com_mokosuiteclient&task=display.clearTemp&format=
$domain = $domain ?? '';
?>
<?php if ($domain): ?>
<div class="header-item">
<span class="header-item-content" id="mokosuiteclient-domain" title="Support key — click to copy" style="cursor:pointer;">
<div class="header-item-icon"><span class="icon-key" aria-hidden="true"></span></div>
<div class="header-item-text"><?php echo htmlspecialchars($domain); ?></div>
</span>
</div>
<?php endif; ?>
<div class="header-item">
<a href="#" class="header-item-content" id="mokosuiteclient-clear-cache" title="Clear all Joomla cache">
<div class="header-item-icon"><span class="icon-bolt" aria-hidden="true" id="mokosuiteclient-cache-icon"></span></div>
<div class="header-item-text">Cache</div>
</a>
</div>
<div class="header-item">
<a href="#" class="header-item-content" id="mokosuiteclient-clear-temp" title="Clear temp directory">
<div class="header-item-icon"><span class="icon-trash" aria-hidden="true" id="mokosuiteclient-temp-icon"></span></div>
<div class="header-item-text">Temp</div>
</a>
<div class="header-item-content d-flex align-items-center gap-0" style="padding:0;">
<?php if ($domain): ?>
<a href="#" class="btn btn-sm btn-outline-secondary rounded-0 rounded-start border-end-0 d-flex align-items-center gap-1 px-3 py-2" id="mokosuiteclient-domain" title="Support key — click to copy" style="font-size:0.8rem;">
<span class="icon-key" aria-hidden="true"></span> <?php echo htmlspecialchars($domain); ?>
</a>
<?php endif; ?>
<a href="#" class="btn btn-sm btn-outline-primary <?php echo $domain ? 'rounded-0 border-end-0' : 'rounded-0 rounded-start border-end-0'; ?> d-flex align-items-center gap-1 px-3 py-2" id="mokosuiteclient-clear-cache" title="Clear all Joomla cache" style="font-size:0.8rem;">
<span class="icon-bolt" aria-hidden="true" id="mokosuiteclient-cache-icon"></span> Cache
</a>
<a href="#" class="btn btn-sm btn-outline-danger rounded-0 rounded-end d-flex align-items-center gap-1 px-3 py-2" id="mokosuiteclient-clear-temp" title="Clear temp directory" style="font-size:0.8rem;">
<span class="icon-trash" aria-hidden="true" id="mokosuiteclient-temp-icon"></span> Temp
</a>
</div>
</div>
<script>
@@ -32,9 +32,11 @@ class CpanelHelper
$pkgCache = json_decode($db->loadResult() ?? '{}');
return (object) [
'sitename' => $config->get('sitename', ''),
'mokosuiteclient_version' => $pkgCache->version ?? '',
'joomla_version' => (new Version())->getShortVersion(),
'php_version' => PHP_VERSION,
'db_type' => $config->get('dbtype', 'mysql'),
'debug' => (bool) $config->get('debug'),
'offline' => (bool) $config->get('offline'),
];