[pve-devel] [PATCH manager 10/49] add rrd models
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Jan 23 11:05:27 CET 2018
From: Dominik Csapak <d.csapak at proxmox.com>
they will be used with the rrdstore
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
www/manager6/Makefile | 1 +
www/manager6/data/model/RRDModels.js | 62 ++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
create mode 100644 www/manager6/data/model/RRDModels.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index c87b6fdc..13ab2e88 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -26,6 +26,7 @@ JSSRC= \
data/ObjectStore.js \
data/ResourceStore.js \
data/RRDStore.js \
+ data/model/RRDModels.js \
form/VLanField.js \
form/Checkbox.js \
form/RRDTypeSelector.js \
diff --git a/www/manager6/data/model/RRDModels.js b/www/manager6/data/model/RRDModels.js
new file mode 100644
index 00000000..0c8a12bd
--- /dev/null
+++ b/www/manager6/data/model/RRDModels.js
@@ -0,0 +1,62 @@
+Ext.define('pve-rrd-node', {
+ extend: 'Ext.data.Model',
+ fields: [
+ {
+ name:'cpu',
+ // percentage
+ convert: function(value) {
+ return value*100;
+ }
+ },
+ {
+ name:'iowait',
+ // percentage
+ convert: function(value) {
+ return value*100;
+ }
+ },
+ 'loadavg',
+ 'maxcpu',
+ 'memtotal',
+ 'memused',
+ 'netin',
+ 'netout',
+ 'roottotal',
+ 'rootused',
+ 'swaptotal',
+ 'swapused',
+ { type: 'date', dateFormat: 'timestamp', name: 'time' }
+ ]
+});
+
+Ext.define('pve-rrd-guest', {
+ extend: 'Ext.data.Model',
+ fields: [
+ {
+ name:'cpu',
+ // percentage
+ convert: function(value) {
+ return value*100;
+ }
+ },
+ 'maxcpu',
+ 'netin',
+ 'netout',
+ 'mem',
+ 'maxmem',
+ 'disk',
+ 'maxdisk',
+ 'diskread',
+ 'diskwrite',
+ { type: 'date', dateFormat: 'timestamp', name: 'time' }
+ ]
+});
+
+Ext.define('pve-rrd-storage', {
+ extend: 'Ext.data.Model',
+ fields: [
+ 'used',
+ 'total',
+ { type: 'date', dateFormat: 'timestamp', name: 'time' }
+ ]
+});
--
2.14.2
More information about the pve-devel
mailing list