feat: consume BackupStatusHelper in bridge heartbeat #223

Open
opened 2026-06-20 23:33:57 +00:00 by jmiller · 1 comment
Owner

Context

MokoSuiteBackup now ships BackupStatusHelper (merged in MokoSuiteBackup PR #53, closes MokoSuiteBackup#47).

Changes Required

In the bridge plugin (plg_system_mokosuiteclient_backup), discover and call the helper during heartbeat:

$class = 'Joomla\Component\MokoSuiteBackup\Administrator\Helper\BackupStatusHelper';
if (class_exists($class)) {
    $payload['backup_status'] = $class::getStatusSummary();
}

getStatusSummary() Returns

Field Example Description
installed true Whether MokoSuiteBackup is installed
latest.status complete Last backup result (complete/fail)
latest.backup_type full Type: full, database, files, differential
latest.backup_start 2026-06-20 03:00:00 Start timestamp
latest.backup_end 2026-06-20 03:05:23 End timestamp
latest.total_size 52428800 Archive size in bytes
latest.destination local Storage: local or remote
latest.profile Daily Full Profile name
latest.origin cli Origin: backend, cli, api, scheduled
totals.recent_total 7 Backups in last 7 days
totals.recent_success 7 Successes in last 7 days
totals.success_streak 28 Consecutive successes

Convention

Every MokoSuite extension ships a StatusHelper in its own component namespace with getStatusSummary(): array. The bridge iterates known components and checks class existence.

Real-time Events

The onMokoSuiteBackupAfterRun Joomla event fires after every backup with args: success, record_id, description, profile_id, origin.

Depends On

  • MokoSuiteBackup#47 (completed)
## Context MokoSuiteBackup now ships `BackupStatusHelper` (merged in MokoSuiteBackup PR #53, closes MokoSuiteBackup#47). ## Changes Required In the bridge plugin (`plg_system_mokosuiteclient_backup`), discover and call the helper during heartbeat: ```php $class = 'Joomla\Component\MokoSuiteBackup\Administrator\Helper\BackupStatusHelper'; if (class_exists($class)) { $payload['backup_status'] = $class::getStatusSummary(); } ``` ## getStatusSummary() Returns | Field | Example | Description | |-------|---------|-------------| | `installed` | `true` | Whether MokoSuiteBackup is installed | | `latest.status` | `complete` | Last backup result (complete/fail) | | `latest.backup_type` | `full` | Type: full, database, files, differential | | `latest.backup_start` | `2026-06-20 03:00:00` | Start timestamp | | `latest.backup_end` | `2026-06-20 03:05:23` | End timestamp | | `latest.total_size` | `52428800` | Archive size in bytes | | `latest.destination` | `local` | Storage: local or remote | | `latest.profile` | `Daily Full` | Profile name | | `latest.origin` | `cli` | Origin: backend, cli, api, scheduled | | `totals.recent_total` | `7` | Backups in last 7 days | | `totals.recent_success` | `7` | Successes in last 7 days | | `totals.success_streak` | `28` | Consecutive successes | ## Convention Every MokoSuite extension ships a StatusHelper in its own component namespace with `getStatusSummary(): array`. The bridge iterates known components and checks class existence. ## Real-time Events The `onMokoSuiteBackupAfterRun` Joomla event fires after every backup with args: success, record_id, description, profile_id, origin. ## Depends On - MokoSuiteBackup#47 (completed)
Author
Owner

Branch created: feature/223-feat-consume-backupstatushelper-in-bridg

git fetch origin
git checkout feature/223-feat-consume-backupstatushelper-in-bridg
Branch created: [`feature/223-feat-consume-backupstatushelper-in-bridg`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteClient/src/branch/feature/223-feat-consume-backupstatushelper-in-bridg) ```bash git fetch origin git checkout feature/223-feat-consume-backupstatushelper-in-bridg ```
Sign in to join this conversation.
No labels
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteClient#223