Commit Graph

2758 Commits

Author SHA1 Message Date
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
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
Thomas Lamprecht
e3eb302c8b 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>
2023-02-22 11:32:37 +01:00
Dominik Csapak
8e9267f309 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>
2023-02-22 09:12:36 +01:00
Dominik Csapak
3a2a696443 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>
2023-02-22 09:12:36 +01:00
Dominik Csapak
13d465c146 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>
2023-02-22 09:12:36 +01:00
Dominik Csapak
731436ee86 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>
2023-02-22 09:12:36 +01:00
Dominik Csapak
f5dd10dc3e 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>
2023-02-22 09:12:36 +01:00
Dominik Csapak
b497c4c731 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>
2023-02-22 09:12:36 +01:00
Dominik Csapak
4a80840ba9 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>
2023-02-15 15:04:16 +01:00
Aaron Lauterer
8a0201aae0 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>
2023-02-15 15:01:04 +01:00
Aaron Lauterer
c4368cf6d6 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>
2023-02-15 10:16:50 +01:00
Lukas Wagner
93c425e109 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>
2023-02-15 10:12:51 +01:00
Thomas Lamprecht
7b668b16bb 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>
2023-01-31 17:59:58 +01:00
Thomas Lamprecht
ab4ea492b6 ui: form store node selector: improve variable name clarity slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-31 17:58:01 +01:00
Dominik Csapak
7528c2572e 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>
2023-01-31 10:38:11 +01:00
Thomas Lamprecht
a2ff227eb5 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>
2023-01-30 11:01:52 +01:00
Thomas Lamprecht
2b7327234b 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>
2023-01-28 12:39:40 +01:00
Thomas Lamprecht
f6717dfce9 ui: metrics: avoid repeated querys of the view
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-28 12:39:36 +01:00
Daniel Tschlatscher
6e3c144219 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>
2023-01-25 12:58:54 +01:00
Fiona Ebner
b7b7b661f6 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>
2023-01-24 16:15:44 +01:00
Lukas Wagner
ab78e7e2d0 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>
2023-01-24 16:13:43 +01:00
Thomas Lamprecht
04389e49d6 ui: factor out not found rendering to common helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-21 14:32:53 +01:00
Thomas Lamprecht
8686ba103f 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>
2023-01-20 10:46:57 +01:00
Thomas Lamprecht
d3eacb83f8 ui: schedule sim: clear previous simulation output on error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-20 10:46:00 +01:00
Thomas Lamprecht
7518576735 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>
2023-01-20 10:44:41 +01:00
Lukas Wagner
b52d2b12db 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>
2023-01-20 09:55:01 +01:00
Thomas Lamprecht
a99c8196b5 ui: schedule sim: code style cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-20 09:53:33 +01:00
Christoph Heiss
73e1cfa94c 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>
2023-01-19 18:20:34 +01:00
Dominik Csapak
92df2742f5 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>
2023-01-19 18:08:19 +01:00
Dominik Csapak
cc911f63aa 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>
2023-01-19 18:07:26 +01:00
Thomas Lamprecht
38e79438f7 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>
2023-01-19 17:33:24 +01:00
Thomas Lamprecht
315feceaa8 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>
2023-01-19 17:30:30 +01:00
Thomas Lamprecht
9a1678c5c5 ui: backup info: use collapsible field set to render retention config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 16:41:52 +01:00
Thomas Lamprecht
a4240b80e8 ui: backup info: make initial height dependent of body view-height
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 16:41:21 +01:00
Thomas Lamprecht
64f3f34623 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>
2023-01-19 16:23:53 +01:00
Thomas Lamprecht
e040ee2827 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>
2023-01-19 16:18:39 +01:00
Thomas Lamprecht
3d5b3eb6b6 ui: backup info: avoid clunky switch for simple mapping
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-19 16:16:49 +01:00
Dominik Csapak
4c1fe169b4 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>
2023-01-18 16:21:49 +01:00
Dominik Csapak
713742ec70 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>
2023-01-18 16:01:08 +01:00
Dominik Csapak
d88be4349b ui: storage: ZFS panel: modernize & cleanup code
using cbind + pmxDisplayEditField, getting rid of initComponent

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-18 16:01:08 +01:00
Dominik Csapak
df60e210d7 ui: storage: iSCSI panel: modernize, cleanup & improve UX
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>
2023-01-18 16:01:08 +01:00
Dominik Csapak
fa84bd595f ui: storage: LVM-Thin panel: modernize & cleanup code
using cbind + pmxDisplayEditField, getting rid of the initComponent

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-18 16:01:08 +01:00