]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
16 months agoapi: ceph: metadata: update return schema
Aaron Lauterer [Fri, 23 Dec 2022 09:59:15 +0000 (10:59 +0100)]
api: ceph: metadata: update return schema

This API endpoint returns a big nested schema. This patch adds a mostly
complete description.

For the actual service instance return schema, we include commonly used
and important properties. It will usually return more. What exactly
depends on the Ceph service type.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
16 months agoapi: ceph: update return schemas
Aaron Lauterer [Fri, 23 Dec 2022 09:59:14 +0000 (10:59 +0100)]
api: ceph: update return schemas

to include a more complete description of the returned data.
Sort properties in alphabetical order if the list is longer.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
16 months agoui: storage backup view: refactor/modernize code style slightly
Thomas Lamprecht [Mon, 16 Jan 2023 13:21:52 +0000 (14:21 +0100)]
ui: storage backup view: refactor/modernize code style slightly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agofix #4393: ui: storage backup view: make pbs-specific columns sortable
Stefan Hanreich [Fri, 16 Dec 2022 12:45:06 +0000 (13:45 +0100)]
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>
16 months agoui: bulk actions: default to a height of 600 px
Thomas Lamprecht [Sat, 14 Jan 2023 16:40:22 +0000 (17:40 +0100)]
ui: bulk actions: default to a height of 600 px

Better fit to the 800 px default width, especially as bulk shutdown
now also got some form fields that take up space.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agofix #4194: ui: clarify that it's actually a bulk shutdown, not a stop
Thomas Lamprecht [Sat, 14 Jan 2023 16:36:18 +0000 (17:36 +0100)]
fix #4194: ui: clarify that it's actually a bulk shutdown, not a stop

As some users where confused by the usage of "Stop", which we
normally reserve for a hard-stop.

And yes, while the bulk shutdown formerly always had a timeout armed
hard-stop hard coded, it was still subtle and we recently exposed
control on that via the API an UI, so use shutdown to be more in line
with the CT/VM naming, e.g., in their power menus.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoui: bulk shutdown: expose new timeout and force-stop to user
Thomas Lamprecht [Sat, 14 Jan 2023 16:35:30 +0000 (17:35 +0100)]
ui: bulk shutdown: expose new timeout and force-stop to user

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoui: bulk migrate: cleanupl, reduce and modernize code
Thomas Lamprecht [Sat, 14 Jan 2023 16:34:16 +0000 (17:34 +0100)]
ui: bulk migrate: cleanupl, reduce and modernize code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agofixup! api: node stopall: expose setting the task timeout as endpoint parameter
Thomas Lamprecht [Sat, 14 Jan 2023 16:33:07 +0000 (17:33 +0100)]
fixup! api: node stopall: expose setting the task timeout as endpoint parameter

16 months agoapi: node stopall: expose setting force-stop behavior
Thomas Lamprecht [Sat, 14 Jan 2023 15:56:39 +0000 (16:56 +0100)]
api: node stopall: expose setting force-stop behavior

So that one can really decide if this is a shutdown or an actual
stop.

partially related to #4194

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoapi: node stopall: expose setting the task timeout as endpoint parameter
Thomas Lamprecht [Sat, 14 Jan 2023 15:52:27 +0000 (16:52 +0100)]
api: node stopall: expose setting the task timeout as endpoint parameter

Note that this changes the lower timeout of 60s for CTs also to 180s
like VM always used; besides that there's not much gained making that
distinction there was never a really good argument for this.

partially related to #4194

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoapi: nodes: move variable definition closer to use site
Thomas Lamprecht [Sat, 14 Jan 2023 15:22:06 +0000 (16:22 +0100)]
api: nodes: move variable definition closer to use site

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoapi: nodes: code style/indentation fixes
Thomas Lamprecht [Sat, 14 Jan 2023 15:20:34 +0000 (16:20 +0100)]
api: nodes: code style/indentation fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoAPI: ceph: fix typo in permissions
Matthias Heiserer [Fri, 13 Jan 2023 10:56:28 +0000 (11:56 +0100)]
API: ceph: fix typo in permissions

With Sys.Audit being spelled wrong, this call always failed

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
16 months agoui: storage browser: code cleanup/modernization
Thomas Lamprecht [Tue, 10 Jan 2023 12:51:53 +0000 (13:51 +0100)]
ui: storage browser: code cleanup/modernization

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoui: sdn browser: code cleanup/modernization
Thomas Lamprecht [Tue, 10 Jan 2023 12:51:38 +0000 (13:51 +0100)]
ui: sdn browser: code cleanup/modernization

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoui: config panel: xtype should be first property
Thomas Lamprecht [Tue, 10 Jan 2023 12:44:03 +0000 (13:44 +0100)]
ui: config panel: xtype should be first property

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoui: config panel: ensure onlineHelp mapping targets are validated
Thomas Lamprecht [Tue, 10 Jan 2023 11:32:35 +0000 (12:32 +0100)]
ui: config panel: ensure onlineHelp mapping targets are validated

our onlineHelp linter is pretty dumb and scans for used help
references heuristically, so add a small indirection to the mapping
of resource tree type to onlineHelp so that it detects those
references and thus enforces that they exists in pve-docs.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoui: config panel: fix onlineHelp mapping targets
Thomas Lamprecht [Tue, 10 Jan 2023 11:26:21 +0000 (12:26 +0100)]
ui: config panel: fix onlineHelp mapping targets

We currently do not support direct resolved links, and we also have
no stability guarantee for those, so the might change in pve-docs-

Switch to mapping to the chapter reference, which actually works and
is intended for stable help references.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agofix #4455: ui: config panel: add missing onlineHelp mapping for SDN type
Thomas Lamprecht [Tue, 10 Jan 2023 11:15:24 +0000 (12:15 +0100)]
fix #4455: ui: config panel: add missing onlineHelp mapping for SDN type

Besides adding the correct help mapping this also avoid a successive
null dereference exception.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoui: config panel: refactor onlineHelp switch to object map
Thomas Lamprecht [Tue, 10 Jan 2023 11:14:07 +0000 (12:14 +0100)]
ui: config panel: refactor onlineHelp switch to object map

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoapi: task download: improve code/comment locallity slightly
Thomas Lamprecht [Wed, 4 Jan 2023 13:38:19 +0000 (14:38 +0100)]
api: task download: improve code/comment locallity slightly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoapi: task download: name clashing params explicit
Thomas Lamprecht [Wed, 4 Jan 2023 13:37:05 +0000 (14:37 +0100)]
api: task download: name clashing params explicit

we might add other ones that might be used together with the
`download` one, so rather be explicit on communicating what we check.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoapi: task download: avoid useless intermediate variable
Thomas Lamprecht [Wed, 4 Jan 2023 13:36:47 +0000 (14:36 +0100)]
api: task download: avoid useless intermediate variable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agomake task log downloadable in the PVE manager backend
Daniel Tschlatscher [Wed, 4 Jan 2023 12:56:33 +0000 (13:56 +0100)]
make task log downloadable in the PVE manager backend

The read_tasklog API call now stream the whole log file if the query
parameter 'download' is set to true.
This is done in preparation for the task log download button to be
added in the TaskViewer.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Tested-by: Stefan Sterz <s.sterz@proxmox.com>
Reviewed-by: Stefan Sterz <s.sterz@proxmox.com>
16 months agofix #1295: ui: allow one to configure new notification settings
Thomas Lamprecht [Tue, 3 Jan 2023 15:45:16 +0000 (16:45 +0100)]
fix #1295: ui: allow one to configure new notification settings

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agofix #1295: pve daily update: honor new package-notification config
Thomas Lamprecht [Tue, 3 Jan 2023 15:44:28 +0000 (16:44 +0100)]
fix #1295: pve daily update: honor new package-notification config

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agocleanup: "var" to "let", fix some indentation in related files
Stefan Hrdlicka [Wed, 14 Dec 2022 12:43:07 +0000 (13:43 +0100)]
cleanup: "var" to "let", fix some indentation in related files

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
16 months agofix #2822: add iscsi, lvm, lvmthin & zfs storage for all cluster nodes
Stefan Hrdlicka [Wed, 14 Dec 2022 12:43:06 +0000 (13:43 +0100)]
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>
16 months agoapi: ceph: sort and update index sub-directory list
Aaron Lauterer [Wed, 21 Dec 2022 13:30:25 +0000 (14:30 +0100)]
api: ceph: sort and update index sub-directory list

The 'cmd-safety', 'configdb' and 'mgr' items were missing, and while
directly calling the API endpoints worked, the api-viewer and pvesh
where partially broken here.

Sort the whole list alphabetically will make it easier to track in
the future

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
 [ T: note which items where missing and reword slightly ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoapi: ceph: fix grammar/styling in descriptions
Aaron Lauterer [Wed, 21 Dec 2022 13:30:24 +0000 (14:30 +0100)]
api: ceph: fix grammar/styling in descriptions

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
 [ T: slightly rework commit subject ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 7.3-4
Thomas Lamprecht [Fri, 16 Dec 2022 12:11:27 +0000 (13:11 +0100)]
bump version to 7.3-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoapi: apt: code cleanups
Thomas Lamprecht [Fri, 16 Dec 2022 12:01:24 +0000 (13:01 +0100)]
api: apt: code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: node/datacenter summary: show tags by default and flex that column
Thomas Lamprecht [Fri, 16 Dec 2022 11:57:33 +0000 (12:57 +0100)]
ui: node/datacenter summary: show tags by default and flex that column

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: realm: sync: don't use realm defaults for remove-vanished
Dominik Csapak [Tue, 6 Dec 2022 11:06:33 +0000 (12:06 +0100)]
ui: realm: sync: don't use realm defaults for remove-vanished

If we don't manually set it to 'none', it will use the realm default,
which might be unexpected. This way, the sync always does what the
user saw in the sync window.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agoappliance info: update apltest for zstd based archives
Thomas Lamprecht [Wed, 30 Nov 2022 15:20:58 +0000 (16:20 +0100)]
appliance info: update apltest for zstd based archives

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoappliance info: update shipped index
Thomas Lamprecht [Wed, 30 Nov 2022 15:19:22 +0000 (16:19 +0100)]
appliance info: update shipped index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agofix #4370: ui: fix regression of preselecting tree element on login
Dominik Csapak [Mon, 28 Nov 2022 12:34:00 +0000 (13:34 +0100)]
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>
17 months agobump version to 7.3-3
Thomas Lamprecht [Mon, 21 Nov 2022 14:58:42 +0000 (15:58 +0100)]
bump version to 7.3-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: qemu disk: honor iothread setting from config
Dominik Csapak [Mon, 21 Nov 2022 14:39:06 +0000 (15:39 +0100)]
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>
17 months agoupdate aplinfo
Thomas Lamprecht [Mon, 21 Nov 2022 13:25:07 +0000 (14:25 +0100)]
update aplinfo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 7.3-2
Thomas Lamprecht [Mon, 21 Nov 2022 13:23:59 +0000 (14:23 +0100)]
bump version to 7.3-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoapi: vzdump: soften parameter permission checks
Fiona Ebner [Wed, 16 Nov 2022 14:04:30 +0000 (15:04 +0100)]
api: vzdump: soften parameter permission checks

Allows sufficiently privileged users to pass-in retention and
performance parameters for manual backup, but keeps tmpdir, dumpdir
and script root-only. Such users could already edit the job
accordingly, so essentially not granting anything new.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
17 months agoui: workspace: increase initial resource tree width from 200 to 300 px
Thomas Lamprecht [Mon, 21 Nov 2022 12:38:11 +0000 (13:38 +0100)]
ui: workspace: increase initial resource tree width from 200 to 300 px

we got much more wide screens and higher resolutions nowadays than
when this width was decided (before the famous imported from SVN
commit in 2011).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: dc options: support setting case sensitive
Thomas Lamprecht [Mon, 21 Nov 2022 07:49:13 +0000 (08:49 +0100)]
ui: dc options: support setting case sensitive

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: dc options: add Color-Overrides text to render, if any
Thomas Lamprecht [Mon, 21 Nov 2022 07:48:53 +0000 (08:48 +0100)]
ui: dc options: add Color-Overrides text to render, if any

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agofix #4245: api: node HW: allow to get PCI info with Sys.Audit on /
Thomas Lamprecht [Sun, 20 Nov 2022 12:27:27 +0000 (13:27 +0100)]
fix #4245: api: node HW: allow to get PCI info with Sys.Audit on /

keep Sys.Modify only for backward compat, as it does not make really
much sense to ask for that on an informative GET call.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 7.3-1
Thomas Lamprecht [Sat, 19 Nov 2022 14:57:53 +0000 (15:57 +0100)]
bump version to 7.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: improve ZFS pool name validator accuracy
Thomas Lamprecht [Sat, 19 Nov 2022 14:56:42 +0000 (15:56 +0100)]
ui: improve ZFS pool name validator accuracy

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: node disk manage: mark using ZFS reserved pool names as invalid
Thomas Lamprecht [Fri, 18 Nov 2022 17:27:54 +0000 (18:27 +0100)]
ui: node disk manage: mark using ZFS reserved pool names as invalid

ZFS will die anyway later so catch this earlier for better UX

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: utils fix typos in tag tree styles
Thomas Lamprecht [Fri, 18 Nov 2022 16:56:50 +0000 (17:56 +0100)]
ui: utils fix typos in tag tree styles

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 7.2-15
Thomas Lamprecht [Fri, 18 Nov 2022 16:27:30 +0000 (17:27 +0100)]
bump version to 7.2-15

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: datacenter options: add Cluster Resource Scheduling editor
Thomas Lamprecht [Fri, 18 Nov 2022 16:26:34 +0000 (17:26 +0100)]
ui: datacenter options: add Cluster Resource Scheduling editor

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: tags: highlight finish inline editing button
Dominik Csapak [Fri, 18 Nov 2022 11:59:18 +0000 (12:59 +0100)]
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>
17 months agoui: tags: implement dirty tracking for inline editing
Dominik Csapak [Fri, 18 Nov 2022 11:59:17 +0000 (12:59 +0100)]
ui: tags: implement dirty tracking for inline editing

similar to how regular forms are tracked

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agoui: tags: shortcut accept&cancel with keypresses
Dominik Csapak [Fri, 18 Nov 2022 11:59:16 +0000 (12:59 +0100)]
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>
17 months agoui: hide 'no tags' field and edit icon without VM.Config.Options
Dominik Csapak [Fri, 18 Nov 2022 11:59:15 +0000 (12:59 +0100)]
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>
17 months agoui: fix datacenter tags options inputs
Dominik Csapak [Fri, 18 Nov 2022 08:09:37 +0000 (09:09 +0100)]
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>
17 months agoui: vm network edit: use the correct default model
Matthias Heiserer [Fri, 18 Nov 2022 10:29:55 +0000 (11:29 +0100)]
ui: vm network edit: use the correct default model

commit c8f2cf4c1af049b0102932d5c41b16f25e6c9fc5 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>
17 months agoui: vm vNIC: make MTU validation more fine-grained for better UX
Thomas Lamprecht [Fri, 18 Nov 2022 10:44:43 +0000 (11:44 +0100)]
ui: vm vNIC: make MTU validation more fine-grained for better UX

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: vm vNIC: add empty text for MTU field
Thomas Lamprecht [Fri, 18 Nov 2022 10:44:29 +0000 (11:44 +0100)]
ui: vm vNIC: add empty text for MTU field

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 7.2-14
Thomas Lamprecht [Thu, 17 Nov 2022 18:45:26 +0000 (19:45 +0100)]
bump version to 7.2-14

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agod/control: bump versioned dependency for libpve-storage-perl to 7.2-12
Thomas Lamprecht [Thu, 17 Nov 2022 18:36:39 +0000 (19:36 +0100)]
d/control: bump versioned dependency for libpve-storage-perl to 7.2-12

ensuring we got all ready for dRAID

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: disk manage: move dRAID options into field set
Thomas Lamprecht [Thu, 17 Nov 2022 18:29:19 +0000 (19:29 +0100)]
ui: disk manage: move dRAID options into field set

to avoid an overly asymmetric form field balance

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: disk manage: rework assembling dRAID options
Thomas Lamprecht [Thu, 17 Nov 2022 18:14:04 +0000 (19:14 +0100)]
ui: disk manage: rework assembling dRAID options

Simply use onGetValues to assemble the dRAID config, if any.

We do not need to bother with setting values as this is only for
creates, never for edit/displays.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agofix #3967: enable ZFS dRAID creation in WebGUI
Stefan Hrdlicka [Thu, 10 Nov 2022 13:24:49 +0000 (14:24 +0100)]
fix #3967: enable ZFS dRAID creation in WebGUI

add fields for additional settings required by ZFS dRAID

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
17 months agod/control: bump versioned dependency for librados2-perl to 1.3-1
Thomas Lamprecht [Thu, 17 Nov 2022 17:43:11 +0000 (18:43 +0100)]
d/control: bump versioned dependency for librados2-perl to 1.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: tags: reduce opacity of "No Tags" hint
Thomas Lamprecht [Thu, 17 Nov 2022 17:36:52 +0000 (18:36 +0100)]
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>
17 months agoui: osd: mon: mds: warn if stop/destroy actions are problematic
Aaron Lauterer [Thu, 17 Nov 2022 14:10:02 +0000 (15:10 +0100)]
ui: osd: mon: mds: warn if stop/destroy actions are problematic

Check if stopping of a service (OSD, MON, MDS) will be problematic for
Ceph. The warning still allows the user to proceed.

Ceph also has a check if the destruction of a MON is okay, so let's use
it.

Instead of the common OK button, label it with `Stop OSD` and so forth
to hopefully reduce the "click OK by habit" incidents.

This will not catch it every time as Ceph can need a few moments after a
change to establish its current status. For example, stopping one of 3
MONs and then right away destroying one of the last two running MONs
will most likely not trigger the warning. Doing so after a few seconds
should show the warning though.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
17 months agoui: osd: warn if removal could be problematic
Aaron Lauterer [Thu, 17 Nov 2022 14:10:01 +0000 (15:10 +0100)]
ui: osd: warn if removal could be problematic

If an OSD is removed during the wrong conditions, it could lead to
blocked IO or worst case data loss.

Check against global flags that limit the capabilities of Ceph to heal
itself (norebalance, norecover, noout) and if there are degraded
objects.

Unfortunately, the 'safe-to-destroy' Ceph API endpoint will not help
here as it only works as long as the OSD is still running. By the time
the destroy button is enabled, the OSD will already be stopped.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
17 months agoapi: ceph: add cmd-safety endpoint
Aaron Lauterer [Thu, 17 Nov 2022 14:10:00 +0000 (15:10 +0100)]
api: ceph: add cmd-safety endpoint

Ceph provides us with several safety checks to verify that an action is
safe to perform. This endpoint provides means to acces them.
The actual mon commands are not exposed directly. Instead the two
actions "stop" and "destroy" are offered.

In case it is not okay to perform an action, Ceph provides a status
message explaining why. This message is part of the returned values.

For now there are the following checks for these services:

MON:
  - ok-to-stop
  - ok-to-rm
OSD:
  - ok-to-stop
  - safe-to-destroy
MDS:
  - ok-to-stop

Even though OSDs have a check if it is okay to destroy them, it is for
now not really usable in our workflow because it needs the OSD to be up
and running to return useful information. Our workflow in the GUI
currently is that the OSD needs to be stopped in order to destroy it.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
17 months agod/control: bump versioned pve-cluster dependency to 7.2-3
Thomas Lamprecht [Thu, 17 Nov 2022 17:26:56 +0000 (18:26 +0100)]
d/control: bump versioned pve-cluster dependency to 7.2-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: eslint auto-fixes
Thomas Lamprecht [Thu, 17 Nov 2022 16:59:45 +0000 (17:59 +0100)]
ui: eslint auto-fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: tags: add preview to tag shape option
Dominik Csapak [Thu, 17 Nov 2022 14:56:23 +0000 (15:56 +0100)]
ui: tags: add preview to tag shape option

with a combogrid and the example text 'preview'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agoui: change style of ListField
Dominik Csapak [Thu, 17 Nov 2022 14:56:22 +0000 (15:56 +0100)]
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>
17 months agoui: tags: hide already set tags in dropdown
Dominik Csapak [Thu, 17 Nov 2022 14:56:21 +0000 (15:56 +0100)]
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>
17 months agoui: tags: make sorting more natural
Dominik Csapak [Thu, 17 Nov 2022 14:56:20 +0000 (15:56 +0100)]
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>
17 months agoui: rework inline tag editing
Dominik Csapak [Thu, 17 Nov 2022 14:56:19 +0000 (15:56 +0100)]
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>
17 months agoui: implement tag ordering as configured in datacenter config
Dominik Csapak [Wed, 16 Nov 2022 15:48:15 +0000 (16:48 +0100)]
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>
17 months agoui: add tags to ResourceGrid and GlobalSearchField
Dominik Csapak [Wed, 16 Nov 2022 15:48:14 +0000 (16:48 +0100)]
ui: add tags to ResourceGrid and GlobalSearchField

also allows to search for tags in the GlobalSearchField where each tag is
treated like a seperate field, so it weighs more if the user searches for
the exact string of a single tag

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
ui: ResourceGrid: render tags

with the 'full' styling

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agoui: tree/ResourceTree: show Tags in tree
Dominik Csapak [Wed, 16 Nov 2022 15:48:13 +0000 (16:48 +0100)]
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>
17 months agoui: {lxc, qemu}/Config: show Tags and make them editable
Dominik Csapak [Wed, 16 Nov 2022 15:48:12 +0000 (16:48 +0100)]
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>
17 months agoui: add form for editing tags
Dominik Csapak [Wed, 16 Nov 2022 15:48:11 +0000 (16:48 +0100)]
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>
17 months agoui: add form/Tag
Dominik Csapak [Wed, 16 Nov 2022 15:48:10 +0000 (16:48 +0100)]
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>
17 months agoui: dc/OptionView: add editors for tag settings
Dominik Csapak [Wed, 16 Nov 2022 15:48:09 +0000 (16:48 +0100)]
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>
17 months agoui: add PVE.form.ListField
Dominik Csapak [Wed, 16 Nov 2022 15:48:08 +0000 (16:48 +0100)]
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>
17 months agoui: add grid form for mapping tags to foreground/background colors
Dominik Csapak [Wed, 16 Nov 2022 15:48:07 +0000 (16:48 +0100)]
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>
17 months agoui: parse and save tag infos from /cluster/options
Dominik Csapak [Wed, 16 Nov 2022 15:48:06 +0000 (16:48 +0100)]
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>
17 months agoui: save ui options from /cluster/options instead of version
Dominik Csapak [Wed, 16 Nov 2022 15:48:05 +0000 (16:48 +0100)]
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>
17 months agoapi: open up /cluster/options call over injecting info into /version
Dominik Csapak [Wed, 16 Nov 2022 15:48:04 +0000 (16:48 +0100)]
api: open up /cluster/options call over injecting info into /version

To avoid returning unrelated information in the /version api call in
the future use the API endpoint that'd return the relevant
information basically anyway.

It contains most ui relevant options, like the console preference and
tag-style so allow these for users without 'Sys.Audit' on '/', for
others its unchanged, they still get the whole datacenter config.

We also add the list of allowed tags, while not strictly a datacenter
config, it's derived from the current users privileges and the
datacenter config.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoapi: /cluster/resources: add tags to returned properties
Dominik Csapak [Wed, 16 Nov 2022 15:48:03 +0000 (16:48 +0100)]
api: /cluster/resources: add tags to returned properties

by querying 'lock' and 'tags' with 'get_guest_config_properties'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agoui: qemu hardware: avoid manual deletion handling for vCPU affinity
Thomas Lamprecht [Thu, 17 Nov 2022 10:55:19 +0000 (11:55 +0100)]
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>
17 months agoui: qemu hardware: only enable affinity form field for root@pam
Thomas Lamprecht [Thu, 17 Nov 2022 10:53:55 +0000 (11:53 +0100)]
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>
17 months agoui: qemu hardware: fix eslint error
Thomas Lamprecht [Thu, 17 Nov 2022 09:38:05 +0000 (10:38 +0100)]
ui: qemu hardware: fix eslint error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoui: qemu: network: increase max queues to 64
Alexandre Derumier [Wed, 16 Nov 2022 04:13:48 +0000 (05:13 +0100)]
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>
17 months agoui: cloudinit: disable remove button without VM.Config.Cloudinit
Dominik Csapak [Thu, 17 Nov 2022 07:55:35 +0000 (08:55 +0100)]
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>
17 months agofix #4321: properly check cloud-init drive permissions
Leo Nunner [Wed, 16 Nov 2022 17:34:28 +0000 (18:34 +0100)]
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>
18 months agoui: qemu: options: use 'first disk' for legacy 'c' boot setting
Fiona Ebner [Wed, 28 Sep 2022 07:54:52 +0000 (09:54 +0200)]
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>
18 months agoui: only allow rbd pools to be added as rbd storage
Stefan Sterz [Tue, 25 Oct 2022 08:10:46 +0000 (10:10 +0200)]
ui: only allow rbd pools to be added as rbd storage

previously the ui would allow adding all pools (even the default
ceph-mon pools) as storage. this could lead to issues when users did
use these pools as storage (e.g.: vms missing their disks after a
migration). hence, restrict the pool selector to rbd pools.

fails gracefully by reverting to the previous behavior if a pool has
no application assigned to it.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Tested-By:  Aaron Lauterer <a.lauterer@proxmox.com>
18 months agoapi: ceph: add applications of each pool to the lspools endpoint
Stefan Sterz [Tue, 25 Oct 2022 08:10:45 +0000 (10:10 +0200)]
api: ceph: add applications of each pool to the lspools endpoint

since ceph luminous (ceph 12) pools need to be associated with at
least one applicaton. expose this information here too so that clients
of this endpoint can use it.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Tested-By:  Aaron Lauterer <a.lauterer@proxmox.com>