Commit Graph

538 Commits

Author SHA1 Message Date
Christian Ebner
038e94bbbe fix #4442: Add date-time filtering for firewall logs
Extend the current firewall log view to add date time based filtering.
The user can switch between live view, which shows logs from the
unrotated log file, or to filter mode, where date time based filtering,
including rotated logs can be performed.

Enable the feature by setting the property and the submit format
for since and until timestamps expected by the api.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-11-13 15:23:49 +01:00
Dominik Csapak
01740cb2f7 ui: factor out standalone node check
into Utils and use it where we manually checked that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-13 11:19:46 +01:00
Dominik Csapak
ca97f6301a ui: wizards: allow adding tags in the qemu/lxc create wizard
in the general tab in the advanced section.

For that to work, we introduce a new option for the TagEditContainer
named 'editOnly', which controls now the cancel/finish buttons,
automatically enter edit mode and disable enter/escape keypresses.

We also prevent now the loading of tags while in edit mode, so the tags
don't change while editing (this can be jarring and unexpected).

Then we wrap that all in a FieldSet that implements the Field mixin, so
we can easily use that in the wizard. There we set a maxHeight so that
the field can grow so that it still fits in the wizard.

To properly align the input with the '+' button, we have to add a custom
css class there. (In the hbox we could set the alignment, but this is
not possible in the 'column' layout)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-06 17:02:08 +01:00
Friedrich Weber
98cbec545f ui: add some missing htmlEncodes
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
2023-07-25 16:59:09 +02:00
Noel Ullreich
f9b888b055 fix #4551: ui: use gettext on hardcoded byte units
Since some languages translate byte units like 'GiB' or write them in their
own script, this patch wraps units in the `gettext` function.

While most occurrences of byte strings can be translated within the
`format_size` function in `proxmox-widget-toolkit/src/Utils.js`, this patch
catches those instances that are not translated.

Signed-off-by: Noel Ullreich <n.ullreich@proxmox.com>
2023-07-05 09:12:57 +02:00
Fiona Ebner
895abeec1b ui: cloudinit: align default value for package upgrades with backend again
The default in Proxmox VE 7 was true and it was decided to keep that
and avoid a breaking change.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-21 12:41:22 +02:00
Dominik Csapak
7becf34fdd ui: improve permission handling for hardware
qemu/HardwareView:

with the new Hardware privileges, we want to adapt a few places where
we now allow to show the add/edit window with those permissions.

form/{PCI,USB}Selector:

increase the minHeight property of the PCI/USBSelector, so that
the user can see the error message if he has not enough permissions.

data/PermPathStore:

add '/hardware' to the list of acl paths

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-19 08:30:53 +02:00
Dominik Csapak
f7b5386a80 ui: qemu/USBEdit: add 'mapped' device case
to be able to select 'mapped' usb devices

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Dominik Csapak
b1d42186d1 ui: qemu/PCIEdit: rework panel to add a mapped configuration
reworks the panel to use a controller, so that we can easily
add the selector for mapped pci devices

shows now a selection between 'raw' and 'mapped' devices, where
'raw' ones work like before, and 'mapped' ones take the values
form the hardware map config

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Alexandre Derumier
4ab9632867 qemu: processor : set x86-64-v2-AES as default cputype for create wizard
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2023-06-12 17:31:37 +02:00
Fiona Ebner
e7fc4411ad ui: qemu: show progress bar for resize task
The API call was changed to spawn a task now.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-09 11:06:13 +02:00
Leo Nunner
a3862f699f fix #3428: cloud-init: add toggle for automatic upgrades
to control the newly introduced "ciupgrade" config parameter.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
2023-06-07 18:25:14 +02:00
Fabian Grünbichler
d1c7fa0209 ui: cloudinit: match backend privilege checks
the cloudinit options except for ipconfig are all modifiable with just
"VM.Config.Cloudinit".

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 18:24:15 +02:00
Alexandre Derumier
2c12348881 ui: qemu|lxc : fix firewall menu caps
The current VM.Console cap is wrong.

Only log panel needs VM.Console, the other ones only need VM.Audit.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
[ D: rewrite commit message a bit ]
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-07 13:21:48 +02:00
Dominik Csapak
00e4bd2e10 ui: qemu disk: honor iothread setting from config
To have a IOThread on by default in the wizard and on disk add, we
added a 'bind' for the value here. This also changes the value for
existing VM disks, and if one does not notice, modifies it away again
(since we don't have the controller here and isSCSISingle is false)

Simply don't bind value when we edit a VM disk from config

Note that this is only an issue in Chromium based browsers.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-21 15:51:40 +01:00
Dominik Csapak
1b48b8b7a1 ui: hide 'no tags' field and edit icon without VM.Config.Options
they cannot edit them anyway, so no point in showing them that
there is no tag

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-18 16:37:46 +01:00
Matthias Heiserer
8c3667927c ui: vm network edit: use the correct default model
commit c8f2cf4c1a broke the preselected
Model by setting it to ''. The GUI displays/selects an empty field
as default.

Fixes: c8f2cf4c ("ui: vm network: allow to override MTU for virtio devices")
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-18 12:55:11 +01:00
Thomas Lamprecht
ea7f41ed64 ui: vm vNIC: make MTU validation more fine-grained for better UX
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-18 11:44:47 +01:00
Thomas Lamprecht
9ea839b3dc ui: vm vNIC: add empty text for MTU field
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-18 11:44:29 +01:00
Dominik Csapak
366558a79d ui: tree/ResourceTree: show Tags in tree
and update the treenodes when the tags change.
since we change the vm node text (which we pass through to the config
panel), we have to change how we generate the text there slightly
(otherwise that would include the rendered tags)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:23 +01:00
Dominik Csapak
d70be8cd73 ui: {lxc, qemu}/Config: show Tags and make them editable
add the tags in the status line, and add a button for adding new ones

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:23 +01:00
Thomas Lamprecht
4523e5c6db ui: qemu hardware: avoid manual deletion handling for vCPU affinity
Switch to the `proxmoxtextfield` widget and enable its `deleteEmpty`
option, which gives us that all for free and better.

Fix label/emptyText to title casing while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 11:56:26 +01:00
Thomas Lamprecht
ea9b86f81f ui: qemu hardware: only enable affinity form field for root@pam
that then also ensures it isn't submitted, which would fail
permission checks for non-root users when editing the vCPU.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 11:53:57 +01:00
Thomas Lamprecht
5c63f8a1fe ui: qemu hardware: fix eslint error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 10:38:05 +01:00
Alexandre Derumier
689410588b ui: qemu: network: increase max queues to 64
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
 [T: 128 -> 64, see qemu-server commit]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 09:27:17 +01:00
Dominik Csapak
95f624b277 ui: cloudinit: disable remove button without VM.Config.Cloudinit
since it also needs both VM.Config.CDROM and VM.Config.Cloudinit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 09:03:26 +01:00
Leo Nunner
ad1d539e43 fix #4321: properly check cloud-init drive permissions
Checking for only Sys.Console prevents users who actually have the
correct permissions (VM.Config.CDROM, VM.Config.Cloudinit) from adding
a new cloud-init drive. Some checks needed to be adapted so that editing
cloud-init devices was possible with VM.Config.CDROM instead of
VM.Config.Disk.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
2022-11-17 08:36:58 +01:00
Fiona Ebner
5f1b4ea387 ui: qemu: options: use 'first disk' for legacy 'c' boot setting
The kvm man page mentions that using 'c' will try booting from the
first hard disk, so the current '(no bootdisk)' text in the UI is not
accurate, and boot can still succeed.

Reported in the community forum:
https://forum.proxmox.com/threads/115800/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-16 20:38:57 +01:00
Thomas Lamprecht
8b0bb902e6 ui: qemu monitor: rework comment about how (starting) trimming works
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-16 20:22:07 +01:00
Dominik Csapak
66937c6256 fix #4318: ui: qemu/Monitor: rework output retention mechanism
instead of saving maximum 500 lines, count commands + lines, and only
if both are over the limit, truncate the command list

this way, at least the last 10 commands + output are always visible, and
no visible output is truncated, while still not letting the log
grow infinitely

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-16 20:15:14 +01:00
Oguz Bektas
c8f2cf4c1a ui: vm network: allow to override MTU for virtio devices
we already have the 'mtu' option in the API, so we can just expose
that option inside the 'Advanced' menu for virtio network interfaces.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>

Moved the message tooltip below the advanced columns to avoid the line
break and make it more visually pleasing.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
2022-11-16 19:55:29 +01:00
Fiona Ebner
5a2e333c9e ui: lxc/qemu: cpu edit: make cpuunits depend on node's cgroup version
so that the default value and limits actually correspond to what will
be used. Defaults to values for cgroup v2, because that is the more
common scenario.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-15 14:08:55 +01:00
Dominik Csapak
17dcba38dd ui: qemu: increase available usb ports depending on machine and ostype
in the backend, we allow up to 14 usb ports, but only if the vm can
use the qemu-xhci controller which is only possible since machine
version 7.1 and if the ostype is l26 or windows > 7

for this we introduce two helpers:
* qemu_min_version: modeled after the signature of 'min_version' from
  qemu-server, expects two arrays of versions and returns true if
  the first parameter is equal or greater than the second version
* get_max_usb_count looks at the given ostype and machine string
  and returns the proper maximum number

since we don't currently have the actual running version of the vm in
the gui, this is only a heuristic for running vms. but since the actual
running version could only be lower if none is set (e.g. for
migrated/long-running vms) we allow more in the gui and the backend will
do the proper thing (either hotplug it, or make it a pending change)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-10 17:06:41 +01:00
Dominik Csapak
988898a625 ui: USBInputPanel: use correct maximum usb index
We already have that factored out in PVE.Utils, so use that.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-10 17:06:41 +01:00
Wolfgang Bumiller
310f32b7a9 Merge branch 'taskset' into taskset-merged 2022-11-10 09:43:32 +01:00
Daniel Bowder
9599d1f02e fix #3593: add js input for affinity
Adds a textfield for the affinity value. Delete that affinity value
when the textbox is empty.

Signed-off-by: Daniel Bowder <daniel@bowdernet.com>
2022-11-10 09:42:07 +01:00
Matthias Heiserer
87e222300c GUI: OS defaults: use SCSI single as default controller
Existing installs are not changed by this.

Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2022-11-08 17:50:38 +01:00
Matthias Heiserer
94b5e53a48 GUI: HDEdit: check iothread by default and move it from advanced section
Existing disks are not changed by this.
Especially in benchmarks, iothreads significantly improve IO performance.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2022-11-08 17:50:38 +01:00
Fiona Ebner
a3b5c220f9 ui: lxc/qemu: cpu edit: use emptyText for cpuunits
This makes it slightly clearer that it's a default value (not being
written to the config explicitly). It's also in preparation to bind
the default based on the cgroup version, where it's a bit nicer to
bind the emptyText instead of the value (or a user set value would be
overwritten when the binding updates).

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-08 16:24:49 +01:00
Fiona Ebner
61c0338790 ui: qemu/lxc: cpu edit: fix 'create' parameter for delete_if_default()
For lxc, commit 53395db1 ("lxc/ResoureEdit: move some cpu fields to
advanced options") made the fields available in the create wizard, so
the comment is also wrong.

Both wizards do a 'delete kv.delete' in their onSubmit() function, so
it didn't actually matter in practice.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-11-08 16:24:49 +01:00
Matthias Heiserer
0fe712de01 ui: qemu disk edit: fix typo in view model variable name
Worked before because we always set the correct one manually in the
view controllers init and scsi-controller change handler.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
 [ T: added actual subject and reworded commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-28 09:15:13 +02:00
Thomas Lamprecht
c956508c7d fix # 4044: ui: hd move: avoid bogus progress bar, show task viewer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-11 16:23:11 +02:00
Thomas Lamprecht
56148f253e ui: utils: drop some useles _array helpers, just use Object.entries
if we need to enforce ordering it may help to reintroduce them
though.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 09:07:14 +02:00
Dominik Csapak
dd8b3252af ui: fix adding hostpci > 5
by using the limits from PVE.Utils

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-25 18:22:24 +02:00
Thomas Lamprecht
c8e171a8bd ui: vm display: refactor and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-24 12:03:34 +02:00
Thomas Lamprecht
3bde324faf ui: move disk reassign into window/ folder
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-08 14:53:55 +02:00
Aaron Lauterer
1b42be84cf ui: hdmove: modernize/refactor
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:35:17 +02:00
Aaron Lauterer
48eb9401a4 ui: BusTypeSelector: change noVirtIO to withVirtIO
Double negated properties make it harder than necessary to parse
conditions.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:35:17 +02:00
Aaron Lauterer
a8d854afe2 ui: lxc/qemu: add disk reassign and action submenu
For the new HDReassign component, we follow the approach of HDMove to
have one componend for qemu and lxc.

To avoid button clutter, a new "Disk/Volume action" button is
introduced. It holds the Move, Reassign and Resize buttons in a
sub-menu.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:34:44 +02:00
Thomas Lamprecht
b49a0404be ui: vm hardware: module wide refactoring/cleanups/style changes/fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 16:46:30 +02:00