]> git.proxmox.com Git - pve-manager-legacy.git/log
pve-manager-legacy.git
20 months agoui: datacenter options: add HA 'Rebalance on Start' to CRS options
Thomas Lamprecht [Mon, 20 Mar 2023 19:09:28 +0000 (20:09 +0100)]
ui: datacenter options: add HA 'Rebalance on Start' to CRS options

and make the window wider to avoid many lines for the boxLabel
explanation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoapi: ceph cfg: drop double definition of permission property for index
Thomas Lamprecht [Mon, 20 Mar 2023 14:34:43 +0000 (15:34 +0100)]
api: ceph cfg: drop double definition of permission property for index

Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: ceph config: use new ceph/cfg/ API endpoints
Aaron Lauterer [Mon, 20 Mar 2023 10:50:55 +0000 (11:50 +0100)]
ui: ceph config: use new ceph/cfg/ API endpoints

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>
20 months agoapi: ceph: add ceph/cfg path, deprecate ceph/config and ceph/configdb
Aaron Lauterer [Mon, 20 Mar 2023 10:50:54 +0000 (11:50 +0100)]
api: ceph: add ceph/cfg path, deprecate ceph/config and ceph/configdb

Consolidating the different config paths lets us add more as needed
without polluting our API with too many 'configxxx' endpoints.

The config and configdb paths are renamed under the ceph/cfg path:
* config -> raw (returns the ceph.conf file as is)
* configdb -> db (returns the ceph config db contents)

The old paths are still available and need to be dropped at some point.

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>
20 months agopveceph: adapt to new Pool module
Aaron Lauterer [Mon, 20 Mar 2023 10:32:32 +0000 (11:32 +0100)]
pveceph: adapt to new Pool module

The API::Ceph::Pools module is deprecated. Use the new API::Ceph::Pool
(singular) module.

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>
20 months agoui: ceph: adapt urls to new ceph/pool endpoint
Aaron Lauterer [Mon, 20 Mar 2023 10:32:31 +0000 (11:32 +0100)]
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>
20 months agoapi: ceph: deprecate pools in favor of pool
Aaron Lauterer [Mon, 20 Mar 2023 10:32:30 +0000 (11:32 +0100)]
api: ceph: deprecate pools in favor of pool

/nodes/{node}/ceph/pools/{pool} returns the pool details right away on a
GET.  This makes it bad practice to add additional sub API endpoints.

By deprecating it and replacing it with /nodes/{node}/ceph/pool/{pool}
(singular instead of plural) we can turn that into an index GET
response, making it possible to expand it more in the future.

The GET call returning the pool details is moved into
/nodes/{node}/ceph/pool/{pool}/status

The code in the new Pool.pm is basically a copy of Pools.pm to avoid
a close coupling with the old code as it is possible that it will divert
until we can entirely remove the old code.

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>
20 months agofix #4571: ui: ceph: allow adding extra-ID for multiple MDS per node
Thomas Lamprecht [Fri, 17 Mar 2023 10:22:07 +0000 (11:22 +0100)]
fix #4571: ui: ceph: allow adding extra-ID for multiple MDS per node

One MDS can only serve a single CephFS at a time and for redundancy
one wants to have standby's on other nodes.

But with multiple CephFS instances a single MDS per node might not be
enough, e.g., with three FS on a three-node cluster a failure of one
node would mean that on CephFS won't work anymore.

While the API and CLI allowed to set up multiple CephFS per node
already, the UI didn't. Address this by adding an `Extra ID` field
that will be suffixed to the base ID, which always contains the node
as that makes sorting and also associating services to their node
easier.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: make renderEnabledIcon inline for now
Thomas Lamprecht [Fri, 17 Mar 2023 10:36:49 +0000 (11:36 +0100)]
ui: make renderEnabledIcon inline for now

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: backup: replication: replace non-clickable checkbox with icons
Lukas Wagner [Thu, 26 Jan 2023 10:47:11 +0000 (11:47 +0100)]
ui: backup: replication: replace non-clickable checkbox with icons

From a usability view, having a checkbox that is not clickable is pretty
misleading, especially if the visual style is exactly the same as in
other places in the UI where the checkbox is functional.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
20 months agoui: cert upload: fix private key field sending empty string
Max Carrara [Tue, 14 Mar 2023 15:08:39 +0000 (16:08 +0100)]
ui: cert upload: fix private key field sending empty string

The private key's field is now excluded from the upload form's
JSON data if it's left empty.

Prior to this change, the form still used an empty string for the
private key's field, even if no key was provided by the user.
Because the key's field is marked as optional in the upload cert
API endpoint, JSONSchema validation would therefore fail.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
20 months agoui: cert upload: use inputpanel for certificate upload
Max Carrara [Tue, 14 Mar 2023 15:08:38 +0000 (16:08 +0100)]
ui: cert upload: use inputpanel for certificate upload

This change replaces the the certificate upload form's items with
a single inputpanel widget. The components for the key and cert fields
are preserved as-is. Hardcoded values are now explicitly set in
`onGetValues` instead of using hidden widgets.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
20 months agolxc: Add `Disconnect` option for network interfaces
Christoph Heiss [Wed, 22 Feb 2023 12:49:03 +0000 (13:49 +0100)]
lxc: Add `Disconnect` option for network interfaces

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
20 months agoui: resource tree: correctly reinsert item when name changes
Dominik Csapak [Thu, 16 Mar 2023 09:03:31 +0000 (10:03 +0100)]
ui: resource tree: correctly reinsert item when name changes

if the user has the tree sorted by name, we have to move the items
on a name change, otherwise they'll stay on the old position

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
20 months agobump version to 7.3-7
Thomas Lamprecht [Wed, 15 Mar 2023 17:37:02 +0000 (18:37 +0100)]
bump version to 7.3-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: osd: add details window
Aaron Lauterer [Mon, 12 Dec 2022 12:14:51 +0000 (13:14 +0100)]
ui: osd: add details window

This new windows provides more detailes about an OSD such as:
* PID
* Memory usage
* various metadata that could be of interest
* list of phyiscal disks used for the main disk, db and wal with
  additional infos about the volumes for each

A new 'Details' button is added to the OSD overview and a double click
on an OSD will also open this new window.

The componend defines the items in the initComponent instead of
following a fully declarative approach. This is because we need to pass
the same store to multiple Proxmox.ObjectGrids.

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>
20 months agoui utils: add renderer for ceph osd addresses
Aaron Lauterer [Mon, 12 Dec 2022 12:14:50 +0000 (13:14 +0100)]
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>
20 months agoapi ceph osd: add OSD index, metadata and lv-info
Aaron Lauterer [Mon, 12 Dec 2022 12:14:49 +0000 (13:14 +0100)]
api ceph osd: add OSD index, metadata and lv-info

To get more details for a single OSD, we add two new endpoints:
* nodes/{node}/ceph/osd/{osdid}/metadata
* nodes/{node}/ceph/osd/{osdid}/lv-info

The {osdid} endpoint itself gets a new GET handler to return the index.

The metadata one provides various metadata regarding the OSD.

Such as
* process id
* memory usage
* info about devices used (bdev/block, db, wal)
    * size
    * disks used (sdX)
    ...
* network addresses and ports used
...

Memory usage and PID are retrieved from systemd while the rest can be
retrieved from the metadata provided by Ceph.

The second one (lv-info) returns the following infos for a logical
volume:
* creation time
* lv name
* lv path
* lv size
* lv uuid
* vg name

Possible volumes are:
* block (default value if not provided)
* db
* wal

'ceph-volume' is used to gather the infos, except for the creation time
of the LV which is retrieved via 'lvs'.

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>
20 months agoapi: node: bulk actions: allow when user has permission for each guest
Fiona Ebner [Wed, 1 Mar 2023 14:22:20 +0000 (15:22 +0100)]
api: node: bulk actions: allow when user has permission for each guest

Users with permissions for some guests can already start a task for
each sequentially.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
20 months agoui: bulk start/stop: align capability checks with backend
Fiona Ebner [Wed, 1 Mar 2023 14:22:19 +0000 (15:22 +0100)]
ui: bulk start/stop: align capability checks with backend

The backend requires VM.PowerMgmt, not Sys.PowerMgmt for bulk start
and bulk stop.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
20 months agoui: don't show tags/lock column in pool member grid
Dominik Csapak [Wed, 15 Mar 2023 15:30:30 +0000 (16:30 +0100)]
ui: don't show tags/lock column in pool member grid

we use a different api call where we currently don't have the tags or
lock, so don't add the columns there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
20 months agod/control: bump versioned dependency for proxmox-widget-toolkit
Thomas Lamprecht [Tue, 14 Mar 2023 16:28:53 +0000 (17:28 +0100)]
d/control: bump versioned dependency for proxmox-widget-toolkit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agopveproxy/template: switch to using the "auto" theme per default
Stefan Sterz [Tue, 14 Mar 2023 14:01:59 +0000 (15:01 +0100)]
pveproxy/template: switch to using the "auto" theme per default

the auto theme uses media queries to detect a users preferred theme,
switch to using it per default instead of the light theme.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
20 months agoui: fix not opening 'bulk action' windows
Dominik Csapak [Tue, 14 Mar 2023 10:20:36 +0000 (11:20 +0100)]
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>
20 months agorevert "fix #4333: redirect API handler output to STDERR"
Thomas Lamprecht [Tue, 14 Mar 2023 10:21:27 +0000 (11:21 +0100)]
revert "fix #4333: redirect API handler output to STDERR"

Redirecting stdout is not a feasible approach, as that also affects
all run_commands and other command executions/forks done by the API
handler, and thus breaks parsing outputs of such command executions
in the API handlers.

We plan to add a `--result-fd` option instead, allowing users to pass
their own file, open FD or named pipe to the pvesh, so that they can
process the output in streaming or in full afterward afterwards.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: pbs paperkey: cleanup iframe for printing after window close
Thomas Lamprecht [Mon, 13 Mar 2023 09:48:32 +0000 (10:48 +0100)]
ui: pbs paperkey: cleanup iframe for printing after window close

Reported-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: BackupEdit: refactor edit window into declarative style
Dominik Csapak [Mon, 6 Mar 2023 14:23:35 +0000 (15:23 +0100)]
ui: BackupEdit: refactor edit window into declarative style

simplifies some things, e.g. en/disabling the grid and pool selector
while refactoring, cleanup up some smaller things like nested if/else
paths, unnecessary splitting of the deprecated 'dow' parameter, etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agofix #4239: ui: show selected but non-existing vmids in backup edit
Dominik Csapak [Mon, 6 Mar 2023 14:23:34 +0000 (15:23 +0100)]
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>
20 months agofix #4490: ui: add column filters in Backup Job edit window
Dominik Csapak [Mon, 6 Mar 2023 14:23:33 +0000 (15:23 +0100)]
fix #4490: ui: add column filters in Backup Job edit window

by replacing the manual vm grid implementation and reusing the
VMSelector we already have. Since this is a full-fledged form field, we
can drop the complicated selection tracking / reselecting that we did
by saving into a hidden field.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: guest selector: correctly change invalid class on en/disable
Dominik Csapak [Mon, 6 Mar 2023 14:23:32 +0000 (15:23 +0100)]
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>
20 months agoui: guest selector: switch from post-filter to query param for API call
Dominik Csapak [Mon, 6 Mar 2023 14:23:31 +0000 (15:23 +0100)]
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>
20 months agoui: guest selector: improve set/getValue handling during store load
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>
20 months agoui: guest selector: make the shown picker columns customizable
Dominik Csapak [Mon, 6 Mar 2023 14:23:29 +0000 (15:23 +0100)]
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>
20 months agopvesh: don't bloat the code on comments
Thomas Lamprecht [Sat, 11 Mar 2023 17:10:09 +0000 (18:10 +0100)]
pvesh: don't bloat the code on comments

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agofix #4333: redirect API handler output to STDERR
Fabian Grünbichler [Wed, 8 Mar 2023 11:47:09 +0000 (12:47 +0100)]
fix #4333: redirect API handler output to STDERR

otherwise, print/warn statements by the API endpoint are included in the
output, which breaks JSON parsing in case of output-format == json*.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20 months agoapi: return missing 'hardware' entry in node endpoint index
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>
20 months agoui: make tree settings button like regular buttons
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.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
20 months agoui: create ceph pool: fix false-positive trigger showing advanced fields
Dominik Csapak [Fri, 10 Mar 2023 14:08:08 +0000 (15:08 +0100)]
ui: create ceph pool: fix false-positive trigger showing advanced fields

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.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
20 months agoui: followup: add missing semicolon
Thomas Lamprecht [Fri, 10 Mar 2023 14:42:41 +0000 (15:42 +0100)]
ui: followup: add missing semicolon

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: fire config change: always pass required parameters
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>
20 months agoui: make ceph charts change color more dynamically
Stefan Sterz [Wed, 8 Mar 2023 16:40:09 +0000 (17:40 +0100)]
ui: make ceph charts change color more dynamically

add support for setting the background and text color via css. also
allows for dynamically switching the color when a theme change is
detected.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
20 months agosubscription/summary/backup: stop setting the background color
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.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
20 months agopveproxy/template: add support for switching themes
Stefan Sterz [Wed, 8 Mar 2023 16:40:07 +0000 (17:40 +0100)]
pveproxy/template: add support for switching themes

load the dark theme only if requested through a cookie, also adds
support for the "auto" theme that uses the dark theme based on a
media query.

this requires a bump of the widget toolkit so the dark-theme css file
is available.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
20 months agogui: create user info menu intro for selecting the theme
Daniel Tschlatscher [Wed, 8 Mar 2023 16:40:06 +0000 (17:40 +0100)]
gui: create user info menu intro for selecting the theme

this requires a bump of the widget toolkit so the version includes the
necessary widgets.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
20 months agoui: ceph status: avoid messing with internal state of warning grid
Thomas Lamprecht [Wed, 8 Mar 2023 16:52:31 +0000 (17:52 +0100)]
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>
20 months agoui: ceph status: fix code style, xtype must come first
Thomas Lamprecht [Wed, 8 Mar 2023 14:39:07 +0000 (15:39 +0100)]
ui: ceph status: fix code style, xtype must come first

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months ago ui: node config: code cleanups
Thomas Lamprecht [Wed, 22 Feb 2023 15:16:37 +0000 (16:16 +0100)]
 ui: node config: code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: fix capability check for when to disable bulk migrate
Thomas Lamprecht [Wed, 22 Feb 2023 15:15:47 +0000 (16:15 +0100)]
ui: fix capability check for when to disable bulk migrate

In the resource tree context menu and in the node panel.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: resource tree settings: make wider and clarify field labels
Thomas Lamprecht [Wed, 22 Feb 2023 10:37:53 +0000 (11:37 +0100)]
ui: resource tree settings: make wider and clarify field labels

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: resource tree settings: use the safer hash as bogus submit URL
Thomas Lamprecht [Wed, 22 Feb 2023 10:36:40 +0000 (11:36 +0100)]
ui: resource tree settings: use the safer hash as bogus submit URL

while it should not matter as we override submit() here, using the #
ensures that there never will be any HTTP request produced.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agoui: resource tree: switch settings button to more subtle inline one
Thomas Lamprecht [Wed, 22 Feb 2023 10:25:26 +0000 (11:25 +0100)]
ui: resource tree: switch settings button to more subtle inline one

This isn't something one will change often, nor it's a core feature
so reduce visibility a bit to avoid that the UI appears more crowded.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
20 months agofix #1408: ui: ResourceTree: sort the tree according to tree-sorting options
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)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
20 months agoui: add window for changing tree related options
Dominik Csapak [Wed, 22 Feb 2023 07:51:51 +0000 (08:51 +0100)]
ui: add window for changing tree related options

such as the sorting/grouping of guests. saves them in the browser local
storage under 'pve-tree-sorting'

adds a button for it next to the the view selector

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
20 months agoui: refactor refreshing the the resource store/tree
Dominik Csapak [Wed, 22 Feb 2023 07:51:50 +0000 (08:51 +0100)]
ui: refactor refreshing the the resource store/tree

we'll need it elsewhere too, and it was rather hidden in the
updateTagSettings call.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
20 months agoui: refactor ui option related methods into UIOptions
Dominik Csapak [Wed, 22 Feb 2023 07:51:49 +0000 (08:51 +0100)]
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>
20 months agoui: remove unused booleanfield
Dominik Csapak [Wed, 22 Feb 2023 07:51:48 +0000 (08:51 +0100)]
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>
20 months agoui: remove 'Storage View'
Dominik Csapak [Wed, 22 Feb 2023 07:51:47 +0000 (08:51 +0100)]
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>
21 months agoreport: add ceph health detail
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.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
21 months agoui: ceph: move single used icon into interpolated string
Dominik Csapak [Wed, 15 Feb 2023 14:04:16 +0000 (15:04 +0100)]
ui: ceph: move single used icon into interpolated string

it's a bit shorter and still readable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
21 months agoui: ceph: osd: set default icon for other crush types
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.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
21 months agoceph osd: return PGs per OSD and show in UI
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:

               Rate osd-df-tree    osd-tree
osd-df-tree  9141/s          --        -25%
osd-tree    12136/s         33%          --

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>
21 months agoui: ldap: fix `Parameter verification error`
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>
21 months agofix #4335: report: add datacenter.cfg to output
Max Carrara [Mon, 13 Feb 2023 09:19:15 +0000 (10:19 +0100)]
fix #4335: report: add datacenter.cfg to output

Includes the contents of /etc/pve/datacenter.cfg
in the cluster section.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
21 months agofix #4521: api/tasks: replace upid as filename for task log downloads
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.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
21 months agobump version to 7.3-6
Thomas Lamprecht [Thu, 2 Feb 2023 07:43:08 +0000 (08:43 +0100)]
bump version to 7.3-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agoapi apt: fix spelling in hash to avoid undef access warnings
Thomas Lamprecht [Thu, 2 Feb 2023 07:42:12 +0000 (08:42 +0100)]
api apt: fix spelling in hash to avoid undef access warnings

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agobump version to 7.3-5
Thomas Lamprecht [Wed, 1 Feb 2023 11:58:18 +0000 (12:58 +0100)]
bump version to 7.3-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agoapi apt: support getting changelog of backports packages
Thomas Lamprecht [Wed, 1 Feb 2023 11:27:29 +0000 (12:27 +0100)]
api apt: support getting changelog of backports packages

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agoapi apt: code/style cleanup in changelog endpoint
Thomas Lamprecht [Wed, 1 Feb 2023 11:25:42 +0000 (12:25 +0100)]
api apt: code/style cleanup in changelog endpoint

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agoapi apt: recduce indentation in package status update sub
Thomas Lamprecht [Wed, 1 Feb 2023 11:21:39 +0000 (12:21 +0100)]
api apt: recduce indentation in package status update sub

best viewed with `-w` flag

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agoapi apt: code/style cleanup getting changelog URL
Thomas Lamprecht [Wed, 1 Feb 2023 11:20:28 +0000 (12:20 +0100)]
api apt: code/style cleanup getting changelog URL

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agofix #4481: fetch changelogs for any Proxmox repository
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.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
21 months agoui: local storage selector: avoid cut-off for node field
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>
21 months agoui: form store node selector: improve variable name clarity slightly
Thomas Lamprecht [Tue, 31 Jan 2023 16:58:01 +0000 (17:58 +0100)]
ui: form store node selector: improve variable name clarity slightly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agoui: ComboBoxSetStoreNode: don't hide the picker when clicking the toolbar
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.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
21 months agofix #4502: ui: VM OS type: the l26 type is also compatible with Linux 6.x
Thomas Lamprecht [Mon, 30 Jan 2023 10:01:52 +0000 (11:01 +0100)]
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>
21 months agoui: metrics: expose verify-certificate for influxdb as advanced setting
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>
21 months agoui: metrics: avoid repeated querys of the view
Thomas Lamprecht [Sat, 28 Jan 2023 11:36:07 +0000 (12:36 +0100)]
ui: metrics: avoid repeated querys of the view

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
21 months agofix typo in user tag access text field
Daniel Tschlatscher [Fri, 25 Nov 2022 10:48:15 +0000 (11:48 +0100)]
fix typo in user tag access text field

This text is only displayed when at least one tag is defined in the
User Tag Access editor.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
21 months agofix #3037: include the split_list to shell_qoute
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/).

Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
21 months agoui: cluster info: fix displaying error
Fiona Ebner [Mon, 23 Jan 2023 13:45:08 +0000 (14:45 +0100)]
ui: cluster info: fix displaying error

The function to set the error mask expects the message as a string,
not the error object.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
21 months agoui: node options: make text for `wakeonlan` option a bit more descriptive
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.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
22 months agoui: factor out not found rendering to common helper
Thomas Lamprecht [Sat, 21 Jan 2023 13:30:54 +0000 (14:30 +0100)]
ui: factor out not found rendering to common helper

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: schedule sim: denote if any simulation was done via empty text
Thomas Lamprecht [Fri, 20 Jan 2023 09:46:53 +0000 (10:46 +0100)]
ui: schedule sim: denote if any simulation was done via empty text

As subtle UX hint that the user first needs to press the Simulate
button.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: schedule sim: clear previous simulation output on error
Thomas Lamprecht [Fri, 20 Jan 2023 09:45:59 +0000 (10:45 +0100)]
ui: schedule sim: clear previous simulation output on error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: schedule sim: rename 'OK' button to 'Done'
Thomas Lamprecht [Fri, 20 Jan 2023 09:44:39 +0000 (10:44 +0100)]
ui: schedule sim: rename 'OK' button to 'Done'

As Ok is mostly sensible for acknowledging informational or notice
pop-ups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: fix search for 'Guests without Backup' window
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`.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
22 months agoui: schedule sim: code style cleanup
Thomas Lamprecht [Fri, 20 Jan 2023 08:42:00 +0000 (09:42 +0100)]
ui: schedule sim: code style cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: storage backup view: Update remove button on protection change
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>
22 months agoui: ScheduleSimulator: split date and time into two columns
Dominik Csapak [Wed, 18 Jan 2023 14:35:21 +0000 (15:35 +0100)]
ui: ScheduleSimulator: split date and time into two columns

and align the time right. This makes it easier to compare times

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
22 months agoui: backup view: add scrolling overflow handler for the toolbar
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>
22 months agoui: backup info: code cleanups
Thomas Lamprecht [Thu, 19 Jan 2023 16:32:57 +0000 (17:32 +0100)]
ui: backup info: code cleanups

And switch the title of the "not in any job" info window to title
case, just like the button that opens it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: backup info: merge not-in-any-job warning into button to save space
Thomas Lamprecht [Thu, 19 Jan 2023 16:30:28 +0000 (17:30 +0100)]
ui: backup info: merge not-in-any-job warning into button to save space

We got reports in the forum about accessibility issues, as buttons
where cut-off due to the relatively long warning.

Use the old text as tooltip for the button and add the icon also
there.

Link: https://forum.proxmox.com/threads/120714/#post-526376
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: backup info: use collapsible field set to render retention config
Thomas Lamprecht [Thu, 19 Jan 2023 15:41:52 +0000 (16:41 +0100)]
ui: backup info: use collapsible field set to render retention config

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: backup info: make initial height dependent of body view-height
Thomas Lamprecht [Thu, 19 Jan 2023 15:41:21 +0000 (16:41 +0100)]
ui: backup info: make initial height dependent of body view-height

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: backup info: move pool-to-backup to column 2 for balance
Thomas Lamprecht [Thu, 19 Jan 2023 15:23:51 +0000 (16:23 +0100)]
ui: backup info: move pool-to-backup to column 2 for balance

Its only shown sometimes and with this patch it's adjacent to the
selection mode, so quite fitting also from that POV.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: backup info: drop "Email" from "Notification" label
Thomas Lamprecht [Thu, 19 Jan 2023 15:18:03 +0000 (16:18 +0100)]
ui: backup info: drop "Email" from "Notification" label

avoids extra vertical space usage due to a long label that's broken
up in multiple lines while not really loosing any relevant info.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: backup info: avoid clunky switch for simple mapping
Thomas Lamprecht [Thu, 19 Jan 2023 15:16:49 +0000 (16:16 +0100)]
ui: backup info: avoid clunky switch for simple mapping

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoui: reduce default size of Backup detail window
Dominik Csapak [Wed, 18 Jan 2023 14:35:19 +0000 (15:35 +0100)]
ui: reduce default size of Backup detail window

on our minimal display size (1280x720), using height 700 is too large
when considering that the browser + os also need some vertical space.

For good measure, use a maximum of 600 pixels. Since the window is
resizable anyway, users with more space should not have a problem here.

reported in the forum:
https://forum.proxmox.com/threads/web-forms-extend-beyond-web-page-window-in-some-cases.120714

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
22 months agoui: storage: LVM panel: modernize & cleanup code
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>