Commit Graph

114 Commits

Author SHA1 Message Date
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
0ada0cc034 Standardize all table action buttons to btn-sm and use button elements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:48:09 +02:00
shuki
67f146609f Convert Edit from anchor to button to match Delete sizing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:47:29 +02:00
shuki
3a0379846e Reduce base font size from 2.3rem to 1.6rem for normal button sizing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:46:10 +02:00
shuki
2831d91916 Change schedule Edit button to btn-primary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:45:12 +02:00
shuki
5d32eee62f Use btn-xs for table action buttons in remotes and schedules
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:44:57 +02:00
shuki
ef491b6c2d Increase top padding to 30px on main container
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:44:04 +02:00
shuki
afdbdd14a1 Use inline style for container padding (scoped CSS can't target itself)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:43:09 +02:00
shuki
5c9e170454 Fix main container padding using standard Tailwind class p-2.5
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 05:41:35 +02:00
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