Again, initially copied from PVE but adapted so it can be
used by both. (PVE side still needs to be tested though.)
The 'nodename' property is optional (since on PMG we
currently don't expose them via the UI directly). Instead,
the certificate info URL is required and the 'uploadButtons'
need to be passed, which just contains the certificate
"name", id (filename), url, and whether it is deletable and
whether a GUI reload is required after changing it. If only
1 entry is passed, the button stays a regular button (that
way PVE should still look the same), whereas in PMG we have
a menu to select between API and SMTP certificates.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Thu, 11 Mar 2021 09:14:32 +0000 (10:14 +0100)]
data/*Store: drop storeid requirement
We never use that and it serves no purpose. It probably was meant to
be the upstream config 'storeId' which would add the store to the
Ext.StoreManager. This is unpractical though, since then the store
has to be explicitely destroyed, otherwise the StoreManager retains a
reference and the GC cannot remove the store.
Since donwstream users of the store can simply give the 'storeId'
property anyway if they need to be managed by the StoreManager, drop
the requirement here.
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
500 px still fit nicely in our minimum requirements of "HD ready"
(1280 x 720 px) and for any slightly longer running task the extra
pixel are really nice, I frequently find myself resizing the height
immediately after a task window opens so lets up the default a bit...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominic Jäger [Mon, 8 Feb 2021 12:41:36 +0000 (13:41 +0100)]
vlan edit: Set valid default name
Using find_next_iface_id we get a valid VLAN name.
This way, inserting a vlan raw device is still required (but everything that is
inserted so far is valid).
Dominic Jäger [Mon, 8 Feb 2021 12:41:34 +0000 (13:41 +0100)]
vlan edit: Forbid blank vlan raw device
Users certainly have to insert a vlan raw device when the textfield is enabled.
Currently, they only see `invalid network interface name "` when submitting.
Forbidding the blank field shows the problem earlier.
Dominic Jäger [Mon, 8 Feb 2021 12:41:33 +0000 (13:41 +0100)]
vlan edit: Fix automatic field disabling
The regex are are created as literals (with // and not new RegExp).
Therefore
- The old Vlan_match value with double \\ has matched e.g. vlan\ddd instead
of e.g. vlan123 and
- the old VlanInterface_match value with double \\ has matched e.g.
\www\X\dddd instead of e.g. vmbr0.1234
This fixes automatically disabling the fields vlan-raw-device and vlan-id (VLAN
tag) in the VLAN edit window.
Fabian Ebner [Mon, 8 Feb 2021 14:23:27 +0000 (15:23 +0100)]
convert disk list to disk tree and conditionally include partitions
Assigning the store directly to the treepanel doesn't work, more manual
handling is needed. This is mostly based on what we do for PBS's datastore
content view. The store monitoring also needs to be changed slightly.
The buttons are restricted to work on disks only, based on the parent
attribute, that only partitions have.
Dominic Jäger [Fri, 27 Nov 2020 11:08:12 +0000 (12:08 +0100)]
input panel: Add drawing of layout
The drawing makes clear in a few seconds:
- what columnT and columnB stand for
- what additional containers and panels are created
- to which of those the elements of column1, column2... go to
When you're in the JS debugger and lost overview of where in this
element hierarchy you are, you can quickly check xtype + layout. Then
consulting this drawing solves the mistery.
Dominik Csapak [Thu, 26 Nov 2020 08:23:39 +0000 (09:23 +0100)]
fix usage of findRecord
findRecord does not match exactly, but only at the beginning and
case insensitive, by default. Change all calls to be case sensiti
and an exactmatch (we never want the default behaviour afaics).
Thomas Lamprecht [Fri, 15 Jan 2021 15:18:04 +0000 (16:18 +0100)]
reader: JsonObject: cope with empty (null) return value
there may be cases where the backend serialization plumping code
makes it easier to return null instead of a emtpy object if a
(sub)property or whole config is not configured, as it's closer to
the truth (not configured == null, configured but empty would be {})
For objects this resulted in a exception, as the null value was tried
to be dereferenced, avoid that by defaulting to an empty object in
that case.
For arrays we already coped with that by luck, make that more
explicit to avoid future breakage.
Both result to a empty array being returned as values, which means
empty store and is deemed to be OK in that case.
The rowdef.required still applies and adds empty values though, this
could be argued to not be really fitting - for now lets keep it that
way, we could make this opt-in though if it shows that it is not
always correct.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sat, 21 Nov 2020 16:15:13 +0000 (17:15 +0100)]
input panel: make advanced column check more flexible
allow that any of the three column/docked definitions can be set,
without setting the first one to an empty array to go in that if
branch.
Note, column2 works fine, but I did not greatly test a sole
advancedColumnB definition, so there may be still some improvements
for fixes - but at that point the user could also use advancedItems
to have full control.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Aaron Lauterer [Tue, 17 Nov 2020 13:50:42 +0000 (14:50 +0100)]
InputPanel: fix column scaling behavior
When scaling the browsers content either via the browser itself or
because the OS has a different scaling / DPI setting, it can happen that
not all columns have enough space next to each other and thus the last
column is moved further below.
This happens especially on chromium bases browsers (e.g. chrome, edge).
Changing the layout to use extjs HBOXes with flex instead of columns
solves works well.
we have everything updated to ExtJS 6.x since quite a bit, and some
quick checks on various components did not show any error - lets
enable this again.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sat, 31 Oct 2020 08:52:10 +0000 (09:52 +0100)]
css: improve icon rendering
Font Awesome is intended to be used at 14px font-size, we set that
already over product specific CSS for some elements like buttons.
But, for tab panel icons and tree navigation views it was often
overruled by ExtJS to 13px which made look them quite blurry and even
the position was a bit off (to high when compared to the texts
baseline.
Fix that by overwriting the font-size to 14px of the
x-treelist-item-icon and x-tab-icon-el-default class, for the latter
improve the icon to text possition by setting a slight top margin.
Setting the color to black was already done by each product, so move
that over here.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
when using the mode 'MULTI' for the checkbox selection model,
clicking a row would deselect all others, only clicking exactly on the
checkbox would select multiple rows
this override makes the whole cell of the checkbox behave like the
checkbox. This minimizes misclicks from the user.
when browser zoom is activated, our scrollposition can be a little bit off
increase the boundary by a few pixels (5px are ~1/3 of a line)
so that the auto-scrolling still works
node/Tasks: improve scroller behaviour on datastore loading
when we have a fixed totalcount, the scrollbar behaves nicely,
but sometimes we do not have a fixed total, so the api will return
'+1' if there are more elments to load
when doing this, the scrollbar has a weird behaviour where it changes
size frequently the more one scrolls down.
instead, tell the grid to update its layout as soon as the store
prefetches the data, which triggers an update of the scrollbar
this still lets it jump around a little, but only once per load and
more consistent