Commit Graph

213 Commits

Author SHA1 Message Date
Thomas Lamprecht
8af03a8dbd ui: eslint auto-fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Thomas Lamprecht
aa396ea6b3 Revert "fix #2745: ui: backup: allow specifying remove parameter for manual backup"
Pushed this one out by mistake when commit a fixup, so do revert now
as I did not fully reviewed it and saw some UI changes I'd like to
do.

This reverts commit cfc6d15ed0.
2021-05-03 14:41:15 +02:00
Fabian Ebner
cfc6d15ed0 fix #2745: ui: backup: allow specifying remove parameter for manual backup
and also show the retention options that will be used for a given storage. A
user with Datastore.AllocateSpace and VM.Backup can already remove backups from
the GUI manually, so it shouldn't be a problem if they can set the remove flag
when starting a manual backup in the GUI.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-03 14:36:59 +02:00
Fabian Ebner
fddb041217 ui: backup: fill in some of the configured vzdump defaults
Do not fill in the default for compression, because the initial default for the
backend is to not compress, while the current default for the UI is zstd, which
is preferable.

The 'defaults' API call expects the user to have permissions on the storage,
because retention options are storage-dependent. Use a flag initialDefaults to
make sure storage-independent properties are only set once, so they are not
reset when a user changes the storage after editing them.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-03 14:36:59 +02:00
Thomas Lamprecht
d290acc84d ui: live-restore: refine notice
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-24 15:20:53 +02:00
Thomas Lamprecht
6da2926cbc ui: CT restore: make privilege level a tri-state radio group
Default to keeping the state of the archive, as that has the highest
chance to fully work, but allow to enforce either level.

It'd be good to add some more feedback of the to be restored guest,
i.e., the whole config..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-24 15:18:44 +02:00
Dominik Csapak
1bd7bcdbf1 ui: Utils: use render functions from widget-toolkit
they live there now, so we can delete them here and use the ones from
widget-toolkit instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 18:34:34 +02:00
Thomas Lamprecht
b988934559 ui: guest safe destroy: try to be a bit more telling in box/tooltip label
Try to be more clear about what those checkboxes do, hopefully
reducing potential confusion by (newer) users.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 13:20:46 +02:00
Thomas Lamprecht
ff89c79e72 ui: guest safe destroy: fix alias
`proxmoxSafeDestroy` is the one from the parent, also widget. missed
in general...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 13:19:07 +02:00
Fabian Ebner
af6f4b9ba0 ui: remove SafeDestroy window
which has been moved to proxmox-widget-toolkit.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 13:02:45 +02:00
Fabian Ebner
94d2359b78 ui: safe destroy guest: add checkbox for removal of unreferenced disks
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 12:48:41 +02:00
Fabian Ebner
803053dad8 ui: add SafeDestroyGuest window
The purge parameter is always explicitly set, which is different from the
existing behavior, but it does not rely on what the default in the backend is.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 12:48:41 +02:00
Thomas Lamprecht
52b31ee327 ui: live restore: make warning to a shorter note
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-15 17:21:47 +02:00
Stefan Reiter
878bbf0b96 ui: restore: add live-restore checkbox
Add 'isPBS' parameter for Restore window so we can detect when to show
the 'live-restore' checkbox.

Includes a warning about this feature being experimental for now.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-04-15 17:18:40 +02:00
Fabian Ebner
9ae4a024f0 ui: restore: fix bandwidth limit behavior
by allowing zero and updating the field name. Otherwise the hint mentioning zero
is wrong. Also, it's not only a read limit as the emptyText already indicates.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-03-15 13:26:05 +01:00
Dominik Csapak
ad8b37fa13 ui: window/Settings: fix labelWidth for saved user name
Somewhere during rendering of the window, extjs wants to add 5px to
the labelwidth for the surrounding container. Having a string here
results in the container having a width of 1505px instead of 155px and
the value of the field is far off to the right and not visible.

Changing to a number fixes that.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 16:35:22 +01:00
Stefan Reiter
73713991d5 ui: snapshot: show task viewer for progress log
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-02-11 18:19:18 +01:00
Thomas Lamprecht
399ffa767f ui: eslint: enforce "dot-notation" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:45:01 +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
Thomas Lamprecht
2a4971d8c9 ui: eslint: fix trailing spaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:29:55 +01:00
Dominic Jäger
a7221f8b23 safe destroy: Add HA to purge tooltip
This makes the enumeration complete.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2020-12-18 17:56:44 +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
Fabian Ebner
e969d18761 ui: storage backup view: add prune window
adapted from PBS. Main differences are:
    * API has GET/DELETE distinction instead of 'dry-run'
    * API expects a single property string for the prune options

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-24 14:13:20 +01:00
Thomas Lamprecht
77d7cf379f ui: ceph install mask: avoid showing version
we do not know yet which version will get installed for real, so just
drop that part.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-22 17:59:36 +01:00
Aaron Lauterer
d27a44a615 ui: fix column behavior with browser scaling
especially on chromium based browser (e.g. chrome, edge) it can happen,
depending on the zoom level, that the last column does not fit next to
the other columns and is moved below the other columns.

This results in an ugly looking UI and in the worst case makes it
unusable.

This can also be triggered if the monitor is set to a higher scaling /
different DPI settings. I was able to have the same problem in Edge when
setting the scaling in the windows display settings to 125% (Clone VM).

Changing the layout from columns with 0.5 width to extjs HBOXes with
flex 1 works as expected.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-11-17 09:58:49 +01:00
Thomas Lamprecht
a88c03c820 ui: window notes: refactor and code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-28 09:52:30 +01:00
Thomas Lamprecht
9fd52dd269 ui: storage selector: improve handling PBS special case
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-10 08:13:08 +02:00
Thomas Lamprecht
62ce892895 ui: backup now: disable compression field for PBS storage
a bit hacky but well..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-09 20:04:52 +02:00
Thomas Lamprecht
cd338fe153 ui: migrate: sort migrations hints by text column
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 19:24:27 +02:00
Fabian Ebner
11c17a01b7 Allow setting no target storage and make it default
so the current disk locations can be preserved even if
there are multiple local disks. And users don't have to
manually select the current storage if there is only one
local disk.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-06-06 18:49:08 +02:00
Fabian Ebner
0411c2c058 Don't show empty parentheses when size is not known
The size of VM state files and the size of unused disks not
referenced by any snapshot is not saved in the VM configuration,
so it's not available here either.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-06-06 18:49:08 +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
Tim Marx
8b4987e5a9 ui: migration: add maxHeight to migration window
to prevent indefinite growth in case of e.g. many local disks

Signed-off-by: Tim Marx <t.marx@proxmox.com>
2020-06-03 16:27:38 +02:00
Dominik Csapak
2892e74479 ui: remove Realm model and RealmComboBox
and use it from widget-toolkit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-18 18:42:16 +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
Dominik Csapak
1011b56983 ui: fix missing htmlEncodes
username can include some special characters, so we have
to escape them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-06 16:59:50 +02:00
Fabian Ebner
6fe863ba7e Improve storage selection on restore
Previously, the blank '' would be passed along and lead to a
parameter verfication failure.

For LXC the default behavior in the backend is to use 'local', so
disallow blank and auto-select the first storage supporting'rootdir'
instead.

For QEMU the default behavior in the backend is to use the
original layout from the backup configuration file, which
makes sense to use as the default in the GUI as well.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-05-06 16:23:40 +02:00
Thomas Lamprecht
dbbe181cad ui: fix indentation, again ...
exact same thing commit 67cb91e4d7
already did for the old location of this, but indentation error was
introduced again when moving it (fix y'all editors..)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-03 14:10:17 +02:00
Fabian Ebner
4119b159e9 ui: don't block offline migration due non-referenced disk in the config
All local disks can/will be migrated if not for a reason we don't
know about yet at this stage. The disks we get from the API call as
'local_disks' are either referenced by the config or by snapshots in
the config (which was not checked for and the reason one could run
into the 'else if' branch).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-29 12:17:14 +02:00
Thomas Lamprecht
3892d1e62e ui: snapshots: move hint to bottom and make it shorter
Moving it to the bottom of the dialog avoids other UI elements
jumping around when it gets displayed.

Further shorten the text itself, while the originally was good it was
a bit on the long side, users tend to overead to long warnings/hints
more easily, so try to be more terse.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-06 22:39:25 +01:00
Fabian Ebner
a6ebb96d7c Warn about file system state when a freeze would be needed, but isn't possible
If a snapshot of a running VM is taken and the RAM is not included, the backend
checks whether the QEMU Guest Agent is running inside the VM. If it is, it freezes
the file system, otherwise the snapshot is taken without freezing, which
could lead to an inconsistent file system state in the snapshot.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-02-06 22:31:39 +01:00
Fabian Ebner
7fb02366e0 Hide 'Include RAM' when VM isn't running
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-02-06 22:31:39 +01:00
Fabian Ebner
85b4f3cc12 Use 'isCreate' instead of 'snapname' to determine window layout
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-02-06 22:31:39 +01:00
Fabian Ebner
1952d3d953 Fix error message
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-02-06 22:31:39 +01:00
Thomas Lamprecht
37a48e7423 ui snapshot: improve template string usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 19:42:21 +01:00
Thomas Lamprecht
9a6b894fcc ui: follow up style fixes, don't cram expressions into one line
We do not want to have multiple expressions on the same line, if it'
really is an exception.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 19:31:54 +01:00
Dominik Csapak
4e0e6b77e9 gui: refactor snapshot window
using an Proxmox.window.Edit, which does many of the things we did
manually, also rewrite is in such way that we can use it for qemu
and lxc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00