Commit Graph

104 Commits

Author SHA1 Message Date
Thomas Lamprecht
5265a2d1a9 ui: clarify that compression selector is for backup only
other targets/sources might have a different list of available
compressions.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-11 15:59:45 +02:00
Lukas Wagner
bacb4173fb ui: replication: backup: use renderEnabledIcon to render the enabled column
The new helper is available since proxmox-widget-toolkit version 3.6.1
which we can be sure to be available since a while in praxis, but
definitively by d/control constraints, since 51f54177 ("bump
proxmox-widget-toolkit dependency to 4.0.7")

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
 [TL: add context since when this function is available ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-01 09:44:28 +02:00
Lukas Wagner
2c4780cc18 ui: backup: allow to select notification target for jobs
This commit adds a possibility to choose between different options
for notifications for backup jobs:
    - Notify via email, in the same manner as before
    - Notify via an endpoint/group

If 'notify via mail' is selected, a text field where an email address
can be entered is displayed:

    Notify:         | Always notify  v |
    Notify via:     | E-Mail         v |
    Send Mail to:   | foo@example.com  |
    Compression:    | .....          v |

If the other option is selected selected, a combo picker for selecting
a channel is displayed:

    Notify:         | Always notify  v |
    Notify via:     | Endpoint/Group v |
    Target:         | endpoint-foo   v |
    Compression:    | .....          v |

The code has also been adapted to use the newly introduced
'notification-policy' parameter, which replaces the 'mailnotification'
paramter for backup jobs. Some logic which automatically migrates from
'mailnotification' has been added.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-08-16 11:11:12 +02:00
Dominik Csapak
25f7446c90 fix #4627: ui: backup edit: don't deselect all guests on load
'selectPoolMembers' will be called when the poolid field changes.
(That can even happen when the mode is not even 'pool') Due to how
the fields are set, there is a race condition that this will be
called after the remaining fields were set up, including the VM list
that might have entries selected.

Since the first thing we do here is to deselect all, this wiped the
virtual guest selection sometimes.

To fix it, check if we're actually in the correct mode before doing
anything.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-04-12 13:27:57 +02:00
Thomas Lamprecht
de422b3e7e ui: make renderEnabledIcon inline for now
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-17 11:37:01 +01:00
Lukas Wagner
b98ffc0d54 ui: backup: replication: replace non-clickable checkbox with icons
From a usability view, having a checkbox that is not clickable is pretty
misleading, especially if the visual style is exactly the same as in
other places in the UI where the checkbox is functional.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-03-17 11:20:43 +01:00
Dominik Csapak
d232c409f6 ui: BackupEdit: refactor edit window into declarative style
simplifies some things, e.g. en/disabling the grid and pool selector
while refactoring, cleanup up some smaller things like nested if/else
paths, unnecessary splitting of the deprecated 'dow' parameter, etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-11 18:47:34 +01:00
Dominik Csapak
e440f8a46a fix #4490: ui: add column filters in Backup Job edit window
by replacing the manual vm grid implementation and reusing the
VMSelector we already have. Since this is a full-fledged form field, we
can drop the complicated selection tracking / reselecting that we did
by saving into a hidden field.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-11 18:47:34 +01:00
Dominik Csapak
cc911f63aa ui: backup view: add scrolling overflow handler for the toolbar
As we got reports that some buttons get cut-off on resolutions close
to our minimal 720p one, especially if the "guest not in backup" jobs
hint is shown.

Link: https://forum.proxmox.com/threads/120714/
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: resolve merge conflict and reword commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 18:07:26 +01:00
Thomas Lamprecht
38e79438f7 ui: backup info: code cleanups
And switch the title of the "not in any job" info window to title
case, just like the button that opens it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 17:33:24 +01:00
Thomas Lamprecht
315feceaa8 ui: backup info: merge not-in-any-job warning into button to save space
We got reports in the forum about accessibility issues, as buttons
where cut-off due to the relatively long warning.

Use the old text as tooltip for the button and add the icon also
there.

Link: https://forum.proxmox.com/threads/120714/#post-526376
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 17:30:30 +01:00
Thomas Lamprecht
a4240b80e8 ui: backup info: make initial height dependent of body view-height
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 16:41:21 +01:00
Dominik Csapak
4c1fe169b4 ui: reduce default size of Backup detail window
on our minimal display size (1280x720), using height 700 is too large
when considering that the browser + os also need some vertical space.

For good measure, use a maximum of 600 pixels. Since the window is
resizable anyway, users with more space should not have a problem here.

reported in the forum:
https://forum.proxmox.com/threads/web-forms-extend-beyond-web-page-window-in-some-cases.120714

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-01-18 16:21:49 +01:00
Dominik Csapak
2389b2fa05 ui: backup job edit: fix form reset tracking
When the mode changes, we set the pool selector visible/hidden, but
we never disabled/enabled it. This tripped up the dirty state of the
form always showing the reset button as enabled.

Properly enabling and disabling the pool field fixes the dirty state
tracking.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-15 14:28:57 +01:00
Fiona Ebner
93880785c8 vzdump: handle new 'performance' property string
Also generalizes the way vzdump property strings are handled for jobs.
Something similar could be done in VZDump.pm, but there the maxfiles
and prune-backups settings are currently coupled, so a dedicated
parse_performance() is used instead. Can be changed once maxfiles is
dropped.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-10-10 13:04:17 +02:00
Dominik Csapak
9cd2e6382c ui: dc/Backup: add 'repeat-missed' checkbox
so that the users can configure how to handle missed job runs
move the vmgrid inside the ipanel in 'columnB', so that the
advanced items show below the vmgrid (not above)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-06-17 17:21:56 +02:00
Fabian Ebner
03875d7ac4 ui: manual backup: list possible template variables directly
rather than as a tooltip.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-05-12 17:17:56 +02:00
Fabian Ebner
34721757e7 close #438: ui: backup job: allow setting a notes-template for a job
Add a tooltip to the comment field, to better distinguish it from the
notes-template.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-28 14:16:04 +02:00
Thomas Lamprecht
31de6834c5 ui: backup/run now: avoid passing "next-run" parameter to backend
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-18 05:48:44 +01:00
Thomas Lamprecht
5a85eaec27 ui: backuo job detail: drop being stateful, increase default height
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-13 16:55:15 +01:00
Thomas Lamprecht
8aeb7146f9 ui: backuo jobs: move next-run column beside schedule one
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-13 16:55:15 +01:00
Dominik Csapak
c048ad30c8 vzdump: add new 'next-run' field for vzdump job listing
and calculate it by getting the next event after 'now' since
we currently have no way to get the last run time for jobs only running
on different cluster nodes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-01-13 15:33:41 +01:00
Fabian Ebner
392e3cf11d sorters: use correct property 'direction' and keep default 'ASC'
Ext.util.Sorter does not have an 'order' property, so 'order: DESC'
didn't have an effect. The default is 'ASC' and it is arguably the
preferred direction for all affected sorters anyways.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-12-16 10:11:48 +01:00
Thomas Lamprecht
fcb267e361 ui: backup: add retention column
half of this patch has already applied with the last commit by
mistake..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-12 18:19:20 +01:00
Thomas Lamprecht
c680135252 ui: ceph: fixup optional chaining operator
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-12 17:06:50 +01:00
Dominik Csapak
1a8bd90108 ui: dc/Backup: fix 'run now' button for jobs with comments
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-12 11:00:59 +01:00
Thomas Lamprecht
6e850b390c ui: backup view: move tbar schedule-sim button to the right
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 21:02:03 +01:00
Thomas Lamprecht
2577d492c3 ui: schedule sim: slight title adaption
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 21:02:03 +01:00
Dominik Csapak
4d6215bcf5 ui: dc/Backup: add schedule simulator button
so that a user can simply simulate the schedule

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-11 18:35:52 +01:00
Dominik Csapak
611ef47558 ui: dc/Backup: fix comment sort
without this, jobs without comments will not be included in the sort
properly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-11 18:35:52 +01:00
Dominik Csapak
3446e5bb26 ui: dc/Backup: never show id input field, autogenerate id
similar to pbs sync jobs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-11 18:35:52 +01:00
Thomas Lamprecht
01c9294f37 ui: backup job: limit ID to 20 chars for now
we're thinking of maybe just auto-filling it or allowing to edit it,
in any way, the comment field can/should be used for longer, free
form info.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-10 21:29:40 +01:00
Thomas Lamprecht
91380e55e6 ui: backup job: ellipsize read-only ID on edit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-10 19:26:56 +01:00
Thomas Lamprecht
04da73f851 ui: backup job: avoid row wrapping due to overly long label
We can express that it's a notification in the combobox.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-10 19:25:56 +01:00
Dominik Csapak
d9e05d3404 ui: dc/Backup: add comment field and column
and hide the ID column by default

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-10 16:11:42 +01:00
Dominik Csapak
e177268741 ui: dc/BackupEdit: use correct validation
we use a 'pve-configid', so use the 'ConfigId' vtype

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-10 16:11:42 +01:00
Dominik Csapak
20d15804f6 ui: dc/backup: show id+schedule instead of dow+starttime
we can now show the id (since its not autogenerated anymore),
and we can always show/edit the schedule instead of the dow+starttime

also add an 'ID' field to the edit/create window and update the
backupinfo window as well

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-10 16:11:00 +01:00
Fabian Ebner
e9e7d150d4 ui: cluster backup: only restrict storages to node when it's selected
Previously, only the storages for the local node would be shown, which
prevented configuring a job for remote nodes when the storage is not
available on the local node.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-09-21 15:25:37 +02:00
Thomas Lamprecht
faee421957 ui: backup job detail view: factor out to own file
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-09 17:45:13 +02:00
Thomas Lamprecht
2a7785a4a0 ui: backup job detail view: shrink code for set values of keep-X fields
makes it quite concise, but there's nothing really complex happening,
so should be still easy to grasp (especially with the comment added)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-08 16:14:02 +02:00
Thomas Lamprecht
021838f8d3 ui: backup job detail view: show retention settings in three columns
to safe vertical space for the actual guest+disk list

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-08 16:13:05 +02:00
Thomas Lamprecht
18af64dc99 ui: backup job detail view: merge mail notification when/to fields
While it surely is nice to follow the layout of the job creation/edit
panel for sharing familiarity, it does not means that we need to show
the data 1:1, we can profit from the read-only fact and merge stuff a
bit, like the mail to/when field.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-08 16:09:45 +02:00
Thomas Lamprecht
3f85cce836 ui: backup job detail view: simplify node renderer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-08 16:09:19 +02:00
Thomas Lamprecht
1226f0baa8 ui: backup job detail view: simplify enabled renderer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-08 13:38:25 +02:00
Fabian Ebner
bbb3e6f801 ui: backup job detail: also show retention settings
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-09-08 13:37:11 +02:00
Thomas Lamprecht
87336f4c74 ui: backup job detail view: fix coding style, xtype goes first
the code is unnecessarily hard to read else and goes against our
common style.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-08 13:37:11 +02:00
Thomas Lamprecht
57513f7639 ui: rename pveEditPruneInputPanel to pveBackupJobPrunePanel
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-08 12:56:15 +02:00
Fabian Ebner
759c752c36 fix #1803: ui: cluster backup: handle job-specific retention options
This was already possible via API (or manually editing vzdump.cron)
for a long time, but the settings were not visible in the UI at all.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-09-07 11:13:18 +02:00
Fabian Ebner
3e70f3c530 ui: cluster backup: fix running backup with prune settings
The API expects a property string for retention settings, so make sure
that's what's passed in.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-09-07 11:13:18 +02:00
Fabian Ebner
1a2e0e235e api: backup info: prefer kebab-case
And also add the 'backup-info' endpoint to the index.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 12:03:03 +02:00