]> git.proxmox.com Git - pve-manager.git/blob - www/manager/storage/Summary.js
disable animation of charts on load
[pve-manager.git] / www / manager / storage / Summary.js
1 Ext.define('PVE.storage.Summary', {
2 extend: 'Ext.panel.Panel',
3 alias: 'widget.pveStorageSummary',
4
5 initComponent: function() {
6 var me = this;
7
8 var nodename = me.pveSelNode.data.node;
9 if (!nodename) {
10 throw "no node name specified";
11 }
12
13 var storage = me.pveSelNode.data.storage;
14 if (!storage) {
15 throw "no storage ID specified";
16 }
17
18 var statusview = Ext.create('PVE.storage.StatusView', {
19 pveSelNode: me.pveSelNode,
20 style: 'padding-top:0px'
21 });
22
23 var rstore = statusview.rstore;
24
25 var rrdurl = "/api2/png/nodes/" + nodename + "/storage/" + storage + "/rrd";
26
27 Ext.apply(me, {
28 autoScroll: true,
29 bodyStyle: 'padding:10px',
30 defaults: {
31 style: 'padding-top:10px',
32 width: 800
33 },
34 tbar: [
35 '->',
36 {
37 xtype: 'pveRRDTypeSelector'
38 }
39 ],
40 items: [
41 statusview,
42 {
43 xtype: 'pveRRDView',
44 title: gettext('Usage'),
45 pveSelNode: me.pveSelNode,
46 datasource: 'total,used',
47 rrdurl: rrdurl
48 }
49 ]
50 });
51
52 me.on('show', rstore.startUpdate);
53 me.on('hide', rstore.stopUpdate);
54 me.on('destroy', rstore.stopUpdate);
55
56 me.callParent();
57 }
58 });