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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
by converting the relevant selection boxes to combogrids.
This is done to reduce confusion for how/why to select a node, and
doing it this way it is moved closer to the selection of the actual
value we want. It still restricts the nodes when selecting a specific one.
Show it only when there is more than one node according to the
in-memory PVE.data.ResourceStore info, as for single-node setups
there isn't any other node one could scan anyway.
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>
otherwise it can happen that there as additional change event from
null to '', even though the value did not change
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This adds a dropdown box for iSCSI, LVM, LVMThin & ZFS storage options where a
cluster node needs to be chosen. As default the current node is
selected. It restricts the the storage to be only availabe on the
selected node.
Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
* dont allow blank for tree shape
* allow completely removing registered tags and user-tag-access properties
* correctly check validity for the listfield
* use correct gettexts
* don't inject empty field in the listfield when setting an empty string
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
by sorting the lower cased variants, and only if they are identical
sort the original values with 'localeCompare'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
things that changed:
* removed 'add Tag' inline button with proper button that adds
empty tag
* don't require to confirm each tag, simply update the color "live"
* set a minimum width for the editing box, so that it's easier to click
* replace cancel/finish icons with proper buttons
* fix tagCharRegex for multichar text (necessary for paste)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
datacenter.cfg returns an 'ordering' option. parse that and
use it to order the tags when viewing. default is alphabetical.
With alphabetical ordering, drag & drop when editing is disabled and the
tags will be inserted at the right place. When saving, the sorted
order will be written into the config
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
also allows to search for tags in the GlobalSearchField where each tag is
treated like a seperate field, so it weighs more if the user searches for
the exact string of a single tag
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
ui: ResourceGrid: render tags
with the 'full' styling
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This is a wrapper container for holding a list of (editable) tags
intended to be used in the lxc/qemu status toolbar
To add a new tag, we reuse the 'pveTag' class, but overwrite some of
its behaviour and css classes so that it properly adds tags
Also handles the drag/drop feature for the tags in the list
When done with editing (by clicking the checkmark), sends a 'change'
event with the new tags
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
displays a single tag, with the ability to edit inline on click (when
the mode is set to editable). This brings up a list of globally available tags
for simple selection.
this is a basic ext component, with 'i' tags for the icons (handle and
add/remove button) and a span (for the tag text)
shows the tag by default, and if put in editable mode, makes the
span editable. when actually starting the edit, shows a picker
with available tags to select from
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This provides a basic grid to edit a list of tag color overrides.
We'll use this for editing the datacenter.cfg overrides and the
browser storage overrides.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
previously the ui would allow adding all pools (even the default
ceph-mon pools) as storage. this could lead to issues when users did
use these pools as storage (e.g.: vms missing their disks after a
migration). hence, restrict the pool selector to rbd pools.
fails gracefully by reverting to the previous behavior if a pool has
no application assigned to it.
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
by
* showing the (optional) name in front of the type
* making the 'availble' column a bit narrower
* enabling 'cellWrap' for the description
* making the dropdown a bit wider (so all the information can fit)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
For future or external storages where the assumption "multiple formats implies
qcow2 is supported" doesn't hold.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
The backend will pick an appropriate format when nothing is specified. The
comment made it sound like 'raw' would be sent, but that didn't actually happen
on file-based storages, and now no format is sent, so adapt the comment too.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Double negated properties make it harder than necessary to parse
conditions.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
Ext.util.Sorter does not have an 'order' property, so 'order: DESC'
didn't have an effect. The default is 'ASC' and it is arguably the
preferred direction for all affected sorters anyways.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Using 00:00 with relying on the implied default is sub optimal as its
a bit of a magic example that new users may not understand as easily.
So spell it out explicitly, even if there'd be a shorter version
possible.
We also had some request for the once-daily every day, and its a
sensible example to have in general, could help getting the
difference between an hour list and a single one.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
With this optional setting, it is possible to allow the user to also
select 'unused' as a disk bus type.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
by adding a CephFSSelector and using it in the CephFSEdit window
(similar to the poolselector/textfield)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>