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).
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
We usually choose default values that are valid input for the field.
interfaceX.1 is rejected by the API.
Instead, use a tooltip to demonstrate possible valid inputs for the field.
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
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.
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
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.
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
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.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
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.
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
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).
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
previously we printed this ceph info, but it got lost during
refactoring to widget-toolkit, restore a slightly modified
version of the code
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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>
The corresponding option in /etc/network/interfaces is exactly "bond-primary".
Translating this might easily make unclear what is meant.
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
mirrors columnB (column bottom) but is placed on the top, i.e.,
columnT.
One can no conveniently set the following layout:
+-------------------------------------+
| |
| columnT |
| |
+------------------+------------------+
| | |
| | |
| column1 | column2 |
| | |
| | |
+------------------+------------------+
| |
| columnB |
| |
+-------------------------------------+
(4 columns should work too, but we do not use that anywhere FWICT)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>
`useFieldContainer` doesn't seem to be used anymore in any of our
products:
* PVE
* PMG
* PBS
it therefore can be considered dead code.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
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.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
if there occured an error in the api call of the store, show this error
on the picker when opened, instead of just showing an empty picker
this makes it possible to see that there was an error while accessing the api
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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>
we use 'override_task_descriptions' in the specific products to
add the ones that are not used everywhere
took the chance and sorted the remaining alphabetically
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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>
copied from pve-manager, but handling both '1' and 'true' as propagate
values, and making the authentication ID name/parameter configurable.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
For passing some default params which are passed along automatically
when calling load and doing the submit.
Useful in PBS, as there we often have the snapshot ID in multiple
parameters, not included in the request path, required for various
API call.
The params take low precendence, and are overwritten by values in
form fields with the same name for submit, or explicit params passed
to load calls
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
with a setData function that calls our updateValue, we can now use
viewModel bind to update those widgets
Signed-off-by: Dominik Csapak <d.csapak@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.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
we only ever want to match the whole hostname/ip, never just some part of it
and we do not want to have the ':' as part of the port
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
fixes 4 issues:
* use correct /api2/ext url to get the 'success' parameter
* check 'used' property for 'unused' (pbs vs pve)
* use 'name' instead of 'devpath' for id
(name always contains the correct id for the product,
e.g. /dev/sdd for pve and sdd for pbs)
* add a reload in taskDone to reload the list of disks when the inti is done
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Restricting the defaultFocus of the edit windows to only focusable fields
ensures that windows like "PVE -> Virtual Machine -> Manage HA", which
has a first field of xtype "displayfield", receive focus upon opening.
This allows those windows to be closed with the ESC key, which only
works when an element inside has focus.
In newer versions of ExtJS (>= 6.2.0) this filter could be reduced to
"field:canfocus" or maybe even ":canfocus".
inspired by pve's detail window, which used two sub components
(ZFSStatus, ZFSDevices; which were never used elsewhere)
combined into one self-contained window
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
from pve's ZFSCreate window, refactored to be self-contained using
field mixin, as well as be configureable enough to be used by pve as
well as other products
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
But only when the caller gives us the endtime, since the status API
call does not give us the endtime.
As we stop updating the store once a task isn't running anymore the
fallback to current unix utc timestamp doesn't needs an additional
check, the last one is shown static then.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ Thomas: improve commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
for use with other produts.
the models are now all prefixed with 'pmx' instead of pve, so they
should not conflict
includes some changes to the model for remapping some fields and
some small refactors (change to controller for the DiskList,
some cleanup of the initComponent of the DiskSmart window)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
to be usable with other products.
also add a parameter 'typeProperty' to be able to configure
the backend property for the usage type
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
tasks can now show also 'WARNINGS: <count>'
filter it out and provide a 'parse_task_status' function for easy reuse
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>