Dominik Csapak [Wed, 18 Jan 2023 13:13:03 +0000 (14:13 +0100)]
ui: storage: LVM panel: modernize & cleanup code
using cbin, gettin rid of initComponent
this is a bit more complicated than the other refactorings in storage
recently, since we have a few fields with non trivial dependecies
between the selected mode (existing vgs/base storage) and isCreate
Because of that, using a cbind for the xtype here instead of the
pmxDisplayEditField is much more convenient
(accessing the pmxDisplayEditField and the editField below is currently
not really ideal)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
using cbind + pmxDisplayEditField, getting rid of initComponent
Disables the target selector until a portal is entered. For this, we
currently cannot use the pmxDisplayEditField, since that
disabled/enables the fields automatically based on 'editable'.
Also setting buffer for the portal entry change handler to 500ms (so that
we don't query the backend that often)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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>
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
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>
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.
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.
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:
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.
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)
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
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
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)
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
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.