Commit Graph

7009 Commits

Author SHA1 Message Date
Thomas Lamprecht
fea56c69dd ui: datacenter config: adapt to new default MAC prefix
The official Proxmox OUI, assigned by the IEEE, is now used as
default.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-29 18:02:21 +01:00
Fabian Grünbichler
506134df52 subscription: remove ceph APT auth if invalid
like we do for the main APT auth file(s) in proxmox-subscription.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-25 18:45:48 +02:00
Fabian Grünbichler
406d820f86 d/control: bump libpve-network-perl suggestion
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-10-25 13:14:26 +02:00
Alexandre Derumier
202e26d425 sdn: controllers: add isis controller 2023-10-25 13:05:20 +02:00
Dominik Csapak
33506fa03d ui: tags: fix focus for edit mode
such that one can tab through the editable tag fields.
We have to handle that manually, since ExtJs does not expect
contenteditable html tags for focus handling.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-24 16:48:46 +02:00
Christoph Heiss
8dfdcff8f0 ui: container guest status: show distro logo and name in summary header
It fits neatly there, is rather intrusive and yet still visible at
first sight. It also solves the problem of having to create a bigger
row, so that the icon is still easily recognisable. At the default
font-size of 13pt, this really wasn't the case.

Verified that each supported distro is present in the font and the
name matches up and tested through all supported distros (including
'unmanaged').

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: html-encode, just to be sure, as reviewed by Dominik ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-23 17:28:14 +02:00
Christoph Heiss
b1785dbc65 ui: container guest status: show privileged status as new row
As that info is not available through the store (which stores the
status), it must be fetched separately.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: rework subject and avoid arror-fn for controller to keep `this`
   working, as reviewed by Dominik ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-23 17:27:14 +02:00
Christoph Heiss
4845cca7e2 expose font-logos via API server and load in UI
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-23 17:26:08 +02:00
Thomas Lamprecht
2944acf97e pvesh: code clean-ups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-21 16:32:46 +02:00
Thomas Lamprecht
6d7deac70d pvesh: code cleanups for streamed response handling
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-19 15:26:08 +02:00
Christoph Heiss
86f9a0acea pvesh: decode streamed responses
This allows to use `pvesh` on endpoints like /nodes/{node}/journal,
which return streamed (and possibly gzip'd) responses.

Currently, e.g. `pvesh get /nodes/localhost/journal --lastentries 10`
fails with:

  gzip: stdout: Broken pipe
  got hash object, but result schema specified array!

Using e.g. `--output-format yaml` resulted in:

  ---
  download:
    content-encoding: gzip
    content-type: application/json
    fh: &1 !!perl/ref
      =: *1
    stream: 1

  gzip: stdout: Broken pipe
  Failed to write

This is due the API call returning a "download" object (as seen above),
which contains (among some other things) a file handle to read the
response from.

With this patch, the response from such endpoints is now correctly read
and displayed. Only handles combinations of `Content-Encoding` == 'gzip'
and either 'text/plain' or 'application/json' for `Content-Type`.

This tries to mimic the behavior of the API server implementation when
encountering `download` objects.

Tested this with all four output formats 'text', 'json', 'json-pretty'
and 'yaml', as well as "cross-node" in a local test cluster.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-10-19 10:08:54 +02:00
Thomas Lamprecht
39d58bb5b2 ui: ceph wizard: switch to reef as default release for new setups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-17 12:55:00 +02:00
Thomas Lamprecht
e828af06bf ui: css: rename pmx-faded utility class to pmx-opacity-75
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-13 17:26:54 +02:00
Thomas Lamprecht
5265a2d1a9 ui: clarify that compression selector is for backup only
other targets/sources might have a different list of available
compressions.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-11 15:59:45 +02:00
Christian Ebner
5cd1349071 ui: makefile: readd compression selector form
Commit 65704cc2a8 apparently removed by
misstake the form/CompressionSelector.js from the Makefile.

It is however required by the backup view to select the compression
method, so readd it.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-10-11 13:39:31 +02:00
Thomas Lamprecht
7e7e2dc421 ui: ceph warnings: drop summary copy button
talked with Aaron off-list and he found it OK to drop this button now
that "Copy Details" became a "Copy All".

This reduces cognitive load on the user as there are half as many
buttons.

Rename "Copy All" to "Copy to Clipboard" now that there's only one and
drop the disable logic.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 18:16:34 +02:00
Thomas Lamprecht
e4a2efc611 ui: ceph warnings: do not scroll expanded content into view
this causes jumps and is IMO rather irritating, keep hands off from
scrolling, that's best done by user/browser.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 17:38:39 +02:00
Thomas Lamprecht
aa730149a9 ui: ceph warnings: lower opacity for no-details text
to make it more clear that this is not the details, but a UI text
placeholder.
Add a `pmx-faded` class that reduced opacity, as there where recent
discussion about adding such a utility class to widget-toolkit anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 17:38:39 +02:00
Thomas Lamprecht
43fdec754d ui: ceph warnings: disable copy-all if there are no additional infos
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 17:38:39 +02:00
Thomas Lamprecht
f2a0f0ec72 ui: ceph warnings: switch copy-details to copy-all
With health level, summary and full details.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 17:38:39 +02:00
Thomas Lamprecht
d3cbdb217c ui: ceph warnings: use normal font-weight
The use of the <pre> tag will result in font-family `monospace`, and
monospace fonts are often a bit odd w.r.t. size and weight. E.g.,
without this I get a light-font selected, which is hardly visible.

Set the weight to normal, which should not hurt those that got a
better font selection by there system/browser already.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 17:38:39 +02:00
Thomas Lamprecht
b2fcefa067 ui: ceph warnings: render whitespace as pre-wrap
To avoid potential horizontal scrolling on smaller screens, which can
be a PITA as the scroll bar is at the bottom, so users have to scroll
down to move it left and right..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 17:38:39 +02:00
Thomas Lamprecht
feb192207a ui: ceph warnings: code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 17:38:39 +02:00
Aaron Lauterer
459b6c3136 ui: ceph: improve discoverability of warning details
by
* replacing the info button with expandable rows that contain the
  details of the warning
* adding two action buttons to copy the summary and details
* making the text selectable

The row expander works like the one in the mail gateway tracking center
-> doubleclick only opens it.

The height of the warning grid is limited to not grow too large.
A Diffstore is used to avoid expanded rows being collapsed on an update.

The rowexpander cannot hide the toggle out of the box. Therefore, if
there is no detailed message for a warning, we show a placeholder text.
We could consider extending it in the future to only show the toggle if
a defined condition is met.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 17:38:39 +02:00
Thomas Lamprecht
fddf562bf9 api tools: fix usage of stat by-name interface
Fixes: f6395eb6 ("hw-address: check if source file changed so cache needs update")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 15:38:27 +02:00
Thomas Lamprecht
e02db471ab api tools: improve use-statement sorting and grouping
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-10 15:33:41 +02:00
Maximiliano Sandoval
f6395eb69c hw-address: check if source file changed so cache needs update
We cache the hash of this file, it makes sense to first check if the
file changed via `stat` and recompute the hash if needed.

This mirrors similar changes done for PMG [0].

[0]: https://git.proxmox.com/?p=pmg-api.git;a=commit;h=16d2ff9f8e90db64114a66d78672f5a03f5ee990.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-10-09 16:36:59 +02:00
Thomas Lamprecht
b7588bcdef api: subscription update: actually ignore surrounding whitespace
We already trim correctly in the API endpoint's code, but that happens
after the parameter verification from the REST server, and as
patterns are anchored between ^$pattern$ there by default, it fails if
someone sends some whitespace before/after the actual key.

Simply allow arbitrary whitespace, but only at the API endpoint
itself, do not adapt the subscription pattern to avoid that an actual
whitespace sneaks in and let some lower level code throw up on it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-05 13:43:30 +02:00
Thomas Lamprecht
8e642410c7 ui: subscription upload: trim key from whitespace on submission
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-05 13:43:30 +02:00
Thomas Lamprecht
a341730bd4 ui: subscription upload: increase window and label width
Quite a few translations produce a longer label here, so account for
that, the window is still very small.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-05 13:43:30 +02:00
Thomas Lamprecht
67dc81829f ui: subscription panel: code reduction and modernization
Drop quite a few lines while actually improving readability.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-05 13:43:30 +02:00
Christian Ebner
0329876ccf pve7to8: Add check for dkms modules
... and warn if at least one is present.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-09-27 17:02:12 +02:00
Thomas Lamprecht
a622cbf0d9 ui: storage content: transform detected compression extension to lower-case
otherwise the form will be invalid if a uppercase one comes in.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-27 16:59:00 +02:00
Fiona Ebner
e11316b6f4 ui: vm selector: gracefully handle undefined/null in setValue function
Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-09-27 16:53:14 +02:00
Fiona Ebner
651221aec6 ui: vm selector: don't add invalid not found items
Doing a simple numericity check and warn in the console so developers
can notice if there is something off.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2023-09-27 16:53:14 +02:00
Fiona Ebner
4a862f4f02 ui: vm selector: gracefully handle empty IDs in setValue function
An empty string is passed by the backup job window when using
selection mode 'all', would be converted to [""] and wrongly add an
entry with VMID 0 because the item "" could not be found in the store.

Reported in the community forum:
https://forum.proxmox.com/threads/130164/

Fixes: 7a5ca76a ("fix #4239: ui: show selected but non-existing vmids in backup edit")
Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-09-27 16:53:14 +02:00
Christian Ebner
68278ea36d pve7to8: Fix Fedora 38 systemd unified cgroupv2 check
For Fedora 38 the systemd shared object files used to check the systemd
version are located at /usr/lib64/systemd or /usr/lib/systemd.
Therefore, include /usr/lib64/systemd in the list of directories to
check.

Further, Fedora 38 adds a fc38 postfix to the filename, so expand the
regex to cover that as well.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-09-27 16:51:35 +02:00
Thomas Lamprecht
aec571de43 Revert "api: query_url_metadata: optionally detect compression"
A simple string regex match on data that the API returns anyway can be
the job of a frontend/client..

Safe to do as we never released this API change in a bumped manager
version and switched the UI to extract this info client-side.

This reverts commit d61728e289.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-27 07:25:59 +02:00
Thomas Lamprecht
9493f69cd7 ui: storage content: extract possible compressor extension client side
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-27 07:25:59 +02:00
Thomas Lamprecht
65704cc2a8 ui: avoid trivial decompression widget, only used once
Currently it was only used once and it had not really any benefit, as
the one thing it did is defining a list of compressors – the
KVComboBox is made such, so that this can be done on definition
directly, no need for inheritance.

Also, if one would think about adopting this more for other similar
selectors: While we have some uses of compressors all over the place,
and most of them are not really coupled to each other, so having a
single widget for them does not make sense.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-27 07:25:59 +02:00
Philipp Hufnagl
e86862bf27 fix #4849: ui: allow decompressing ISO files when downloading
The compression algorithm will be automatically detected when querying the
download URL. It can be overriden by the user using the "compression algorithm"
drop down under advanced.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>

Reworded title and message, updated d/control for libpve-storage-perl version
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2023-09-26 09:35:31 +02:00
Philipp Hufnagl
d61728e289 api: query_url_metadata: optionally detect compression
extend the query_url_metadata endpoint with the option to detect and return
used compression algorithms, if supported by PVE. this will be used to support
decompression as part of the download flow for certain file types (ISO files
for now).

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>

Slightly reworded commit title/message
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2023-09-26 09:28:09 +02:00
Thomas Lamprecht
acaa1e40d6 d/control: bump dependency of pve-container and guest-common
While not a must, it helps to ensure we got the newly documented
pbs-entries-max feature actually available and avoids all to freaky
set ups.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-18 16:55:09 +02:00
Alexander Zeidler
b0c2d8980f fix #3069: vzdump: add property 'performance: pbs-entries-max=N'
configuring pbs-entries-max can avoid failing backups due to a high
amount of files in folders where a folder exclusion is not possible

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
2023-09-18 16:54:17 +02:00
Lukas Wagner
84846fdc10 ui: notification: remove unneeded gettext calls
'mail-to-root' is the name of the default notification target and
should thus not be translated.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-09-18 12:06:52 +02:00
Thomas Lamprecht
3dff70eb7e ui: notifications event: fix using gettext
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-14 08:15:02 +02:00
Thomas Lamprecht
57490ff2c6 bump version to 8.0.6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-08 13:42:20 +02:00
Thomas Lamprecht
f9cfa38ee7 api: pool update: rename 'transfer' parameter to 'allow-move'
The 'allow' wording makes it clearer that we just not block something,
but do not really do anything else. And we use the 'move' wording also
for when moving volumes between guests, which is in the same spirit as
this here (remove something from a entity and add it to another).

While this was already bumped, we did not move it outside of pvetest,
so I do not see practical concerns with API breakage.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-08 13:36:38 +02:00
Thomas Lamprecht
b7bc7ae9da api: pool update: refactor/code-clean-up guest handling
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-08 13:36:38 +02:00
Thomas Lamprecht
a06d2fac44 api: pool update: improve description and document defaults
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-08 13:36:38 +02:00