Commit Graph

17 Commits

Author SHA1 Message Date
shuki
afe8c856e2 Fix vertical offset on radio button join groups in remotes form
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 04:13:08 +02:00
shuki
fac7dc6c80 Add SMTP notification support with WHM settings UI
Send email via curl SMTP when SMTP_HOST is configured, falling back
to system mail/sendmail when empty. NOTIFY_EMAIL now accepts
comma-separated addresses. WHM Settings page gets an SMTP card
with Send Test Email button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:46:47 +02:00
shuki
84b2f464c9 Add remote directory init on WHM remote creation
When adding a remote via WHM, create the base directory structure
on the remote server (matching gniza init remote CLI behavior).
Creates $REMOTE_BASE/<hostname>/accounts/ via SSH mkdir or rclone mkdir.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:41:40 +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
shuki
ad884665cd Refactor setup wizard to reuse remotes.cgi and schedules.cgi
Setup wizard step 1 (SSH key) stays as-is, then redirects to
remotes.cgi?action=add&wizard=1 and schedules.cgi?action=add&wizard=1
instead of reimplementing its own forms.

- Remove ~200 lines of duplicated form/handler code from setup.cgi
- Wizard gets full feature parity (S3/GDrive, password auth, etc.)
- key_path pre-fills REMOTE_KEY, remote_name pre-fills REMOTES
- wizard=1 flag chains the flow: remote add → schedule add → index

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:30:44 +02:00
shuki
1303486ba2 Add hidden REMOTE_TYPE=ssh to setup wizard step 2
The setup wizard is SSH-only but was missing the REMOTE_TYPE field,
causing validation to fail with "must be ssh, s3, or gdrive".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:25:36 +02:00
shuki
bae2fc9d74 Place alert inline below buttons instead of floating
Add a dedicated alert area div below the action buttons. Alerts
render in normal document flow with proper padding and styling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:23:16 +02:00
shuki
a4bd26d33a Use position:sticky for alert so it stays visible while scrolling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:19:47 +02:00
shuki
0d64f6ad65 Place alert inside gniza container with absolute positioning
Append alert to the data-theme container instead of document.body
so it stays within the gniza content frame. Use position:absolute
relative to the container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:18:34 +02:00
shuki
f85cbb49c9 Fix alert: use !important via style tag to override WHM CSS
WHM's CSS overrides inline styles on positioned elements. Inject a
style tag with !important rules targeting #gniza-alert to ensure
fixed positioning, padding, and sizing are applied correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:17:51 +02:00
shuki
632309db0f Fix alert notifications: single instance, inline padding/sizing
Remove previous alert before showing new one to prevent stacking.
Add inline padding, border-radius, and font-size since WHM CSS
overrides DaisyUI alert defaults.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:16:05 +02:00
shuki
8f36cf94fc Revert toast styling back to original alert notifications
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:15:32 +02:00
shuki
e7159c9dc7 Fix toast: single instance, bottom-right, proper styling
Remove previous toast before showing new one to prevent stacking.
Position bottom-right with padding, rounded corners, and proper
font size for a clean toast appearance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:14:30 +02:00
shuki
bde1fe0822 Fix JSON control character escaping in connection test responses
SSH stderr can contain \r and other control characters that break
JSON parsing. Strip all control chars after escaping known ones.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 03:03:55 +02:00
shuki
df6753ad78 Fix toast notification positioning for WHM iframe
Use inline fixed positioning instead of DaisyUI toast classes which
don't work correctly inside WHM's iframe structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 02:59:41 +02:00
shuki
349603fc19 Use DaisyUI toast component for connection test notifications
Replace inline position:fixed alerts with DaisyUI toast toast-end
toast-top container in setup.cgi and remotes.cgi for consistent
notification styling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 02:57:19 +02:00
shuki
1459bd1b8b Initial commit: gniza backup & disaster recovery CLI + WHM plugin
Full-featured cPanel backup tool with SSH, S3, and Google Drive support.
Includes WHM plugin with Tailwind/DaisyUI UI, multi-remote management,
decoupled schedules, and account restore workflows.

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