they live there now, so we can delete them here and use the ones from
widget-toolkit instead
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This add new fields with cpu/mem percent usage of vms,
relative to host maxcpu/maxmem.
Currently, we can't sort easily most consumming vm on a host.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Split PVE specific models, which where not moved to the general
widget toolkit, in a separate folder: data/models/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
some function are now in Proxmox.Utils instead, so we have to use that
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
instead of doing a lot of string comparisons, we first check
the type with the most objects (vms/cts) via number operation
and in all other cases, we can simply use the type as property index
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
instead of doing weird if/elsif checks with nonsensical logic
we simply check the 3 properties we want (namely convert,calculate and
defaultValue) and add them to our field definition.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This allows also to filter after HA states, so one may bulk control
HA managed services more easily or do bulk actions just on unmanaged
VMs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
If we explicitly set a fields defaultValue we really want it in the
Model.
Also needed for a further patch
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>
Add the getNodes function to the periodically asynchronous updated
PVEResource store. This allows a component to get the node data
directly, without making an API call and waiting that it's finished,
the data is also up to date.
A usage example would be:
var data = PVE.data.ResourceStore.getNodes();
var store = Ext.create('Ext.data.Store', {
fields: [ 'node', 'mem', 'cpu', ... ], // or a model
data: data,
proxy: {
type: 'memory',
reader: {type: 'json'}
},
...
});
I'll use it in a later patch to avoid two asynchrony store loads
where I'd have logic in place for the case that either one finishes
first, this function helps me to avoid such logic while achieving
the same functionallity.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-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>
previously, we had a disk/memory usage column in the resource grid,
whose raw data were the bytes used, but we added a renderer
to display it as percentage
with this, the columns sorted by bytes and not by percentage,
which made the column rather confusing
with this patch, we add a real percentage column (where the
data is a float from 0 to 1) so it sorts correctly
also make the old columns show the used size in B/KiB/etc.
by default we still only show the percentage column
since the disk usage part was always zero with qemu guests,
leave it empty there
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>