fix(dashboard): require action logs, enable on install, show alert if disabled
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Blocked by required conditions
Platform: moko-platform CI / Gate 4: Governance (push) Blocked by required conditions
Platform: moko-platform CI / Gate 5: Template Integrity (push) Blocked by required conditions
Platform: moko-platform CI / CI Summary (push) Blocked by required conditions
Universal: Auto Version Bump / Version Bump (push) Successful in 14s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 25s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 1m37s
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Blocked by required conditions
Platform: moko-platform CI / Gate 4: Governance (push) Blocked by required conditions
Platform: moko-platform CI / Gate 5: Template Integrity (push) Blocked by required conditions
Platform: moko-platform CI / CI Summary (push) Blocked by required conditions
Universal: Auto Version Bump / Version Bump (push) Successful in 14s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 25s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 1m37s
- Install script enables actionlog/joomla and system/actionlogs plugins - Dashboard shows alert banner with enable link when action logs disabled - Reverted conditional hiding of UI (action logs is a hard requirement)
This commit is contained in:
@@ -38,6 +38,15 @@ $actionLogsEnabled = Joomla\CMS\Component\ComponentHelper::isEnabled('com_action
|
||||
?>
|
||||
|
||||
<div id="mokosuiteclient-dashboard">
|
||||
<?php if (!$actionLogsEnabled): ?>
|
||||
<div class="alert alert-danger d-flex align-items-center gap-2 mb-4">
|
||||
<span class="icon-exclamation-triangle" style="font-size:1.25rem"></span>
|
||||
<div>
|
||||
<strong>Action Logs Required</strong> — MokoSuite requires Joomla's Action Logs component to be enabled for login tracking and audit compliance.
|
||||
<a href="<?php echo Route::_('index.php?option=com_plugins&filter[search]=actionlog'); ?>" class="alert-link ms-1">Enable Action Log Plugins</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- Site Info Bar -->
|
||||
<div class="mokosuiteclient-info-bar card mb-4">
|
||||
<div class="card-body">
|
||||
@@ -161,14 +170,12 @@ $actionLogsEnabled = Joomla\CMS\Component\ComponentHelper::isEnabled('com_action
|
||||
Global Check-in
|
||||
</a>
|
||||
</div>
|
||||
<?php if (Joomla\CMS\Component\ComponentHelper::isEnabled('com_actionlogs')): ?>
|
||||
<div class="col-6 col-md-4 col-xl-3">
|
||||
<a href="<?php echo Route::_('index.php?option=com_actionlogs'); ?>" class="btn btn-outline-secondary w-100 py-3">
|
||||
<span class="icon-list d-block mb-1" aria-hidden="true" style="font-size:1.5rem"></span>
|
||||
View Logs
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="col-6 col-md-4 col-xl-3">
|
||||
<a href="<?php echo Route::_('index.php?option=com_scheduler'); ?>" class="btn btn-outline-secondary w-100 py-3">
|
||||
<span class="icon-clock d-block mb-1" aria-hidden="true" style="font-size:1.5rem"></span>
|
||||
@@ -274,7 +281,6 @@ $actionLogsEnabled = Joomla\CMS\Component\ComponentHelper::isEnabled('com_action
|
||||
</div>
|
||||
|
||||
<!-- Login Activity Chart -->
|
||||
<?php if ($actionLogsEnabled): ?>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<strong><span class="icon-user" aria-hidden="true"></span> Login Activity (14 days)</strong>
|
||||
@@ -283,7 +289,6 @@ $actionLogsEnabled = Joomla\CMS\Component\ComponentHelper::isEnabled('com_action
|
||||
<canvas id="mokosuiteclient-chart-logins" height="140"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Pending Updates -->
|
||||
<div class="card mb-3">
|
||||
@@ -377,11 +382,7 @@ $actionLogsEnabled = Joomla\CMS\Component\ComponentHelper::isEnabled('com_action
|
||||
<div class="card-header">
|
||||
<strong><span class="icon-user" aria-hidden="true"></span> Recent Logins</strong>
|
||||
</div>
|
||||
<?php if (!$actionLogsEnabled): ?>
|
||||
<div class="card-body text-center text-muted py-3">
|
||||
<span class="icon-warning text-warning"></span> Action Logs component is disabled. Enable it to track login activity.
|
||||
</div>
|
||||
<?php elseif (!empty($recentLogins)): ?>
|
||||
<?php if (!empty($recentLogins)): ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-striped mb-0">
|
||||
<thead><tr><th>User</th><th>App</th><th>IP</th><th>Time</th></tr></thead>
|
||||
|
||||
@@ -93,6 +93,10 @@ class Pkg_MokosuiteclientInstallerScript
|
||||
$this->enablePlugin('task', 'mokosuiteclientdemo');
|
||||
$this->enablePlugin('task', 'mokosuiteclientsync');
|
||||
|
||||
// Ensure Joomla action log plugins are enabled (required for login tracking)
|
||||
$this->enablePlugin('actionlog', 'joomla');
|
||||
$this->enablePlugin('system', 'actionlogs');
|
||||
|
||||
// Migrate params from core plugin to feature plugins (one-time)
|
||||
$this->migrateFeatureParams();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user