in my commit 685b7aa4c5
i introduced a bug with that an item gets selected
in the tree when you right click on it
also fix the function parameters
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
we had the function for the cmdmenu at two
different places (resourcetree and resourcegrid)
move it to PVE.Utils to reuse code, and
also use it in pool members list
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
we only checked for grouping attributes for moved vms,
but this is only true in server view
e.g. in pool view the grouping attributes is pool
and the item is not reselected, resulting in a "file not found"
error (it looks for the conf on the wrong node)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
before ECMA5 trailing commas in arrays and objects
are forbidden
in jslint this is an error and cannot be deactivated
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
fix various type confusion, for example:
items: {} and items: []
style: string and style: {}
also fix object['property'] access with
object.property
also fix /=/ with either '=' or /\=/ where appropriate
(/=/ can be confused with /= according to jslint)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
ext4 would not select a tree item on right click,
ext6 does this, so we have to save which
mousebutton was clicked and react accordingly
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
we set new icons for the tree and grid
changes:
* new icons
* wider type column (bigger icons)
* use arrows true (uses arrows instead of +/- and gets rid of the
ugly lines in the tree)
* datacenter has icon instead of folder open/close
* "folder view" gets type icons for folders
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
since we do not support lxc templates on the gui yet,
prepare the correct contextmenu call, but comment it out
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
original bug:
migrated items where not appearing under the target server
implentation:
remove items whose 'node' property has changed
as these items need to be removed before being re-added
also rename the local variable 'changed' to 'moved' to
better differentiate between what is updated in place, and
what needs to be redisplayed
if the selected node has its status changed between stop &
running, the node was removed and then readded
during the remove / add process the 'selected' status of the node
was lost if it has one
instead of deleting / readding the node, we update now its content
this was the default behaviour for server nodes, but not for leaf nodes
this fixes a graphical bug where starting/stopping a VM/container would lose
the current selection in the ressource tree
If we pass true to the removeAll() , ExtJS6 will try to erase the leafes of a tree,
and then try to to iterate throuch these leaves in onNodeRemove() ( this obviously do not work)
The true parameter does not seem to be needed anyway anymore.
After a call to removeAll, the childNodes[] property of the rootNode is empty