Commit Graph

230 Commits

Author SHA1 Message Date
Aaron Lauterer
c2175df21f ui: utils: monitor_ceph_installed: avoid setting nodename to localhost
If a user is accessing the Ceph panel via Datacenter -> Ceph, then the
install & config wizard might be shown. The nodename that is passed to
the wizard  will decide the ID of the initial MON and MGR services.

Therefore, don't fall back to 'localhost' but the actual name of the
node to which we are connected to. The result will be that the first MON
and MGR will have the expected ID instead of 'localhost'.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2023-04-22 09:50:42 +02:00
Dominik Csapak
19f703e2d1 ui: ceph: unmask container after we finished the ceph install
otherwise the container stays masked and we cannot interact with it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-03-22 15:29:44 +01:00
Aaron Lauterer
fe5c4f8156 ui utils: add renderer for ceph osd addresses
Render the OSD listening addresses a bit nicer and one per line.

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
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
Thomas Lamprecht
a2ff227eb5 fix #4502: ui: VM OS type: the l26 type is also compatible with Linux 6.x
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-30 11:01:52 +01:00
Thomas Lamprecht
04389e49d6 ui: factor out not found rendering to common helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-21 14:32:53 +01:00
Stefan Hanreich
fdde857a89 fix #4393: ui: storage backup view: make pbs-specific columns sortable
The sort order is analogous to how it behaves in the datastore content
overview in pbs.

This means sorting in ascending order behaves as follows:

Verify State
* failed
* none
* ok

Encryption
* no
* yes

For the encryption state there is theoretically a distinction between
signed and encrypted, but as far as I can tell we do not render this
distinction in PVE, which is why I chose to not make this distinction
for sorting as well.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-01-16 14:04:22 +01:00
Dominik Csapak
ad02432922 fix #4370: ui: fix regression of preselecting tree element on login
We want to select a tree element based on the fragment in the url after
a login. For which we must wait for the tree (ResourceStore) to load.

Since we recently introduced the loading of '/cluster/options' to
load the overrides of tags, etc. we fire a 'load' event with the
intention of triggering a rerender of the tree (to include the new
colors). If that triggers before the ResourceStore is loaded,
we try to set the element once (which fails) and nothing is selected.

To fix this, we only trigger it if it was already loaded and is not
currently loading. Otherwise it will be either redrawn after the ongoing
load, or by the first load.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-28 17:59:30 +01:00
Thomas Lamprecht
1b015ebc3d ui: utils fix typos in tag tree styles
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-18 17:56:50 +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
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
Dominik Csapak
8d8ba23da9 ui: implement tag ordering as configured in datacenter config
datacenter.cfg returns an 'ordering' option. parse that and
use it to order the tags when viewing. default is alphabetical.

With alphabetical ordering, drag & drop when editing is disabled and the
tags will be inserted at the right place. When saving, the sorted
order will be written into the config

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:21:23 +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
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
Dominik Csapak
8b4c7a46e2 ui: parse and save tag infos from /cluster/options
stores the color-map into a global list of overrides. on update, also parse
the values from the browser localstore. Also emits a GlobalEvent
'loadedUiOptions' so that e.g. the tags can listen to that and refresh their
colors

also saves the list of 'allowed-tags' into PVE.Utils

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:20:12 +01:00
Dominik Csapak
b7f4cb7cf9 ui: save ui options from /cluster/options instead of version
/cluster/options is now the go to place for getting these options
(until we have more options unrelated to the datacenter.cfg)

Also move the use of the console from VersionInfo to here, since
this will be the future place for ui related backend options.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-17 18:20:12 +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
Fabian Ebner
03875d7ac4 ui: manual backup: list possible template variables directly
rather than as a tooltip.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-05-12 17:17:56 +02:00
Daniel Tschlatscher
5ff695733f gui: VM Create wizard - display default scsi controller correctly
Fixed a cosmetic issue where in the VM creation wizard the SCSI
controller would not be displayed correctly if the default value
"Default (LSI 53C895A)" was selected. In this case, "__default__"
would be printed for the user after progressing into the next "Disks"
pane.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
2022-05-12 16:32:02 +02:00
Thomas Lamprecht
7d72d62f9c ui: add virgl GPU to possible VGA drivers
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-28 16:36:31 +02:00
Fabian Ebner
7c8ff459a8 ui: util: add helpers for (un)escaping notes-template
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-28 13:45:53 +02:00
Dominik Csapak
a8e22a83ab ui: dont show '__default__' in renderer
with the recent rework of the render/maps/arrays, we now
show 'Default (__default__)'. Since '__default__' is only an internal
value in the gui, don't expose it by explicitely checking for it

in the other render functions it works already because we either construct
the text differently (console_map) or we check the result from
parsing (vga_driver)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-26 15:31: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
Thomas Lamprecht
b7004b4682 ui: utils: rework kvm-vga/keymaps and console-viewer schema handling
shave off some bloat

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 09:01:13 +02:00
Dominik Csapak
f3d8ca24b5 ui: Utils: remove unnecessary render_kvm_vga_driver
the 'value' here is already the rendered text, passing it through
render again does not make sense

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-26 08:32:48 +02:00
Aaron Lauterer
000b5537fc ui: utils: add nextFreeMP
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:32:44 +02:00
Aaron Lauterer
5747fef3d9 ui: utils: refactor mps to mp
Using the actual config key instead of the pluralization, makes it
easier in the situations where we need to match against it.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:32:44 +02:00
Thomas Lamprecht
d0477f12ad ui: render storage type: improve fallback
We support external storage plugins, e.g., for proprietary
technology, so a "unknown" value here may not actually mean that we
missed anything, so just return the type value 1:1 as fallback, that
gives the user a better idea about such a storage entry.

Reported-by: Joshua Huber <jhuber@blockbridge.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 17:28:38 +02:00
Thomas Lamprecht
7ce62ab3ad ui: utils: add render_next_event
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-01-13 16:55:15 +01:00
Aaron Lauterer
7b14d77a7a ui: qm: disk selection: add optional selection of unused
With this optional setting, it is possible to allow the user to also
select 'unused' as a disk bus type.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2021-11-12 18:30:10 +01:00
Thomas Lamprecht
afa725cd9c ui: utils: refactor render_as_property_string
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-12 18:25:36 +01:00
Dominik Csapak
02c1e98e83 pveceph: add 'fs destroy' command
with 'remove-storages' and 'remove-pools' as optional parameters

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-11 17:52:08 +01:00
Wolfgang Bumiller
d35665de6c www: use render_u2f_error from wtk
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-11 14:38:23 +01:00
Fabian Ebner
03c4aed888 ui: utils: add task descriptions for disk removal
For 'dirremove', it already exists.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-11-10 14:03:27 +01:00
Stefan Reiter
a9175b0ba1 ui: add 'win11' ostype and set defaults in wizard
Windows 11 requires a TPM and secure boot, so try to auto-enable both.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
2021-10-21 12:41:30 +02:00
Aaron Lauterer
3266c03d72 ui: storage: change CIFS to SMB/CIFS
This will hopefully help people to find the needed storage as not
everyone will be aware of the fact that CIFS is also a name used for it
(technically it was only SMB v1).

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2021-10-05 07:37:22 +02:00
Stefan Reiter
6d084964b3 ui: add support for adding TPM devices
Inspired by HDEfi for efidisks. Extends the DiskStorageSelector to allow
hiding the format, since tpmstate can only be stored in 'raw' format
(even on directory storages).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-10-05 07:12:19 +02:00
Dominik Csapak
3b5617cc2f ui: Utils: add capture group for the id in bus_match
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Dominik Csapak
2aa645dad7 ui: refactor sortByPreviousUsage and nextFreeDisk
we'll use them outside of the controllerSelector soon

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-04 08:55:05 +02:00
Oguz Bektas
f5ae74969d utils: add missing 'tfa' for @pve realm
was missed in commit 550857eb16

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-08-05 13:14:49 +02:00
Thomas Lamprecht
4cf3bf9510 utils: enable ARIA again
We had done so already in PBS and PMG since a bit without seeing
anything broken due to it, which makes sense as this was enabled for
*during* the step-by-step upgrade from ExtJS 4 to 5 (and then
directly 6).

Re-enabling  could help with some accessibility issues we have some
tangential reports[0].

[0]: https://github.com/nvaccess/nvda/issues/11530

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 18:23:47 +02:00
Thomas Lamprecht
c42e3aa76e ui: auth schema: we use OpenID Connect
As OpenID is the old one, with several security implications/issues
present, so avoid suggesting that its used.

`OpenID Connect` revers to the "third gen" on top of oauth2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 16:32:24 +02:00
Lorenz Stechauner
79035e5a0f ui: Utils: change download task format
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
2021-07-03 00:36:24 +02:00
Thomas Lamprecht
da25c5ac41 ui: realms: add iconCls to menu entries
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 21:57:26 +02:00
Dominik Csapak
6026595802 ui: dc/UserView: disable Password button based on realm type
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 14:10:19 +02:00
Dominik Csapak
668951e22b ui: dc: add AuthEditOpenId panel
for adding and editing openid realms, does not support tfa

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 14:10:19 +02:00
Dominik Csapak
550857eb16 ui: dc/AuthEditBase: only add tfa field on auth modes that support that
for now that are all, but we will ad one where that is not possible

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 14:10:19 +02:00
Thomas Lamprecht
ffeb4f57e6 ui: storages: add basic BTRFS edit/add window
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 22:59:29 +02:00
Fabian Ebner
4d60651fc7 ui: add task description for wipe disk
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-02 13:20:46 +02:00