Commit Graph

154 Commits

Author SHA1 Message Date
shuki
d5c53b254e Add 10px padding to main container
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:40:19 +02:00
shuki
83942e6b12 Remove page title from WHM plugin header
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:39:20 +02:00
shuki
58748b3df8 Add 'Add New' buttons to dashboard Remotes and Schedules cards
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:38:48 +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
3805b87300 Use bg-white for card backgrounds across all WHM pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:34:34 +02:00
shuki
100bad0599 Make base-100 transparent to inherit WHM background
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:33:18 +02:00
shuki
5a8470b3f5 Remove explicit background color to inherit WHM's background
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:32:07 +02:00
shuki
bc0aa1de11 Change DaisyUI error color from orange to red
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:30:24 +02:00
shuki
8243bc1c42 Revert active tab text color change
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:29:13 +02:00
shuki
bc2d2bf86a Set active tab text color to #fecc00
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:28:18 +02:00
shuki
6fc9c2e2b9 Add custom gniza color theme based on user palette
Custom DaisyUI theme using the provided color palette:
- Primary: dark blue rgb(5,61,142)
- Secondary/Error: orange rgb(238,118,45)
- Accent/Warning: yellow rgb(254,204,0)
- Info: teal rgb(90,168,189)
- Neutral: darker blue rgb(2,44,105)
- Base: white/gray

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:26:33 +02:00
shuki
1d3ef21568 Remove underline from nav tabs on hover
Override WHM's default anchor underline styling with no-underline class.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:19:03 +02:00
shuki
146c614617 Revert hover underline on navigation tabs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:18:14 +02:00
shuki
77c131abd4 Add underline on hover to navigation tabs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:17:36 +02:00
shuki
7ccaf4e454 Increase WHM base font size from 2rem to 2.3rem
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:15:26 +02:00
shuki
4aa8cf7ea5 Increase base font size from 1.7rem to 2rem
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:11:03 +02:00
shuki
70423cdf67 Fix column header: Remote Destination(s)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:10:23 +02:00
shuki
bf0464a81c Fix column header: Remote Destinations (plural)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:10:05 +02:00
shuki
92c3428f89 Add Remote Destination column to Active Cron Schedules table
Split cron_to_human() to return timing and remotes separately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:08:45 +02:00
shuki
db1b10ffb3 Reorder dashboard cards: Remotes, Schedules, Overview
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:07:43 +02:00
shuki
e6ac3dfe25 Show human-readable schedule timing on dashboard
Replace raw cron entries with descriptions like "Every hour, to rasp"
or "Daily at 02:00, all remotes". Add cron_to_human() to Cron.pm.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:07:05 +02:00
shuki
4759bb84b2 Fix join button alignment with m-0 on radio inputs
WHM CSS adds margin to checked radio inputs, causing the active
button in join groups to shift down. Added m-0 class to all
join-item radio buttons to override.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:05:04 +02:00
shuki
1efde7487b Replace all inline CSS with Tailwind utility classes
Convert style attributes to Tailwind: width:fit-content → w-fit,
background:#fafafa → bg-[#fafafa], display:none → hidden attr,
display:inline → inline class, max-height → max-h-[360px],
padding/border-radius/font-size → px-5 py-3 rounded-lg text-sm.
Update JS to use .hidden property instead of .style.display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:03:22 +02:00
shuki
a59c44e5ab Use Tailwind classes instead of inline styles for join alignment
Replace inline style with Tailwind inline-flex items-stretch classes
on join button groups. Rebuild CSS with new safelist entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:01:32 +02:00
shuki
57791ad8a2 Fix join button group alignment in WHM pages
WHM CSS causes the active/checked button in DaisyUI join groups
to shift down. Added inline display:inline-flex;align-items:stretch
to all join containers in remotes.cgi and restore.cgi.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:00:07 +02:00
shuki
749881dd5d Fix Run Now backup process getting killed on CGI exit
The forked child stayed in the CGI's process group and got killed
when Apache cleaned up the CGI process. Now uses double-fork with
POSIX::setsid() to fully daemonize the backup process.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 04:53:18 +02:00
shuki
f881a80557 Fix unbound variable error in _save_remote_globals
REMOTE_HOST, REMOTE_PORT, REMOTE_USER, REMOTE_BASE, BWLIMIT,
RETENTION_COUNT, and RSYNC_EXTRA_OPTS were referenced without
defaults in _save_remote_globals(), causing "unbound variable"
errors under set -u when called before any remote was loaded
(e.g., gniza remote list).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 04:48:00 +02:00
shuki
a321201826 Auto-create main config when adding first remote via WHM
gniza backup requires /etc/gniza/gniza.conf to exist. The WHM plugin
only created remote configs in remotes.d/ but not the main config,
causing "Config file not found" errors. Now creates it with defaults
when adding a remote if it doesn't exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 04:44:55 +02:00
shuki
0213ba8485 Remove deploy instructions from CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 04:38:54 +02:00
shuki
dee8004465 Fix gniza remote list failing when main config doesn't exist
remote list only reads remotes.d/ — no need to load gniza.conf.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 04:31:14 +02:00
shuki
425085f018 Add Run Now button to schedules page
Adds a "Run Now" button in each schedule's Actions column that
triggers the backup in the background, logging to the same cron
log file. Forks the process and redirects immediately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 04:30:42 +02:00
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
eb93333b9f Update documentation: git repo info, schedules, restore, WHM pages
- Add Repository section with SSH/HTTP/Web UI URLs
- Rewrite Schedules section: decoupled from remotes, hourly/daily/weekly/monthly/custom types
- Add schedule types table with cron patterns
- Add mailbox restore to commands and restore workflows
- Update commands list with full schedule CRUD and comma-separated remotes
- Update WHM plugin docs: restore page, schedule toggles, Runner.pm
- Update file layout: schedules.d/, rclone.sh, schedule.conf.example
- Add uninstall instructions
- Remove empty Production Server heading

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 02:57:47 +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
2c5fa2bcc0 Remove production server details from docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 02:54:48 +02:00
shuki
27cd8cc33c Fix install.sh for piped execution
- Use HTTP clone URL (no SSH auth needed)
- Fix BASH_SOURCE unbound variable when piped via curl

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