Dominik Csapak [Mon, 6 Mar 2023 14:23:30 +0000 (15:23 +0100)]
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>
Dominik Csapak [Fri, 10 Mar 2023 13:08:12 +0000 (14:08 +0100)]
api: return missing 'hardware' entry in node endpoint index
The 'hardware' entry was missing there. While interfacing with it
works, it will not show up during CLI auto completion and in the HTML
debug view (/api2/html/) if not listed here in the API directory
index.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stefan Sterz [Fri, 10 Mar 2023 13:08:37 +0000 (14:08 +0100)]
ui: make tree settings button like regular buttons
the "proxmox-inline-button" class is redundant in the crisp theme as
it only sets the buttons text to black. we mainly use that class for
"help" buttons. this is useful in the dark theme, because we want help
buttons to stand out a bit so (possibly confused) users are drawn to
them more easily. removing the class here doesn't change anything for
"crisp", but makes the dark theme appear more consistent. also fixes
up an unnecessary space.
Since the rule selector is not allowed to be empty, but the loading
of the rules is not instant, the validity change will trigger before
the load was finished. Since it is in the advanced section, it will
be opened every time instead of only when there is an invalid value.
This patch fixes that by temporarily setting 'allowBlank' to true
until the store is loaded, and then it revalidates the field.
Thomas Lamprecht [Fri, 10 Mar 2023 14:38:17 +0000 (15:38 +0100)]
ui: fire config change: always pass required parameters
As otherwise the listeners might choke on the missing records.
For our usage it was only a problem when one changed the tree UI
options while having the Datacenter -> Summary panel open, as that
listens to the UI changes to adapt the shown gauges for e.g., memory,
storage, or CPUs, and thus actually uses the current result (unlike
we do in the store load listener).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stefan Sterz [Wed, 8 Mar 2023 16:40:08 +0000 (17:40 +0100)]
subscription/summary/backup: stop setting the background color
setting the background color in js code adds that property as a style
attribute to the element. that makes it hard to alter later via css
and makes it hard to dynamically change the color e.g. if we want to
add different themes. the background color for these elements are
white already anyway, so just remove them here.
ui: ceph status: avoid messing with internal state of warning grid
inline the transformation for the health store and also avoid setting
raw data from the outside
and drop some bogus comments along the way, first one should mostly
use "why?" not "what happens?" comments and second, commenting
straight forward things always makes one pause and recheck everything
far to often, as a comment indicates there something non-obvious
happening.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Wed, 22 Feb 2023 07:51:52 +0000 (08:51 +0100)]
fix #1408: ui: ResourceTree: sort the tree according to tree-sorting options
Considers the newly added options from browser local storage. We have to
save the last sorting mechanism there, so we can detect if it changes
and trigger the movement/text changes (otherwise the tree nodes won't
be updated/moved)
Aaron Lauterer [Tue, 21 Feb 2023 10:23:32 +0000 (11:23 +0100)]
report: add ceph health detail
This gives us more detailed infos about the problems Ceph currently has.
It is the last command because if PGs have issues, the list can be quite
long. Therefore, we want it at the end of the report.
Aaron Lauterer [Thu, 17 Nov 2022 09:29:13 +0000 (10:29 +0100)]
ui: ceph: osd: set default icon for other crush types
Some users have a more complicated CRUSH hierarchy, for example with a
stretched cluster. The additional hierarchy steps (datacenter, rack,
room, ...) are shown in the OSD panel. Showing a generic icon for any
CRUSH types that have not a specific icon configured will make it easier
to navigate the tree as it will not look somewhat broken and empty.
Aaron Lauterer [Tue, 14 Feb 2023 08:13:47 +0000 (09:13 +0100)]
ceph osd: return PGs per OSD and show in UI
By switching from 'ceph osd tree' to the 'ceph osd df tree' mon API
equivalent , we get the same data structure with more information per
OSD. One of them is the number of PGs stored on that OSD.
The number of PGs per OSD is an important number, for example when
trying to figure out why the performance is not as good as expected.
Therefore, adding it to the OSD overview visible by default should
reduce the number of times, one needs to access the CLI.
Comparing runtime cost on a 3 node ceph cluster with 4 OSDs each doing 50k
iterations gives:
So, while definitively a bit slower, but it's still in the µs range,
and as such below HTTP in TLS in TCP connection setup for most users,
so worth the extra useful information.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
[ TL: slight rewording of subject and add benchmark data ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Lukas Wagner [Tue, 14 Feb 2023 13:35:08 +0000 (14:35 +0100)]
ui: ldap: fix `Parameter verification error`
...when editing LDAP realm sync settings and only a single property is
empty and thus to be deleted (e.g. values.delete = "filter").
If `delete` is a simple string and not an array,
`PVE.Utils.delete_if_default` simply creates a comma-separated list,
(e.g. value.delete = "filter,sync-attributes").
When the properties from the other panel are evaluated and added to the
the `delete` property, comma-separated list format is not considered,
leading to a final value for `delete` that could look like this:
value.delete = {
"server2",
"comment",
"filter,sync-attributes"
}
This commit fixes this by splitting `delete` in case it is a string.
Reported-by: Friedrich Weber <f.weber@proxmox.com> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com> Tested-by: Friedrich Weber <f.weber@proxmox.com>
Stefan Sterz [Thu, 9 Feb 2023 11:43:14 +0000 (12:43 +0100)]
fix #4521: api/tasks: replace upid as filename for task log downloads
previously the upid would just be used without a file extension when
downloading a task log. this lead to rather strange filenames that
appeared unfamiliar to users as the upid is not very prevalent in the
gui. set a proper file name based on the node name, worker type and a
time stamp instead. also add the ".log" file extension to indicate
that these files contain logs.
Leo Nunner [Mon, 30 Jan 2023 10:59:53 +0000 (11:59 +0100)]
fix #4481: fetch changelogs for any Proxmox repository
This patch fixes the issue that when the user supplied any non-standard
repositories, the changelogs often wouldn't load. For example, providing
both pve-no-subscription and pbs-no-subscription broke the changelog
API, since the URL built for pbs-no-subscription was invalid.
Thomas Lamprecht [Tue, 31 Jan 2023 16:59:56 +0000 (17:59 +0100)]
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>
Dominik Csapak [Fri, 27 Jan 2023 10:14:36 +0000 (11:14 +0100)]
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.
Thomas Lamprecht [Sat, 28 Jan 2023 11:37:04 +0000 (12:37 +0100)]
ui: metrics: expose verify-certificate for influxdb as advanced setting
Ideally we'd offer fingerprint validation, but it's already nice to
allow admins configure the no-cert-verify through the UI, e.g., when
testing the metrics stack pre-deployment or for internally hosted
instances with a trusted DNS.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Moayad Almalat [Mon, 23 Jan 2023 09:52:35 +0000 (10:52 +0100)]
fix #3037: include the split_list to shell_qoute
Based to the suggestion of Wolfgang, in regard to `split_list()`,
I converted the `split_list()` to `split(/\0/, $param->{$key});`
this will split the `$param->{$key}` null characters and push each
element to the `$args` array along with the key value.
changes since v1:
* get rid of the `use PVE::Tools qw(split_list);` since not need it anymore.
* replace the split_list to split(/\0/).
Lukas Wagner [Mon, 23 Jan 2023 13:59:58 +0000 (14:59 +0100)]
ui: node options: make text for `wakeonlan` option a bit more descriptive
If one is not familiar with the underlying configuration option,
one might think that one can enable Wake-On-Lan for a node with this
option. It was not really clear (at least without RTFM ;) ) that a
MAC address is supposed to be entered here. The added text should
hopefully make this a bit more clear.
Also increased the label width a bit, so that a full MAC
address can be properly displayed.
Lukas Wagner [Fri, 20 Jan 2023 08:47:10 +0000 (09:47 +0100)]
ui: fix search for 'Guests without Backup' window
In JS, a `for (const a in <...>)` loop iterates over indices, not
over values. To iterate over values, `for (const a of <..>)` has
to be used. Furthermore, filtering by ID did not work properly, since
the property is called `vmid`, not `id`.
Christoph Heiss [Thu, 19 Jan 2023 09:56:22 +0000 (10:56 +0100)]
ui: storage backup view: Update remove button on protection change
Currently this works in the backup view for containers/VMs, but not in
the storage backup view. Implement that for the latter part too.
Uses the callback functionality of the load() method of the store to
properly update the UI as soon as the loading has finished.
While at it, refactor the same thing in the grid backup view as well,
removing the current hack in the process.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Dominik Csapak [Wed, 18 Jan 2023 14:35:20 +0000 (15:35 +0100)]
ui: backup view: add scrolling overflow handler for the toolbar
As we got reports that some buttons get cut-off on resolutions close
to our minimal 720p one, especially if the "guest not in backup" jobs
hint is shown.
Link: https://forum.proxmox.com/threads/120714/ Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ T: resolve merge conflict and reword commit message ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>