Helpers copied from pve-container to avoid versioned bumps.
Early returns when no containers are running, or the containers don't
use systemd, as well as returning after finding the first affected
container to minimize impact and resource usage.
Checking running containers first since following /proc/<pid>/root is
cheaper than mounting all volumes for a container
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Non-production repositories will always pull in their newer software,
so even if enterprise+subscription is OK we should mark it with
priority if, e.g., pvetest is enabled.
There was also a bug regarding the all OK state
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
the 14px over 13px is not much, but as that is the font-size intended
for font-awesome it makes it all look nicer together
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
use a flex box with centered columns instead, that needs adding a div
per row, but that's IMO actually making it more clear what a row is
anyway.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Firefox doesn't correctly break to the next line if the line-height
is set as is (with certain fonts, including the default on debian it
seems). Simply remove it, as it isn't necessary.
Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
The nvme-cli package is recommended by (our) Ceph packages, but here
--no-install-recommends is used to avoid pulling in too much.
The issue with not installing nvme-cli is that a "security
information" mail notification is triggered by sudo each time Ceph
tries to get the device health metrics. While there is a sudoers
rule for /usr/sbin/nvme, Ceph uses 'sudo nvme ...', so it does not
apply when the package is not installed.
This didn't seem to happen with sudo in buster.
It's about 1 MiB of additional packages (nvme-cli + uuid-runtime).
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
We can do so unconditionally as this is a PVE specific component and
only used for guests and nodes, both using the markdown Parser.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
As both, the whole panels body and the actual items all had their own
padding it added up quite a bit.
Some padding is good to avoid elements being "glued" to the parent
borders, but that can be done with also with ~15 px vs. 30 px on each
side, so no need to waste that much extra space we can use in some
languages to render content
Added benefit, the status panel now is more in sync with the RRD
panels regarding content start/end.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
the icon on the left side look a bit weird here, as the lines
directly above had none and the actual status which the icon tried to
emphasize is on the right anyway.
Rework also the output.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
I tried to use itemid and lookupreference for the nodeStatus item, but couldn't
get it to work, so I factored it out.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
We had done so already in PBS and PMG since a bit without seeing
anything broken due to it, which makes sense as this was enabled for
*during* the step-by-step upgrade from ExtJS 4 to 5 (and then
directly 6).
Re-enabling could help with some accessibility issues we have some
tangential reports[0].
[0]: https://github.com/nvaccess/nvda/issues/11530
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Single letter variable names really do not help understanding what's
going on, as do overly general names like fields for the split up
words we actually search+filter for.
Using a switch block as map is often also not ideal (way more syntax
noise and style hacks like break on the same line to keep it
compact), rather just use an actual object map.
Some of the improvements where not possible when this was
implemented, as then we ensured < es5 compat for IE 10 support.
With for-of and nullish-chaining a few things to get nicer to
express.
While at it also fix comment text width making them less look like
haikus and improve match calculation comment to avoid implying that
match is either 0, 1 or 2, it can be higher too (if multiple columns
match).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
in theory we'd need to be more cautios but this was added only during
beta, which is when we do not really provided any stability
guarantee, further, it's rather unlikely that one added very
important repos that, when removed, break something (again *during*
beta).
The new APT repo management makes it also easy to see when one does
not gets any PVE updates, and one can add the pvetest repo there
again easily too.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makes no sense, as the URL is the same so the info, if any at all, is
still valid - not counting the rather rare case where in the exact
moment one disables cert checking a MITM interception goes live ;-)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
As OpenID is the old one, with several security implications/issues
present, so avoid suggesting that its used.
`OpenID Connect` revers to the "third gen" on top of oauth2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
As 200 lines is a bit much for the content view, i.e., basically
growing it by 50% in size for a very specific feature is not ideal.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
uses the common function PVE::Tools::download_file_from_url to
download a iso image or container template.
note: Only users with permissions `Sys.Audit` and `Sys.Modify` on
`/` are permitted to use the api endpoints due to security reasons.
(it is possible to download files from internal networks which would
be not visible/accessible from outside)
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
metadata is gained using a HEAD request.
Due to the ability of this api endpoint to request files on internal
networks (which would not be visible/accessible from outside) it is
restricted to users with permissions `Sys.Audit` and `Sys.Modify` on
`/`. Users with these permissions are able to alter node (network)
config anyway, so this should not create any further security risk.
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
while we cannot allow editing it after realm creation it is still
interesting to know to which value it was set.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
in the user menu
we have to make an additional api call here, since it is the only
place (currently) where we can get the realm type
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ Thomas: adapt to move of parse_userid to widget-toolkit ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>