From dd160ef1d7df0a9215c86a0bb5d8f38695c31fa0 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 13 Nov 2026 01:14:10 -0500 Subject: [PATCH] Rebuild Maintenance > Backup on the Update page's pattern: a status card at the top says when the last backup was made, what kind and when the next scheduled one is due, or instead that one is being made, the last one failed and why, the last good one is over 7 days old, none has been made yet, a queued one is stuck because cron isn't running, or there is no encryption key, with Back up now and Database only under it, and the page reloads itself every 10 seconds while a backup is being made except while an exported master key is showing; the backups list uses the standard list plumbing with sortable headers on date, type, size and status and the standard pager, no longer stops at the newest 100, shows who made each backup or that the schedule did, when it was last downloaded and why one failed, and a row menu copies its path on the server and its SHA-256 checksum, deletes a finished backup, takes a queued one off the queue or removes a failed or missing one, with the card left out when there are no backups; the schedule and retention card shows whether the Backup cron job is on and at what time, with Turn on and Change the time using the Cron page's enable_cron_job handler and cron_edit window; an At a glance column has the last Full Backup and Database Only, the schedule, retention, how many are kept and their size, free space, cron status and the backup folder; the encryption key is masked behind the eye with a copy button; the master key export moves to a new ajax modal, admin/modals/backup/backup_master_key.php, which asks for the password and says an encrypted copy is filed with the backups and every agent is notified, where the old window said the key was not written anywhere; delete_backup in admin/post/backup.php words its audit entry and message by the backup's status; no new CSS or JS; changelog entries added to 26.11.8 --- CHANGELOG.md | 16 + admin/backup.php | 779 +++++++++++++++------- admin/modals/backup/backup_master_key.php | 45 ++ admin/post/backup.php | 13 +- 4 files changed, 609 insertions(+), 244 deletions(-) create mode 100644 admin/modals/backup/backup_master_key.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 12170eac2..ec1c6146e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,16 @@ Update from Maintenance > Update — Queue Update hands the job to cron and it a - Invoices, quotes and recurring invoices: lines are added and changed on the page itself, and it no longer reloads each time. Under the lines there is one field in place of the row of boxes. Type a product's name or code and pick it - Enter takes the one picked out - and it goes on as a line at once, with its description, price and tax; on a quote it is billed as that product usually is, and on a recurring invoice counted per user or per device when that is how the product is set up. For a line that isn't one of your products, type what it is and press Enter, or pick Add at the bottom of the list. The new line's quantity is then ready to type over: Enter moves on to its price when it has none yet, and then back to the field for the next line. - Invoices, quotes and recurring invoices: click a line's name, description, quantity, price or tax to change it where it is. Enter, or clicking somewhere else, saves it; Escape puts it back; Tab goes on to the next. In a description Enter starts a new line, and Ctrl+Enter saves. Tax opens the list of rates. The line's amount, the totals, the amount due and the cards beside the page - balance, margin, hardware - follow as you go, and what you typed shows faded until it is saved. A line with no description shows where one goes while you are working on it. From the keyboard, Tab to any of them and press Enter. The Edit window is still in each line's menu, and is where a recurring invoice's line is set to count users, devices or license seats - a quantity that is counted can't be typed over. - Quotes: a line's menu has Billed - One time, Monthly, Quarterly or Yearly - so how often a line is billed changes in one click, and the line moves under its heading. +- Backups: Maintenance > Backup is rebuilt so that its first line answers what you open it for - is this ITFlow backed up? The top of the page says when the last backup was made, what kind it was and when the next scheduled one is due. When something needs you, it says that instead: a backup is being made now, the last one didn't finish and why, there hasn't been one for a week, none has been made yet, or one has been waiting because cron isn't running. Back up now and Database only are right under it. +- Backups: the page keeps itself up to date while a backup is being made, and shows it in the list as soon as it is done. It used to say it wouldn't refresh, and you reloaded to find out. +- Backups: the list of backups works like every other list - it sorts by its headings and has pages - and says more about each one: who made it or that the schedule did, when it was last downloaded, and why one failed. A backup's menu copies its path on the server, which is what restoring from the command line asks for, and its SHA-256 checksum, for checking a copy kept somewhere else. A backup still waiting to be made can be taken off the queue. +- Backups: the nightly backup is on the page. It shows whether the schedule is on and at what time, with Turn on and Change the time beside it, so there is no trip to Maintenance > Cron. Beside the page, At a glance has the last Full Backup and the last Database Only, how many backups are kept and the room they take, the free space left where they are kept, and whether cron is running. +- Backups: the encryption key is hidden until you click the eye, with a button to copy it; it used to sit on the page in full for anyone looking at the screen. Exporting the master key opens a window that asks for your password and says what will happen before it does. + +### Bug Fixes + +- Backups: the list showed only the newest 100. Older backups were still on the server, taking up room, with no way to download or delete them from the page. Every backup can now be reached. +- Backups: the window for exporting the master key said the key "is not written anywhere". An encrypted copy is filed with the other backups; the window now says so, and that every agent is notified of the export. ### Developer Updates @@ -23,6 +33,12 @@ Update from Maintenance > Update — Queue Update hands the job to cron and it a - A quantity or price is edited in a box laid over the number it replaces, which keeps its place unseen, so the columns don't move as a field opens; a name or description is edited in place of the text. The tax uses the select picker (`itflowSelect()`), opened from code under the line's tax. New in `css/itflow_custom.css`: `.itflow-line-field`, `.itflow-line-editor`, `.itflow-line-keep`, `.itflow-line-blank`, `.itflow-paper-add-field` and `tr.is-active`; the `.itflow-paper-add-grid` rules are gone. None of it prints. - `js/autocomplete.js` gains `pickFirst` (the first suggestion is picked out as the list opens, so Enter takes it) and `extra` / `onExtra` (a row under the list, always in view, for taking what was typed as it is - there when nothing matches too). Its list now opens above the field whenever it doesn't all fit below and there is more room above, as the select picker's does; it used to wait until under 120px was left. The asset form's operating system field is unchanged otherwise. - `getProductsForAutocomplete()` encodes with `JSON_HEX_TAG | JSON_HEX_AMP`, so a product's name or description can't end the ` + Backup - export the credential vault's master key. It only exists unwrapped + * inside a session, so the admin's own password is asked for again and is what unwraps it + * (admin/post/backup.php, backup_master_key). The key is shown once on the page that + * follows, and an encrypted copy is filed with the backups. + */ + +require_once '../../includes/modal_header.php'; + +ob_start(); + +?> + +
+ + + + +
+ +