Commit Graph

327 Commits

Author SHA1 Message Date
Lukas Wagner
2cb9b31cb3 ui: perm path: increase width of the perm path selector combobox
ACL paths for notification targets can become quite long, e.g.:
/mappings/notifications/<target name>

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-08-16 11:11:21 +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
Lukas Wagner
f7794ede56 ui: form: listfield: add 5px padding between grid and 'Add' button
Before, there was zero space between the the grid border line and the
button, making it look a bit odd.

The ListField form component is currently used in the
'User Tag Access' and 'Registered Tags' dialog windows in datacenter
option view.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-08-02 09:57:10 +02: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
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
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
Dominik Csapak
e633ac0f08 ui: pci map edit: reintroduce warnings checks
they got lost in my last rebase/refactor.

the onLoadCallBack is used to check by the window if there are iommu
groups at all, and the checkIsolated function checks if the selected
ones are in a separate group (in regards to the other devices)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 10:03:52 +02:00
Dominik Csapak
0a571cffc0 ui: resource map tree: make 'ok' status clearer
by changing into 'mapping matches host data' which indicates that the
configured values matches the host information

also for the pci and usb map selectors

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 10:03:52 +02:00
Dominik Csapak
b736219f89 ui: multi pci selector: indent functions multifunction devices
when there is more than one function for a device, indent the individual
functions. This sets them visually apart from the 'pass all through as
one' entry

We have to use a html entity here, as extjs trims the normal whitespace.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-19 13:05:17 +02:00
Dominik Csapak
aafc1f3040 ui: multi pci selector: reset the selection properly on nodename change
and mdev change.

giving an empty array did not have the desired effect of resetting the
selection, but giving no parameter at all does.

this now also clears the selection when the mdev filter/config changed
(was just forgotten)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-19 13:05:17 +02:00
Dominik Csapak
b7c7be3e50 ui: fix pci map selector status column
the 'errors' property changed to 'checks' so we have to adapt here too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-19 13:05:17 +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
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
Dominik Csapak
a88b4ef9ad ui: form/USBSelector: make it more flexible with nodename
similar to the pciselector, make it accept a plain nodename,
or no node at all and provide a setNodename function

to keep backwards compatibility, also check pveSelNode for the nodename

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00
Leo Nunner
5d6262aa59 firewall: add scope field to IPRefSelector
and send the scoped value to the firewall when choosing new values.
This happens for both IPSets and aliases.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
2023-06-15 09:35:32 +02:00
Dominik Csapak
7679ff9e60 fix #4739: ui: user list: add column for group memberships
To get a fast overview in which groups each user is add a column that
shows all groups they are a member of.

To get that info we need to pass the 'full=1' parameter to the API
endpoint, which then adds tokens and groups for each user to the result.

This is basically only increasing transmission size a bit, as the
backend doesn't needs to do any extra parsing for this information.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: Reword commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-14 15:36:55 +02:00
Thomas Lamprecht
5f936d95fc ui: sdn: consistent usage of VNet & VLAN without gettext
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-14 14:10:56 +02:00
Christoph Heiss
8bb027f820 ui: qga: Add option to turn off QGA fs-freeze/-thaw on backup
Adds a default-on checkbox to the QEMU Guest Agent feature selector
controlling the 'fs-freeze-on-backup' option. If unchecked, an
additional warning is displayed that backups can potentially corrupt
with this setting off.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-07 18:28:01 +02:00
Dominik Csapak
90d69e2dbc ui: fix duplicate references when using multiple disk storage selectors
by removing the references and change the one place where we used one
of the references.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-06 17:08:58 +02:00
Thomas Lamprecht
3211e833d9 ui: USB selector: fix typo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-05 12:15:09 +02:00
Daniel Koć
0d1108b26c ui: enable gettext localisation for more user exposed strings
Link: https://lists.proxmox.com/pipermail/pve-devel/2023-April/056588.html
Signed-off-by: Daniel Koć<daniel@xn--ko-wla.pl>
 [ T: rework subject & add S-o-b supplied by reply ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-04-24 11:52:23 +02:00
Aaron Lauterer
b5bbcb4c7f ui: ceph: adapt urls to new ceph/pool endpoint
ceph/pools (plural) is deprecated, use the new one.
Since the details / status of a pool has been moved from previously
ceph/pools/{name} to now ceph/pool/{name}/status, we need to pass the
'loadUrl' to the edit window.

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-20 15:31:04 +01:00
Dominik Csapak
6f2940c7b1 ui: fix not opening 'bulk action' windows
we previously removed the 'filters' property from the store, but this
has the effect that the filter array is only ever initialized when
we try to access them via the specified api of extjs

so instead of adding them manually to their array, use the 'addFilter'
method of extjs

also use 'getStore()' instead of directly accessing the store to be
consistent with the extjs api use

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-03-14 11:37:47 +01:00
Dominik Csapak
7a5ca76aa1 fix #4239: ui: show selected but non-existing vmids in backup edit
by adding records manually when using 'setValue' on a vmselector.
It'll show up normally but have an 'unknown' nodename, and no type/status/etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-11 18:47:34 +01:00
Dominik Csapak
fc8138ec20 ui: guest selector: correctly change invalid class on en/disable
since the invalid class is manually handled, validity needs to be
checked explicitly too on setDisabled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-11 18:47:34 +01:00
Dominik Csapak
11fc6d7fb5 ui: guest selector: switch from post-filter to query param for API call
So that we can modify any filters without always having to consider
filtering for the type too. Note that the 'vm' tyoe here is slightly
confusing and should actually be 'guest', as this also returns
containers. Reduces transmission size a bit as nice side effect.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-11 18:47:34 +01:00
Dominik Csapak
d3086ce752 ui: guest selector: improve set/getValue handling during store load
When one calls setValue or getValue during a store load, the store
might be empty or incomplete, so defer the selection after the load
and cache the value for getValue invocations until the store is
loaded

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-11 18:47:34 +01:00
Dominik Csapak
66a38a6afa ui: guest selector: make the shown picker columns customizable
We will reuse this component in other place, which might not always
want to show all columns

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-11 18:47:34 +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
Dominik Csapak
b497c4c731 ui: remove 'Storage View'
it is basically the 'Server View' but with less content, and has often
times lead to confusion when uses accidentally selected it.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-02-22 09:12:36 +01:00
Thomas Lamprecht
7b668b16bb ui: local storage selector: avoid cut-off for node field
The top bar normally doesn't hosts form fields, so the height was a
bit off and the lower border of the node selector overflowed and got
hidden, making the whole picker look slightly off.

So set a minimum height of 40 px to ensure the field can be fully
shown, including margins.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-31 17:59:58 +01:00
Thomas Lamprecht
ab4ea492b6 ui: form store node selector: improve variable name clarity slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-31 17:58:01 +01:00
Dominik Csapak
7528c2572e ui: ComboBoxSetStoreNode: don't hide the picker when clicking the toolbar
When clicking the toolbar of the ComboGrid, the combobox loses focus,
and instantly hides the picker.

To prevent that, we keep track of the mousedown event on the toolbar
(which happily comes before the focusLeave event), and prevent the
focusLeave propagation in that case.

Then on mouseup, we focus the combobox again, so that the nexct
focusLeave can trigger again.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-01-31 10:38:11 +01:00
Dominik Csapak
d420b29ae3 ui: storage: move node scan selector inside combobox
by converting the relevant selection boxes to combogrids.
This is done to reduce confusion for how/why to select a node, and
doing it this way it is moved closer to the selection of the actual
value we want. It still restricts the nodes when selecting a specific one.

Show it only when there is more than one node according to the
in-memory PVE.data.ResourceStore info, as for single-node setups
there isn't any other node one could scan anyway.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-18 16:01:08 +01:00
Dominik Csapak
d7610df0c7 ui: storage: use null as empty value for scanned-node selector
otherwise it can happen that there as additional change event from
null to '', even though the value did not change

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-18 16:01:08 +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
2da3166e58 ui: tags: highlight finish inline editing button
by making it a 'regular' blue button instead of a toolbar button

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-18 16:37:46 +01:00
Dominik Csapak
66dace4b3c ui: tags: implement dirty tracking for inline editing
similar to how regular forms are tracked

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-18 16:37:46 +01:00
Dominik Csapak
e83ea30e4a ui: tags: shortcut accept&cancel with keypresses
pressing 'Enter' accepts the current tags and
'Escape' cancels editing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-18 16:37:46 +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
Dominik Csapak
56dee217bc ui: fix datacenter tags options inputs
* dont allow blank for tree shape
* allow completely removing registered tags and user-tag-access properties
* correctly check validity for the listfield
* use correct gettexts
* don't inject empty field in the listfield when setting an empty string

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-18 12:56:18 +01:00
Thomas Lamprecht
09b65afff9 ui: tags: reduce opacity of "No Tags" hint
make it less stand out, it's just a hint not primary information

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 18:36:54 +01:00
Thomas Lamprecht
13a0c8bf11 ui: eslint auto-fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 18:21:48 +01:00
Dominik Csapak
432aec5641 ui: change style of ListField
and make it more like the 'traffic control' time grid in pbs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:48 +01:00
Dominik Csapak
38f4e6e43b ui: tags: hide already set tags in dropdown
on every change, collect all tags and update the filter of all tag
fields

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:48 +01:00
Dominik Csapak
871953db9f ui: tags: make sorting more natural
by sorting the lower cased variants, and only if they are identical
sort the original values with 'localeCompare'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:48 +01:00
Dominik Csapak
59e71a0881 ui: rework inline tag editing
things that changed:
* removed 'add Tag' inline button with proper button that adds
  empty tag
* don't require to confirm each tag, simply update the color "live"
* set a minimum width for the editing box, so that it's easier to click
* replace cancel/finish icons with proper buttons
* fix tagCharRegex for multichar text (necessary for paste)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:48 +01:00