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>
In clusters a storage was pushed as many times as there are nodes
using it. Ensure we only push a path once, do this with a memory
oriented solution, i.e., build a extra object to remember what we
already pushed. This is preferred over a me.findExact call as it's a
o(n) vs o(n^2) solution compute wise and we make the user wait if
this would need long, so reducing compute time over memory use is
here a good choice - even if we will seldom run into situations where
this actually will make a difference with such small data counts.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.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>
The alias stayed the same (store.diff) so we need to change direct
usage of 'PVE.data.DiffStore' only.
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>
we want to use the getId method of some records, but for this
we need that the records are defined as an instance of a model,
so we create some and use them
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
same xtype/alias, so there is nothing to do except remove it from
pve-manager
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
the store never fires/gets a destroy event, thus it
never stops the load_task and never unqueues itself in case
the store gets destroyed but not explicitely stopped
with overriding the destroy method, this works now as intended
Signed-off-by: Dominik Csapak <d.csapak@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>
extjs cannot "convert" and id from other fields, so the ids in the
diffstore and the realstore are different and we re-add every element on
every update
to mitigate this, we generate the id (which is "uid:hostname") in the
backend, and simply use it in the frontend
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
if the rstore in the diffstore is already loaded at the time of
the instantiation, load the data instantly
Signed-off-by: Dominik Csapak <d.csapak@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>
when a load of an update store was ongoing and stopUpdate
was called, the task could not be canceled, and the store
would remain indefinitely
this patch sets 'isStopped' of the store on stopUpdate
and checks it on the next update and stopping it then
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
since extjs5 Store.snapshot does not exist anymore,
we didnt remove filtered records
this lead to the fact, that the 'message' record did
not get removed and a "no subscription file" message
was shown directly after uploading a key
to get also the filtered records in the store
we use store.getData().getSource()
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>
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>
this patch adds two classes for the charts:
RRDStore:
based on our updatestore, but specialized on our rrddata output
it converts the percentage (cpu) and the time (from unix to milliseconds)
also it handles the changes for the timeframe and cf
it sets a default reload of 30seconds
RRDChart:
based on Ext.chart.CartesianChart,
with specialized options for our rrd graphs
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>