Commit Graph

222 Commits

Author SHA1 Message Date
Friedrich Weber
e8b411f1c5 fix #4474: ui: guest stop: offer to overrule active shutdown tasks
Implement a new "guest stop" confirmation message box which first
checks if there is an active shutdown task for the same guest that is
visible to the logged-in user. If there is at least one, the dialog
displays an additional default-on checkbox for overruling active
shutdown tasks. If the user confirms and the checkbox is checked, the
UI sends a guest stop API request with the `overrule-shutdown`
parameter set to 1. If there are no active shutdown tasks, or the
checkbox is unchecked, the UI sends a guest stop API request without
`overrule-shutdown`.

To avoid an additional API request for querying active shutdown tasks,
check the UI's current view of cluster tasks instead, which is fetched
from the `pve-cluster-tasks` store.

As the UI might hold an outdated task list, there are some
opportunities for races, e.g., the UI may miss a new shutdown task or
consider a shutdown task active even though it has already terminated.
These races either result in a surviving shutdown task that the user
still needs to abort manually, or a superfluous `override-shutdown=1`
parameter that does not actually abort any tasks. Since "stop
overrules shutdown" is merely a convenience feature, both outcomes
seem bearable.

The confirmation message box is now always marked as dangerous (with a
warning sign icon), whereas previously it was only marked dangerous if
the stop issued from the guest panel, but not when issued from the
resource tree command menu.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: squash in some slightly opinionated code/style clean-ups ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-20 20:32:32 +02:00
Fiona Ebner
bb4741c7e9 close #4513: ui: backup job: add tab for advanced options
pigz is not exposed, because it only works after manually installing
the pigz package.

ionice is not exposed, because it only works in combination with the
BFQ scheduler and even then not in all cases (only affects the
compressor when doing snapshot/suspend mode backup of a VM).

The pbs-entries-max performance option is not exposed. It is rather
niche and hard to understand. It serves as an escape hatch for
rare/extreme cases.

These can still be added with appropriate notes if there is enough
user demand.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-17 16:05:09 +02:00
Filip Schauer
4c406fedbd ui: lxc: add edit window for device passthrough
Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
2024-04-17 10:51:21 +02:00
Dominik Csapak
bb3fa9def4 ui: add wizard to allow importing from ESXi attached as storage
Add a new 'import' panel for storages supporting the 'import'
content type that shows a list of configs to import.

When opening the wizard, we query the meta info from the new
import-metadata API endpoint, and pre-fill the fields and shows
potential warnings or things to watch out for, returned by the API.

For disks and networks we allow to select which one to use and which
storage/bridge to import to.

Additionally, users can opt-in to a live-import, where the VM is
immediately started and storage requests are fetched from the target
on demand while importing the rest in the background.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: some fixes, clean-ups and commit message rewording ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-14 15:17:43 +01:00
Dominik Csapak
ddbddff766 ui: allow adding the esxi storage type
also change the icon to 'fa-cloud-download', hide the 'unknown' status
in the tree, and hide the Summary info from the storage browser

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-14 15:17:43 +01:00
Stefan Hanreich
a3c059c559 sdn: ipam: add ipam panel
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-21 20:27:38 +01:00
Stefan Hanreich
1d2ee4a255 sdn: subnet: add panel for editing dhcp ranges
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-21 20:27:38 +01:00
Dominik Csapak
fc7b556d4f ui: refactor iso-selector out of the cd input panel
and make it into a proper field.
it's intended to be used like a single field, otherwise exactly as before

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-21 09:34:12 +01:00
Lukas Wagner
2cb6c8df37 ui: dc: remove unneeded notification events panel
The notification event settings are replaced by notification matchers,
which will combine the notification routing and filtering into a
single concept.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 16:20:03 +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
Alexandre Derumier
202e26d425 sdn: controllers: add isis controller 2023-10-25 13:05:20 +02:00
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
Christian Ebner
5cd1349071 ui: makefile: readd compression selector form
Commit 65704cc2a8 apparently removed by
misstake the form/CompressionSelector.js from the Makefile.

It is however required by the backup view to select the compression
method, so readd it.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-10-11 13:39:31 +02:00
Thomas Lamprecht
65704cc2a8 ui: avoid trivial decompression widget, only used once
Currently it was only used once and it had not really any benefit, as
the one thing it did is defining a list of compressors – the
KVComboBox is made such, so that this can be done on definition
directly, no need for inheritance.

Also, if one would think about adopting this more for other similar
selectors: While we have some uses of compressors all over the place,
and most of them are not really coupled to each other, so having a
single widget for them does not make sense.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-27 07:25:59 +02:00
Philipp Hufnagl
e86862bf27 fix #4849: ui: allow decompressing ISO files when downloading
The compression algorithm will be automatically detected when querying the
download URL. It can be overriden by the user using the "compression algorithm"
drop down under advanced.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>

Reworded title and message, updated d/control for libpve-storage-perl version
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2023-09-26 09:35:31 +02:00
Lukas Wagner
80c49bb56d ui: allow to configure notification event -> target mapping
This commit adds a new view that allows configuring notification
targets for all existing notification events (replication, updates,
fencing).

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-08-16 11:11:16 +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
ba7002f5e6 fix #4758: ui: lxc wizard: allow multiple ssh keys
by converting the textfield into a textarea and validate the value
line wise (if there is more than one line)

also create a 'MultiFileButton' (mostly copied from extjs) that allows
to select multiple files at once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-07-15 23:26:34 +02:00
Dominik Csapak
45c2099cbd try using 'pve-eslint' if it exists
but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: move into www/manager Makefile directly ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-24 17:43:02 +02:00
Dominik Csapak
70eb18e8f0 ui: allow configuring pci and usb mapping
uses the new ResourceMapTree to add the CRUD interfaces for the
mappings.

We add both of them into a single panel, since the datacenter menu
already has many entries, and without a proper summary for the group, we
cannot really put them in a category

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Dominik Csapak
386f8d9795 ui: add ResourceMapTree
this will be the base class for trees for the individual mapping types,
e.g. pci and usb mapping.

there are a few things to configure, but the overall code sharing is
still significant, and should work out fine for future mapping types

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Dominik Csapak
5b775e5d8c ui: add edit window for usb mappings
very similar to the PCIMapEdit window, but we only ever allow one
mapping per host

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Dominik Csapak
2ffe0f3262 ui: add edit window for pci mappings
This contains the window to edit a PCI mapping for a single host.
It is designed to work in 3 modes:

* without an id and a nodename: for new mappings
* with an id but without nodename: for adding new host mappings to an
  existing one
* with id and nodename: when editing an existing host mapping

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Dominik Csapak
02adfe1727 ui: form: add MultiPCISelector
this is a grid field for selecting multiple pci devices at once, like we
need for the mapped pci ui. There we want to be able to select multiple
devices such that one gets selected automatically

we can select a whole slot here, but that disables selecting the
individual functions of that device.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Dominik Csapak
dba0398937 ui: form: add USBMapSelector
similar to PCIMapSelector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Dominik Csapak
0cf5c0d203 ui: form: add PCIMapSelector
akin to the PCISelector, but uses the api for mapped devices

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Alexandre Derumier
edc4a349ab ui: add vnet permissions panel
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2023-06-12 13:18:12 +02:00
Dominik Csapak
f44ce5955e ui: add Realm Sync panel
a typical CRUD panel for adding/editing/removing realm sync jobs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 11:38:34 +02:00
Thomas Lamprecht
147d67c495 makefile: convert to use simple parenthesis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-29 18:24:00 +02:00
Aaron Lauterer
6757887a5d ui: osd: add details window
This new windows provides more detailes about an OSD such as:
* PID
* Memory usage
* various metadata that could be of interest
* list of phyiscal disks used for the main disk, db and wal with
  additional infos about the volumes for each

A new 'Details' button is added to the OSD overview and a double click
on an OSD will also open this new window.

The componend defines the items in the initComponent instead of
following a fully declarative approach. This is because we need to pass
the same store to multiple Proxmox.ObjectGrids.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by:  Dominik Csapak <d.csapak@proxmox.com>
2023-03-15 18:24:27 +01:00
Dominik Csapak
3a2a696443 ui: add window for changing tree related options
such as the sorting/grouping of guests. saves them in the browser local
storage under 'pve-tree-sorting'

adds a button for it next to the the view selector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-02-22 09:12:36 +01:00
Dominik Csapak
731436ee86 ui: refactor ui option related methods into UIOptions
a new singleton like Utils/Parser, intended for holding stuff for
ui options, such as the tag settings/overrides

no behavioural change intended

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-02-22 09:12:36 +01:00
Dominik Csapak
f5dd10dc3e ui: remove unused booleanfield
it's not used anymore, does not belong into pve-manager (rather in
proxmox-widget-toolkit), does not have a proper alias.

it's simple enough to recreate should we ever need it again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-02-22 09:12:36 +01:00
Stefan Hrdlicka
14d9ecc416 fix #2822: add iscsi, lvm, lvmthin & zfs storage for all cluster nodes
This adds a dropdown box for iSCSI, LVM, LVMThin & ZFS storage options where a
cluster node needs to be chosen. As default the current node is
selected. It restricts the the storage to be only availabe on the
selected node.

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
2022-12-21 16:24:04 +01:00
Dominik Csapak
1b42bb8657 ui: add form for editing tags
This is a wrapper container for holding a list of (editable) tags
intended to be used in the lxc/qemu status toolbar

To add a new tag, we reuse the 'pveTag' class, but overwrite some of
its behaviour and css classes so that it properly adds tags

Also handles the drag/drop feature for the tags in the list

When done with editing (by clicking the checkmark), sends a 'change'
event with the new tags

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:20:53 +01:00
Dominik Csapak
b6f9fc78c0 ui: add form/Tag
displays a single tag, with the ability to edit inline on click (when
the mode is set to editable). This brings up a list of globally available tags
for simple selection.

this is a basic ext component, with 'i' tags for the icons (handle and
add/remove button) and a span (for the tag text)

shows the tag by default, and if put in editable mode, makes the
span editable. when actually starting the edit, shows a picker
with available tags to select from

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:20:53 +01:00
Dominik Csapak
0a627d9468 ui: dc/OptionView: add editors for tag settings
namely for 'tag-tree-style' and 'tag-colors'.
display the tag overrides directly as they will appear as tags

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:20:53 +01:00
Dominik Csapak
4f43785ac9 ui: add PVE.form.ListField
a field which contains just a list of textfields, e.g. useful for a list
of simple tags

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:20:53 +01:00
Dominik Csapak
7381265da2 ui: add grid form for mapping tags to foreground/background colors
This provides a basic grid to edit a list of tag color overrides.
We'll use this for editing the datacenter.cfg overrides and the
browser storage overrides.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:20:12 +01:00
Stefan Sterz
dd6de395dc fix #4328: ui: add widget toolkit to dependencies of OnlineHelpInfo.js
previously the widget toolkit was not scanned when creating the
mapping between `onlineHelp` keys and pve-doc anchors. this could
lead to cases where help buttons didn't work because the necessary
mapping wasn't present in `OnlineHelpInfo.js`.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-11-14 19:51:00 +01:00
Stefan Sterz
ec1d12dbb9 ui: add javascript source to OnlineHelpInfo.js prerequisites
by adding the javascript files as prerequisites, the
`OnlineHelpInfo.js` will get re-generated if a new `onlineHelp` key
is used. thus, this avoids an issue were valid keys might not get
mapped correctly because the info in `OnlineHelpInfo.js` wasn't
updated.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-11-08 16:28:42 +01:00
Daniel Tschlatscher
5837726350 fix #3994: ui: add Options entry in the node System menu
Add the subentry "Options" in the "System" menu to expose some
options in the GUI which were not exposed before.

Added a new file for displaying and editing the node config options
which were not exposed through the GUI yet. Namely those are the
settings for wakeonlan and startall-on-boot-delay. Edited the
Makefile to include the newly created file.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
2022-05-12 16:38:07 +02:00
Stefan Sterz
742de03d5a ui: move NotesView panel and NotesEdit window to widget kit
this removes the NotesView panel and NotesEdit and replaces them with
with the version from the widget kit. requires a bump of the widget
toolkit.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-04-13 11:35:30 +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
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
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
786e7d8328 ui: storage/cephfs: make ceph fs selectable
by adding a CephFSSelector and using it in the CephFSEdit window
(similar to the poolselector/textfield)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-11 17:52:08 +01:00
Wolfgang Bumiller
e90127be83 www: redirect user TFA button to TFA view
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-11 14:38:31 +01:00
Fabian Ebner
bccfb43f9f ui: node: storage removal: add checkbox for cleaning up disks
and factor out a SafeDestroyStorage sub-class to avoid duplication.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-11-10 14:03:27 +01:00
Lorenz Stechauner
26bfeca185 ui: move upload window into UploadToStorage.js
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-10 09:21:44 +01:00