2636 Commits

Author SHA1 Message Date
Thomas Lamprecht
fce60ea5cb 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
64279ad199 fix #2572: gui: make snapshot panel visible for VM.Audit
with the now rewritten panels, this works as expected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Dominik Csapak
ce2c0e3a41 gui: refator SnapshotTree
using the better View, ViewModel, Controller style,
while doing this, make it generic so 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
Dominik Csapak
2f6265ba7b 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
Thomas Lamprecht
2f8f874dd6 ui dc: move cluster name info into join button
Avoids another textfield while still giving the information to the
user.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 16:08:10 +01:00
Stefan Reiter
cd9b4ce4a7 gui/cluster: show cluster name from joinInfo in join dialog
To help a user identify if they put in the joinInfo for the correct
cluster.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-01-30 15:13:01 +01:00
Stefan Reiter
af3b6cb1df gui/cluster: validate cluster name length on create
API limits this to 15, validate in GUI as well for instant user
feedback.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-01-30 15:13:01 +01:00
Thomas Lamprecht
3b22301a94 ui: fix disk controllers sortByPreviousUsage iteration
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-30 13:38:31 +01:00
Fabian Grünbichler
910ddb2315 www: add permissions button to userview
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-29 10:41:08 +01:00
Fabian Grünbichler
2e686bfa62 www: add 'users' columns to Groups model
it's useful information that now gets returned by the API, so might as
well display it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-28 20:57:37 +01:00
Wolfgang Link
40cc6e5e10 Protect the user's tfa key setting.
If oath or U2F is set, it should not be possible to change it
in the GUI on the user edit window.
It disables the second factor, but leave the tfa key behind
in the file tfa.cfg.
The key in the tfa.cfg file is a problem when the user tries to recreate a key.
The old key must be deleted before a new one can be created.
2020-01-28 13:46:54 +01:00
Thomas Lamprecht
8595dbbd2c manager: startIPStore: status can be null/undef
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-27 19:09:10 +01:00
Dominik Csapak
572fdede86 gui: qemu: HardwareView: improve button disable code
this improves following behaviours:
* do not loop over items multiple times
  (we iterated one time extra for efidisk)
* do not check every item for cloudinit
  (we even checked non-disk types)
* make the counts more generic using an object
* also disable cloudinit button when you have one pending
* also disable serial/net button when at limit or the user has
  not the right priviliges

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-24 10:10:48 +01:00
Dominik Csapak
a1ebd306c2 gui: qemu HardwareView: specify hardware counts in Utils
this also fixes the issue that we only showed 4 hostpci devices in
the gui despite raising the limit in the backend to 16

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-24 10:10:48 +01:00
Thomas Lamprecht
4ae7739f9a ui: controller selector: use OSDefaults.getDefaults
it does the fallback for us already

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-24 10:10:48 +01:00
Thomas Lamprecht
6dc68a2694 ui: controller selector: refactor and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-24 10:10:48 +01:00
Thomas Lamprecht
2f19df340a ui: avoid duplication of guest disc controller maxIDs definition
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-24 10:10:48 +01:00
Thomas Lamprecht
ce0d324563 ui: FW/Alias: whitespace/indentation fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-22 12:40:35 +01:00
Thomas Lamprecht
971b5f69d0 ui: FW/Alias: make grid flex
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-22 12:40:15 +01:00
Thomas Lamprecht
64daf1dc45 ui: FW/Alias: make edit window wider to fit IPv6 CIDR
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-22 12:39:58 +01:00
Thomas Lamprecht
797535a8ee fix #2552: ui: allow to collapse notes panel from guest summary
Allow to collapse and expand the "Notes" panel on the virtual guests
summary panel.

Further add a browser setting to control the default behavior, one
can chose from:
 * expand on show (default)
 * collapse on show
 * collapse if there are no notes

This way users can make slightly better use of the available screen
space for the guest status.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Co-developed-by: Stefan Reiter <s.reiter@proxmox.com>
2020-01-14 11:13:42 +01:00
Thomas Lamprecht
2e6bba4872 ui: settings: use default-value functionallity from state manager
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-10 15:50:59 +01:00
Dominik Csapak
2e07aa8d74 fix #2334: gui/cloudinit: enable edit button only when editor is set
when a user does not have the right privileges for cloudinit (e.g.
VM.Config.Network), we do not set an editor, which results in a button
that does nothing when pressed

fix this by enabling the button only when there is an editor set

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-09 17:42:34 +01:00
Stefan Reiter
ef7c9dc901 ui/vnc: reload IFrame-embedded xtermjs on LXC startup
Same as with previous QEMU patch, avoids manual reload after starting a
container while the "Console" window is open.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-19 13:56:48 +01:00
Stefan Reiter
b4215471ac ui/lxc: cleanup pveSelNode to variable
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-19 13:56:48 +01:00
Thomas Lamprecht
aa54547678 followup: code cleanup/nitpicking
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-18 19:40:09 +01:00
Stefan Reiter
4ed9ed011d ui/vnc: reload IFrame-embedded noVNC on VM startup
Avoids having to do the 'Console' -> 'Summary' -> 'Console' dance
everytime the VM is started and the Console window is currently open.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-18 17:55:57 +01:00
Stefan Reiter
d5b3f512bd ui/vnc: whitespace cleanup
and formatting

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-18 17:55:57 +01:00
Stefan Reiter
22ee250893 ui/qemu: cleanup pveSelNode to variable
'vm' has been in use further down anyway, let's move it up.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-18 17:55:57 +01:00
Dominik Csapak
7da84f7915 fix BandwidthSelector empty return value
if we do not want to return a value for submitting, we have to return
'null', every other value will get returned by getSubmitValue,
including 'undefined' and '' (empty string)

this fixes an issue when the user did not enter any bwlimit on
restore (the user would get an api error that bwlimit expects an
integer and not '')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-16 11:37:21 +01:00
Thomas Lamprecht
6f758a4b60 grammar fix: s/does not exists/does not exist/g
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-13 12:51:22 +01:00
Thomas Lamprecht
46181af51e followup: clarify which storage is used for automatic
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-11 09:18:58 +01:00
Thomas Lamprecht
b78d928cc9 followup: avoid a doc-gen bump, use general QM chapter as onlineHelp
doc was just bumped, there's no real content, I don't want to bump it
just for this, so replace with link to QM and a fixme comment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-11 09:01:12 +01:00
Dominik Csapak
aa9b0562fd ui: make vmstatestorage configureable
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-11 08:55:15 +01:00
Thomas Lamprecht
a54705c251 ui: vm/HDEdit: really™ fix backup checkbox default
By ensuring we delete the property if it's true (the backend default)
and set it is false, i.e., like originally (pre, mine and Aaron's
patch), but with reversed user input.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-10 11:29:13 +01:00
Thomas Lamprecht
a779b36621 ui: vm/HDEdit: fix backup checkbox default
The recent change transformed this checkbox from a negative "No
Backup" to a positive "Backup" did not accounted for changing the
default fallback for the parseBoolean call.

As this would had suggested that disk are backed-up which aren't
backup, it could lead to pretty devastating results...

fixes commit 28c0b7da7d966e9c150a18900766a8f153483cd2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-09 15:46:47 +01:00
Thomas Lamprecht
06a38d503d followup: rename to "Backup" but add tooltip
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-09 15:11:08 +01:00
Aaron Lauterer
28c0b7da7d ui: hdedit: change nobackup to include in backup
Change the behavior from having to activate the `No backup` checkbox to
exclude a disk from backups to having a `Include in backup` checkbox
that is checked by default.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-12-09 14:45:14 +01:00
Aaron Lauterer
ce937e935a ui: mpedit: activate backup on MP creation
This patch enables the backup checkbox by default for newly created
LXC mount points.

Hopefully this will help to avoid situations in the future where people
realize too late that the mount point has not been backed up when they
expected it to because they missed the checkbox.

The reason why `view.isCreate` is not passed directly is because
AFAIU the 'view.isCreate' can have one of three values:
* null - editing an existing mount point
* true - creating a new mp
* array('unusedX') - adding an unused disk again

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-12-09 14:31:45 +01:00
Dominik Csapak
a337e99041 gui: set minWidth for node/guest Summary
to make sure the panels are always readable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-09 14:20:37 +01:00
Dominik Csapak
8553241cb5 gui: let users choose the number of columns
introduce a new browser setting, with which the users can choose between
the automatic mode of choosing columns, or always using 1/2/3 columns

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-09 14:20:37 +01:00
Dominik Csapak
89582c74c6 gui: {dc, node}/Summary: choose columns by panel size
instead of viewport size, similar to the guest summary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-09 14:20:37 +01:00
Dominik Csapak
576d46ad8a gui: GuestSummary: choose columns based on container width
instead of the viewport width. This means that the number of columns can
change when the tree width changes, not only on browser window resize

for this to work reliably, we have to change the structure of the first
two panels, so that they are in one container for non-templates. if
we do not do this, there are some weird glitches on resizing with the
scrollbar

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-09 14:20:37 +01:00
Dominik Csapak
07fb20021d gui: refactor {lxc, qemu}/Summary to panel/GuestSummary
they are both similar enough to have it only once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-09 14:20:37 +01:00
Dominik Csapak
366d723925 ui: window/Restore: fixup unit conversion for bwlimit
vzdumps bwlimit is in KiB, so we have to tell our component that
and also remove the unnecessary multiplication with 1024
(the field previously returned the value in MiB)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-05 10:45:23 +01:00
Thomas Lamprecht
24f9caeb0b ui: backup restore: add start-after-restore checkbox
Restore may be a long running operation, as it goes over the common
create API path we can reuse the "start after create" for a "start
after restore" for free.

Add this as hbox layout, as else it looks like a lot of wasted space
in the right side of the window, especially when restoring a CT
backup (were the "unprivileged" checkbox is additionally there).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-05 10:45:23 +01:00
Thomas Lamprecht
da4ba55267 ui: backup restore: use new bandwith limit component
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-05 10:45:23 +01:00
Thomas Lamprecht
f8211903de ui: add date column for backups in storage content view
main use case is to sort by date, e.g., I just re-created a cluster,
did some VM/CT backups on a NFS dump of mine which already had quite
some backups. Now, on restore I knew that only the backups made
yesterday were interesting, so a sort by date would allow me to find
them all easily, thus this patch was born.

Simple frontend extraction of information from the volid, for now
only for backups as there's the only case were we have the info at
all. Called the model entry "vdate" for "virtual date".

Mayb adding the creation date to all entries could be a nice addition
for the API someday.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-05 10:45:23 +01:00
Thomas Lamprecht
8f26f60445 ui: ha: drop unused pve-ha-resources model
we only have the unified pve-ha-status model now

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-03 14:29:51 +01:00
Thomas Lamprecht
7ce422bbc0 ui: ha: calculate service name in model to fix sorting
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-03 14:29:36 +01:00