Commit Graph

25 Commits

Author SHA1 Message Date
Dominik Csapak
a19652db78 show storage usage in tree
this adds a little usage indicator in the tree for all storage definitions,
so that one can easily see how much of a storage is used

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2017-12-13 14:51:07 +01:00
Dominik Csapak
0c686caccd whitespace cleanup
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
4dbc64a786 improve tree/grid icons
we improve the icons in the tree and the resource grid by
differentiating between cluster online/offline status and no rrd data

when we have no rrd data from a node/storage, instead of showing a
red x (which is scary) even if the node is reachable by corosync (which
confused quite a bit of people, because we show all nodes as online in
the datacenter summary), we show the node/storage with a '?'

this signals that something is wrong with this node, even if we can
reach it via cluster methods

this rewrite of the logic includes a refactoring of the method
of getting the icon, because we want the same icons in the tree and the
grid, and an optimization on how we use the css classes
(introducing a x-grid-custom-icon class)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Dominik Csapak
d5a7996b13 fix reselection on vm/ct migrate in gui
there were a number of problems in how we reselected vms when they
migrated and selected:

we relied on the data in the configpanel to be static, but since
pveselnode is a reference, it actually changes when the resourcestore
changes
also, handling the reselection as a response to the statusstore failure
is very inconsistent, because we know exactly when a vm moves node in
the tree

this patch removes the whole configpanel vm migration code,
and lets the tree handle it
for this, we have to check if we have to reselect the entry,
deselect it manually and after the treeupdate reselect it

also in the right click selection check we have to check if it is
already selected, else the next selection will get canceled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-23 13:01:12 +02:00
Dominik Csapak
0f3e4bc242 fix regression in gui when migrating guests
with using suspend/resumeEvents the reselection of vms when migrating,
was not working correctly, fixing this by resuming before selecting

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-22 12:24:43 +02:00
Dominik Csapak
397dfdd3c4 add suspend/resume events to updateTree
this makes adding/modifying a large number of items a lot faster

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-04 07:00:16 +02:00
Dietmar Maurer
cfffc2719c ResourceTree.js: return value in selectById
So that automation tools can see success.
2016-11-11 15:52:52 +01:00
Dominik Csapak
2b2fe160f5 show ha error state in tree and resource grid
with this patch, vms in an ha error state get an icon (reusing the node
offline icon) to indicate the error

in the resource grid, we also add the icon, and have an additional
column where we can display the ha state

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-28 09:35:05 +02:00
Dominik Csapak
e31294433f open vm console on doubleclick in tree
with this patch you can open the console of a guest
with a simple doubleclick in the tree

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-07-21 13:10:49 +02:00
Dominik Csapak
9f95072366 set focus on tree after selecting a node
this is useful when using the new search field,
or when double clicking in the search tab,
since it focuses the item in the tree and lets
the treepanel scroll to the item

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-29 14:32:36 +02:00
Dominik Csapak
cc1a91be71 fix right click selection in tree
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>
2016-05-31 12:23:06 +02:00
Dominik Csapak
685b7aa4c5 move cmdmenu function and use it in poolmemberlist
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>
2016-05-20 07:30:21 +02:00
Dominik Csapak
6ae31fc19b fix #979: check always for migrated vm
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>
2016-05-06 09:28:15 +02:00
Dominik Csapak
fd9ce61b8b fix lint errors
jslint does not like trailing commas and assignments
of the form "x = !(expression)"

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-03 06:07:19 +02:00
Dominik Csapak
22f2f9d6c0 jslint: remove trailing commas
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>
2016-04-29 17:06:34 +02:00
Dominik Csapak
ec0bd652db jslint: fix type confusion and property access
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>
2016-04-29 17:06:23 +02:00
Dominik Csapak
91994a49bd disable selecting when right clicking in tree
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>
2016-04-29 09:14:09 +02:00
Dominik Csapak
f05de373c7 mark item as changed when status is different
to detect changes from running->paused and reverse,
since this is now reflected by the icons

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-11 13:03:44 +02:00
Dominik Csapak
b1d8e73d15 add new icons to grid and tree
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>
2016-04-11 11:49:59 +02:00
Dominik Csapak
b9722f5292 prevent contextmenu on lxc templates
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>
2016-04-05 15:34:40 +02:00
Dietmar Maurer
185a77e555 reduce translation overhead 2016-04-05 11:10:52 +02:00
Emmanuel Kasper
fe64be90d2 fix tree update when migrating a VM/CT
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
2016-03-30 09:22:38 +02:00
Emmanuel Kasper
d0e96c0d50 update leaf nodes instead of removing / readding them
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
2016-03-14 17:02:46 +01:00
Emmanuel Kasper
08801a5d01 ext6migrate: fix a long running bug where a logout from the GUI would break the workspace
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
2016-01-26 10:54:32 +01:00
Dietmar Maurer
bac5bd135c rename manager5 to manager6 2016-01-22 11:24:10 +01:00