Commit Graph

53 Commits

Author SHA1 Message Date
Thomas Lamprecht
12809bba4f ui: dc/Backup: eslint fixes and code cleanup/refactoring
this one would deserve much more, especially the newer backup job
detail and not-backed-up view should be split out and done in a
declarative way (view view-controller)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 20:40:11 +02:00
Thomas Lamprecht
fa8d397162 ui: eslint: some more trailing comma fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:48:50 +01:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
ef725143c6 ui: eslint: enforce "no-unneeded-ternary" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:41:11 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Dominik Csapak
8267aa6375 ui: fix usage of findRecord
findRecord does not match exactly, but only at the beginning and
case insensitive, by default. Change all calls to be case sensitive
and an exactmatch (we never want the default behaviour afaics).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-26 10:52:07 +01:00
Dominik Csapak
fe1dd5bbbf ui: dc/Backup: disable pveCompressionSelector for pbs storages
like in window/Backup

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-09-03 18:04:25 +02:00
Aaron Lauterer
3183a5531b ui: not backed: add emptyText to search field
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-07-13 12:27:23 +02:00
Thomas Lamprecht
393b74ff27 ui: backup detail: rename button to "Job Detail"
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 20:04:32 +02:00
Thomas Lamprecht
386c9ce560 ui: backup detail: some small nits + padding adation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 20:04:04 +02:00
Thomas Lamprecht
e4b95752e3 ui: backup detail: move search bar in panel header to save vspace
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 20:02:55 +02:00
Aaron Lauterer
7d2fac4af5 fix #2609 gui: backup: add window for not backed guests
In case that there are guests which are not covered by any backup job, a
notification is shown and a window with a grid can be opened to view
these guests.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-07-09 14:12:59 +02:00
Aaron Lauterer
01ad47af9e gui: dc/backup: add new backup job detail view
The new detail view for backup jobs shows the settings similar to the
edit dialog but read only. Additionally it does show a list of all
included guests with their volumes and whether these volumes will be
included in the backup.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-07-09 14:12:59 +02:00
Aaron Lauterer
7f08d0d19f gui: dc/backup: move renderers to Utils.js
Moving the following renderers to Utils.js to be able to use them in
more than one place:
* render_backup_days_of_week
* render_backup_selection

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-07-09 14:12:59 +02:00
Thomas Lamprecht
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Thomas Lamprecht
1c783f74de ui: switch backup default compression selection to ZSTD
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-06 20:16:39 +02:00
Thomas Lamprecht
7a04ce2376 ui: dc/backup: add separators between panel buttons
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-06 19:56:33 +01:00
Thomas Lamprecht
a0fecb88ba ui: dc/backup: refactor and fix run-job-now
rather than reducing the total job count during execution (and that
not for all cases) do some checks first and pass only the known good
nodes to the for-each-node-POST-request loop, so we can omit all
checks there.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-06 19:55:43 +01:00
Stefan Reiter
448454ffcd ui: fix backup "Run now" with specific node selected
Previous behaviour was bugged and displayed "Node is offline" for all
non-selected nodes (only 1 can be selected at a time).

Also fix progress window to show correct number of nodes in backup job.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-11-05 07:26:45 +01:00
Stefan Reiter
43b2494b79 Code cleanup in Backup
Whitespace removal and consolidating VZDump's job id format into a
local variable.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-08-14 14:02:53 +02:00
Stefan Reiter
389d3cf19b fix #1594: add "Run now" button to cluster backup page
Iterate all (online) nodes client-side and call vzdump with the correct
parameters (according to the job selected) for each one.

Then, show a progress bar in a non-closeable modal-dialog, to ensure the
user stays on the Backup page during the /vzdump API calls. Any errors
that occurred will be displayed in a consolidated message box.

Includes a "confirm" dialog to not accidentally run a potentially large
backup job.

Curiously, the "pve-cluster-backup" data model seems to have been broken
entirely.  I'm not sure how it was working before, but the changes in
this patch need it fixed, so include that as well (use "mode" instead of
individual flags + "compress" is not a boolean).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-08-14 13:41:16 +02:00
Thomas Lamprecht
a82afef0b9 ui: pool backup: adapt labels a bit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-28 19:20:24 +02:00
Tim Marx
ab64886987 fix #1278 gui: backup: add backup mode pool
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-06-28 18:05:19 +02:00
Tim Marx
60e049c231 whitespace cleanup
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-06-28 18:01:04 +02:00
Dominik Csapak
4ecd1d075a fix #2122: use correct format in help text of timefield
this is shown on mouseover and read by textreaders

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-06 10:24:25 +01:00
Thomas Lamprecht
ef4ef788d5 use InputPanel from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
56a353b9e7 use RestProxy from widget toolkit
Split PVE specific models, which where not moved to the general
widget toolkit, in a separate folder: data/models/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
9fccc702ec use windowEdit from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
09cacce778 use KVCombobox from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
896c0d5019 use Checkbox from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
e7ade592e3 use Proxmox.Utils instead of PVE.Utils
some function are now in Proxmox.Utils instead, so we have to use that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
5720fafabc use Button from widget toolkit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
3b1ca3ff5d use Proxmox.button.StdRemoveButton where possible
most 'Remove' buttons we have used the same code pattern over and over,
with the StdRemoveButton we have a component which does all of this for
us

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Thomas Lamprecht
fc03fcb896 dc/Backup: do not focus node selector on window focus
Do not focus anything here in the case he backup window gains focus
again. Else, if we click outside of the window the nodefield gets
always focused again - even if another field was focused previously.
This is a bit confusing, rather have no field focused at all -
especially as a blank value will be often used here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-07-26 15:37:05 +02:00
Emmanuel Kasper
0de33b54b2 Add Help Button for Backup Modal Windows
Modal Windows disable the Workspace behind them, so it was not possible
to get onlineHelp when starting a oneshot backup or configuring a backup job.
2017-06-28 18:43:19 +02:00
Emmanuel Kasper
d5e771ce51 Rename 'create' to 'isCreate' in pveWindowEdit and subclasses
This fixes around 20 jslint type confusion warnings.
Also reduce the scope and document jslint warnings along the way.
No functional changes.
2017-03-02 10:36:35 +01:00
Dominik Csapak
c4bb940580 make backup/storage/ha resources/ha groups grid stateful
so that the column changes are saved in the browsers local storage

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-17 09:16:15 +01:00
Thomas Lamprecht
be8b69aa21 BackupEdit, cleanup: remove insideUpdate construct
insideUpdate protects for a endless loop which gets caused if the sm
selection change callback updates vmidField which then triggers the
vmidField change callback which updates the selection model again,
and the circle starts again.

As this construct is rather confusing when looking first at the code
replace it with a temporary suspend of the change event during the
vmidField update.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-10 09:56:05 +01:00
Dominik Csapak
ba93a9c665 move onlineHelp into classes from definition
this patch moves the onlineHelp ids into the javascript classes, instead
of defining them where we use the classes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-02 17:13:12 +01:00
Dominik Csapak
163bf3789c fix #944: do not filter by empty array
we set the pveNodeSelector to [] by default,
but filter by !node (![] == false), so that no vms are shown

this occurs, when the pveNodeSelector store loads after the store
for the vm list, which rarely happens

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-03 06:08:04 +02:00
Dominik Csapak
68f8c7659f jslint: fix access to uninitialized variable
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:09:17 +02:00
Dominik Csapak
a764c5f72e jslint: fix missing or extra semicolon
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:07:42 +02:00
Dominik Csapak
22f2f9d6c0 jslint: remove trailing commas
before ECMA5 trailing commas in arrays and objects
are forbidden

in jslint this is an error and cannot be deactivated

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:06:34 +02:00
Dominik Csapak
af3838c5ef show days of week as ranges
when selecting days in a backup job,
show every series of 3 or more days as range, instead
of single days
e.g. Monday-Wednesday instead of Monday, Tuesday, Wednesday

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-07 16:57:25 +02:00
Dominik Csapak
ae9e2161bc make enabled column wider in backupview
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-07 16:54:24 +02:00
Dominik Csapak
2bdf9dd3ff translate weekdays in backupgrid
previously we displayed always something like: "mon,tue,wed"
now we use the full name of the day and the correct translation
making it (eg in german):
"Montag, Dienstag, Mittwoch"

i did not to choose the first 3 letters, because we cannot be
sure they are unique for all workdays in every language

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-06 16:36:54 +02:00
Dominik Csapak
370ed4c837 make enabled column a checkcolumn in backupview
it is nicer than 'true' and 'false',
also this was not translated before

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-06 16:31:41 +02:00
Dominik Csapak
be37a97e93 fix compression selection in backup window
we wrongly assumed, that no compression argument for
vzdump meant 'no compression', instead it means 'lzo'

this patch mirrors that behaviour on the gui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-31 17:10:10 +02:00
Emmanuel Kasper
cfdc7ada3a Added UI elements for the backup job disabling function
Added a column in the datacenter backup job overview to see if a job
is enabled or not. Added checkbox to the input panel, which enables
or disables a job.
This closes bug/feature request 492.

This patch was missing in manager6
2016-02-17 11:57:36 +01:00