]>
git.proxmox.com Git - proxmox-backup.git/blob - www/DataStoreStatistic.js
1 Ext
.define('pve-rrd-datastore', {
2 extend
: 'Ext.data.Model',
13 name
: 'read_delay', calculate: function(data
) {
14 if (data
.read_ios
=== undefined || data
.read_ios
=== 0 || data
.read_ticks
== undefined) {
17 return (data
.read_ticks
*1000)/data
.read_ios
;
21 name
: 'write_delay', calculate: function(data
) {
22 if (data
.write_ios
=== undefined || data
.write_ios
=== 0 || data
.write_ticks
== undefined) {
25 return (data
.write_ticks
*1000)/data
.write_ios
;
28 { type
: 'date', dateFormat
: 'timestamp', name
: 'time' }
32 Ext
.define('PBS.DataStoreStatistic', {
33 extend
: 'Ext.panel.Panel',
34 alias
: 'widget.pbsDataStoreStatistic',
36 title
: gettext('Statistics'),
40 initComponent: function() {
44 throw "no datastore specified";
47 me
.tbar
= [ '->', { xtype
: 'proxmoxRRDTypeSelector' } ];
49 var rrdstore
= Ext
.create('Proxmox.data.RRDStore', {
50 rrdurl
: "/api2/json/admin/datastore/" + me
.datastore
+ "/rrd",
51 model
: 'pve-rrd-datastore'
56 itemId
: 'itemcontainer',
66 xtype
: 'proxmoxRRDChart',
67 title
: gettext('Storage usage (bytes)'),
68 fields
: ['total','used'],
69 fieldTitles
: [gettext('Total'), gettext('Storage usage')],
73 xtype
: 'proxmoxRRDChart',
74 title
: gettext('Transfer Rate (bytes/second)'),
75 fields
: ['read_bytes','write_bytes'],
76 fieldTitles
: [gettext('Read'), gettext('Write')],
80 xtype
: 'proxmoxRRDChart',
81 title
: gettext('Input/Output Operations per Second (IOPS)'),
82 fields
: ['read_ios','write_ios'],
83 fieldTitles
: [gettext('Read'), gettext('Write')],
87 xtype
: 'proxmoxRRDChart',
88 title
: gettext('Delay (ms)'),
89 fields
: ['read_delay','write_delay'],
90 fieldTitles
: [gettext('Read'), gettext('Write')],
97 activate: function() {
98 rrdstore
.startUpdate();
100 destroy: function() {
101 rrdstore
.stopUpdate();