Commit Graph

80 Commits

Author SHA1 Message Date
shuki
7393412b20 Fix button vertical alignment on restore page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:09:30 +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
6a2986c505 Show SSH Key Setup accordion on edit remote too
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:06:02 +02:00
shuki
c602df43f6 Convert SSH Key Setup to collapsed accordion
Uses DaisyUI collapse component so the SSH guidance is hidden
by default and expandable on click.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:04:26 +02:00
shuki
ade44dfff4 Align button rows with items-center to fix vertical misalignment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:01:02 +02:00
shuki
35eac96f25 Change all Cancel/Back buttons from btn-ghost to btn-info
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:59:18 +02:00
shuki
6511715b2b Add Sys Backup toggle column to schedules list
Adds a "Sys Backup" column with an AJAX toggle in the schedules
table. Toggling it updates SYSBACKUP in the schedule config and
reinstalls the cron entry to include/remove --sysbackup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:49:48 +02:00
shuki
543b38bd53 Add 'gniza schedule run <name>' command
Runs a schedule's backup immediately with the correct --remote and
--sysbackup flags from the schedule config. Also fixes WHM Run Now
button to include --sysbackup when enabled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:46:26 +02:00
shuki
e0982fe7a1 Add --sysbackup flag to Cron.pm cron line builder
Cron.pm's install_schedule() had its own cron line builder that
didn't include --sysbackup. Now it checks SYSBACKUP=yes in the
schedule config and appends --sysbackup to the cron command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:38:46 +02:00
shuki
0da580666c Always reinstall cron when saving a schedule
Previously the cron was only updated if it was already active.
Now every save reinstalls the cron entry so changes (like enabling
--sysbackup) take effect immediately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:36:20 +02:00
shuki
3547b00ead Add sysbackup/sysrestore CLI commands and schedule integration
- Add lib/sysbackup.sh and lib/sysrestore.sh for system-level
  backup and restore of WHM/cPanel config, packages, and cron jobs
- Wire cmd_sysbackup and cmd_sysrestore into bin/gniza
- Add --sysbackup flag to cmd_backup: runs system backup after all
  account backups complete
- Add SYSBACKUP schedule config key so cron jobs can include
  --sysbackup automatically via build_cron_line()
- Add "Include system backup" toggle to WHM schedule form
- Revert sysbackup toggle from remotes.cgi (belongs in schedules)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:30:10 +02:00
shuki
417bb8cd39 Show system backup toggle on edit remote too
The sysbackup toggle is now available for both add and edit flows,
so users can trigger a system backup against any existing remote.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:24:37 +02:00
shuki
376d6078aa Add initial system backup toggle to remote setup form
When adding a new remote, a toggle lets the user immediately run
gniza sysbackup against the new remote. The backup forks to
background with output logged to /var/log/gniza/sysbackup-<name>.log.
Toggle is hidden on edit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:23:16 +02:00
shuki
3a74e4fd7a Add client-side table sorting to all tables
Clicking any column header sorts the table rows. Supports text and
numeric sorting with ascending/descending toggle and arrow indicators.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 15:48:51 +02:00
shuki
46b5644074 Sort snapshot dropdown latest first (descending)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 06:00:40 +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
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