Commit Graph

2795 Commits

Author SHA1 Message Date
Fiona Ebner
a2b8ac2e21 ui: backup restore: validate name
Use the same validation as the guest creation wizards do to catch
errors early, before sending the API request.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-04-24 12:09:52 +02:00
Fiona Ebner
54fbdcd1c0 ui: clone: validate name
As reported in the community forum[0], as opposed to VM/LXC creation,
there is no validation for the name in the clone dialog. Use the same
validation as the guest creation wizards do to catch errors early,
before sending the API request.

[0]: https://forum.proxmox.com/threads/125883/#post-549304

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-04-24 12:09:52 +02:00
Daniel Koć
0d1108b26c ui: enable gettext localisation for more user exposed strings
Link: https://lists.proxmox.com/pipermail/pve-devel/2023-April/056588.html
Signed-off-by: Daniel Koć<daniel@xn--ko-wla.pl>
 [ T: rework subject & add S-o-b supplied by reply ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-04-24 11:52:23 +02:00
Aaron Lauterer
c2175df21f ui: utils: monitor_ceph_installed: avoid setting nodename to localhost
If a user is accessing the Ceph panel via Datacenter -> Ceph, then the
install & config wizard might be shown. The nodename that is passed to
the wizard  will decide the ID of the initial MON and MGR services.

Therefore, don't fall back to 'localhost' but the actual name of the
node to which we are connected to. The result will be that the first MON
and MGR will have the expected ID instead of 'localhost'.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2023-04-22 09:50:42 +02:00
Dominik Csapak
25f7446c90 fix #4627: ui: backup edit: don't deselect all guests on load
'selectPoolMembers' will be called when the poolid field changes.
(That can even happen when the mode is not even 'pool') Due to how
the fields are set, there is a race condition that this will be
called after the remaining fields were set up, including the VM list
that might have entries selected.

Since the first thing we do here is to deselect all, this wiped the
virtual guest selection sometimes.

To fix it, check if we're actually in the correct mode before doing
anything.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-04-12 13:27:57 +02:00
Dominik Csapak
19f703e2d1 ui: ceph: unmask container after we finished the ceph install
otherwise the container stays masked and we cannot interact with it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-03-22 15:29:44 +01:00
Thomas Lamprecht
87b7e5f352 ui: ceph osd: fix call to reload in wrong this context
If we just pass the me.reload as function reference it won't be
executed with `this` being the view controller, so call it directly
on that instead.

Reported-by: Stefan Hanreich <s.hanreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-22 15:08:09 +01:00
Thomas Lamprecht
fce3b1be4d ui: rename "Theme" selector to "Color Theme"
Having "Color" added makes it easier to translate (i.e. Farbschema,
配色) and at least as understandable as Theme, so change it,

Suggested-by: Markus Frank <m.frank@proxmox.com>
 [ T: while Markus suggested Color Scheme, the hive-mind opted for
 this ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-21 16:36:07 +01:00
Dominik Csapak
2d9be15856 ui: lvm-thin: fix not being able to edit the storage
The change handler of the edit config from a displayEditField still
triggers, even if hidden and disabled. This then enables another
editConfig part of a displayEditField, which triggers an error in the
API.

To fix that, simply check if this field is disabled before setting
the other fields value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-21 10:29:18 +01:00
Dominik Csapak
99654ffc34 ui: lvm-thin: don't add nodeselector/enable multiple times in edit window
Seemingly, an empty array is special for Ext JS, and if we push into
it, we overwrite the class definition of that property.

This does not happen when something is already in the array, so the
other edit windows work as expected

To fix it here, remove the empty array entirely, since we already
create an empty one when we need it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-21 10:28:08 +01:00
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
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
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
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
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
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
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
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
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
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