6687 Commits

Author SHA1 Message Date
Thomas Lamprecht
239214560b 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>
2023-03-20 20:09:40 +01:00
Thomas Lamprecht
9c7c61d06c 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>
2023-03-20 15:34:46 +01:00
Aaron Lauterer
5eb3025653 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>
2023-03-20 15:31:04 +01:00
Aaron Lauterer
26cf20bc0f 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>
2023-03-20 15:31:04 +01:00
Aaron Lauterer
a066500123 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>
2023-03-20 15:31:04 +01:00
Aaron Lauterer
b5bbcb4c7f 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>
2023-03-20 15:31:04 +01:00
Aaron Lauterer
b2e005d76a 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>
2023-03-20 15:31:04 +01:00
Thomas Lamprecht
2d6c2886a7 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>
2023-03-17 12:03:37 +01:00
Thomas Lamprecht
de422b3e7e ui: make renderEnabledIcon inline for now
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-17 11:37:01 +01:00
Lukas Wagner
b98ffc0d54 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>
2023-03-17 11:20:43 +01:00
Max Carrara
9536d5ef92 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>
2023-03-17 11:20:43 +01:00
Max Carrara
1904262b95 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>
2023-03-17 11:20:43 +01:00
Christoph Heiss
4c6c99cc66 lxc: Add Disconnect option for network interfaces
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-03-16 16:04:10 +01:00
Dominik Csapak
c04b8fea38 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>
2023-03-16 10:21:23 +01:00
Thomas Lamprecht
6ee89572ea bump version to 7.3-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-15 18:37:02 +01:00
Aaron Lauterer
6757887a5d 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>
2023-03-15 18:24:27 +01:00
Aaron Lauterer
fe5c4f8156 ui utils: add renderer for ceph osd addresses
Render the OSD listening addresses a bit nicer and one per line.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by:  Dominik Csapak <d.csapak@proxmox.com>
2023-03-15 18:24:27 +01:00
Aaron Lauterer
e907f822d7 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>
2023-03-15 18:24:27 +01:00
Fiona Ebner
6aec456504 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>
2023-03-15 18:21:56 +01:00
Fiona Ebner
0d06378c66 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>
2023-03-15 18:21:50 +01:00
Dominik Csapak
4d9e2176e2 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>
2023-03-15 18:18:12 +01:00
Thomas Lamprecht
642d9db8e1 d/control: bump versioned dependency for proxmox-widget-toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-14 17:28:53 +01:00
Stefan Sterz
28a93d3ed1 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>
2023-03-14 15:11:42 +01:00
Dominik Csapak
6f2940c7b1 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>
2023-03-14 11:37:47 +01:00
Thomas Lamprecht
e07c055df4 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>
2023-03-14 11:21:29 +01:00
Thomas Lamprecht
faaae2a2bb 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>
2023-03-13 10:48:35 +01:00
Dominik Csapak
d232c409f6 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>
2023-03-11 18:47:34 +01:00
Dominik Csapak
7a5ca76aa1 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>
2023-03-11 18:47:34 +01:00
Dominik Csapak
e440f8a46a 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>
2023-03-11 18:47:34 +01:00
Dominik Csapak
fc8138ec20 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>
2023-03-11 18:47:34 +01:00
Dominik Csapak
11fc6d7fb5 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>
2023-03-11 18:47:34 +01:00
Dominik Csapak
d3086ce752 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>
2023-03-11 18:47:34 +01:00
Dominik Csapak
66a38a6afa 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>
2023-03-11 18:47:34 +01:00
Thomas Lamprecht
5ea98762aa pvesh: don't bloat the code on comments
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-11 18:10:09 +01:00
Fabian Grünbichler
89fba14715 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>
2023-03-11 18:08:00 +01:00
Dominik Csapak
2f4105013b 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>
2023-03-11 17:57:02 +01:00
Stefan Sterz
f73baabb78 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>
2023-03-11 17:53:13 +01:00
Dominik Csapak
c2cdef8902 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>
2023-03-11 17:38:38 +01:00
Thomas Lamprecht
619c74f2d7 ui: followup: add missing semicolon
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-10 15:42:50 +01:00
Thomas Lamprecht
4aa70a6b3a 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>
2023-03-10 15:38:21 +01:00
Stefan Sterz
e98edb4c37 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>
2023-03-08 17:55:41 +01:00
Stefan Sterz
056e5aad9b 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>
2023-03-08 17:55:41 +01:00
Stefan Sterz
5137b16fd2 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>
2023-03-08 17:55:41 +01:00
Daniel Tschlatscher
d975d810b4 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>
2023-03-08 17:55:41 +01:00
Thomas Lamprecht
b8febbcc60 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>
2023-03-08 17:54:19 +01:00
Thomas Lamprecht
616d54de16 ui: ceph status: fix code style, xtype must come first
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-08 17:37:53 +01:00
Thomas Lamprecht
dd604328aa ui: node config: code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-02-22 16:16:37 +01:00
Thomas Lamprecht
44705bf65c 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>
2023-02-22 16:15:50 +01:00
Thomas Lamprecht
dc4056cfcb ui: resource tree settings: make wider and clarify field labels
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-02-22 11:37:53 +01:00
Thomas Lamprecht
0489947166 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>
2023-02-22 11:36:42 +01:00