Commit Graph

11 Commits

Author SHA1 Message Date
shuki
c20c019048 Add cPanel user activity logs page and WHM user log visibility
- Add per-user activity logging to AdminBin: every RESTORE_* action
  writes to /var/log/gniza/cpanel-<user>.log with action details and
  gniza command output
- New logs.live.cgi CGI with paginated activity list and detail view
- WHM logs.cgi now shows cpanel-*.log files with Owner column and
  structured activity entry viewer with expandable command output
- Add Logs nav item to cPanel plugin, update install.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 19:37:08 +02:00
shuki
89ca3187df Hide cron wrapper logs from logs listing
Only show per-run gniza-*.log files in the logs page. Cron wrapper
logs (cron-*.log) are redundant with the structured per-run logs
and just accumulate noise. They remain accessible via direct URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:09:17 +02:00
shuki
6be3e8fabf Show System Backup type in logs page
Add [TYPE:SYSBACKUP] marker to sysbackup log output. The logs page
detects this in the first 5 lines and displays "System" badge instead
of "Backup".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:06:54 +02:00
shuki
0fb640d585 Use d/m/Y H:i:s date format for all user-facing timestamps
Update log lines, email notifications, generated config comments,
and WHM logs page. Structural dates (filenames, snapshot dirs,
.complete markers) are unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:35:49 +02:00
shuki
d069c490ae Add Status column (Success/Warning/Error) to WHM logs list
Scans each log file for [ERROR] and [WARN] markers and displays
a color-coded badge in the logs table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 03:40:45 +02:00
shuki
7083efcc05 Add background job execution for restore and live status dashboard
- Runner.pm: extract _validate()/_build_cmd_line(), add run_async() that
  forks a detached child via setsid() to run commands in background
- restore.cgi: handle_step4() builds commands array and uses run_async()
  instead of blocking synchronous execution, redirects to logs.cgi
- logs.cgi: add auto-refresh JS (10s list view, 5s file view with
  auto-scroll) that polls index.cgi?action=status while gniza is running
- index.cgi: add live status card with AJAX polling and JSON endpoint
- Cron/schedule: redirect cron output to /dev/null (gniza has own logs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:07:09 +02:00
shuki
7bb6dca83f Add pagination to logs table (25 per page)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:55:43 +02:00
shuki
4784795f4d Change log View button to btn-secondary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:51:18 +02:00
shuki
f9326390d7 Convert all anchor buttons to button elements for consistent sizing
WHM styles override <a> tag padding, making anchor-based buttons
larger than native buttons. Using <button> elements everywhere
ensures uniform button sizing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:50:11 +02:00
shuki
f19609423f Rename display text to GNIZA Backup Manager across all WHM pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:37:26 +02:00
shuki
66870d9604 Add Logs tab to WHM plugin for viewing activity logs
Read-only log viewer with file list (sorted by mtime), per-file viewer
with level-based coloring (ERROR/WARN/INFO/DEBUG), level filter buttons,
cron log truncation (last 500 lines default), and path traversal protection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:30:56 +02:00