]> git.proxmox.com Git - pve-manager.git/blame - www/manager/openvz/Summary.js
disable animation of charts on load
[pve-manager.git] / www / manager / openvz / Summary.js
CommitLineData
ce8395e5
DM
1Ext.define('PVE.openvz.Summary', {
2 extend: 'Ext.panel.Panel',
3 alias: 'widget.pveOpenVZSummary',
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 vmid = me.pveSelNode.data.vmid;
14 if (!vmid) {
15 throw "no VM ID specified";
16 }
17
18 if (!me.workspace) {
19 throw "no workspace specified";
20 }
21
3732a665
DM
22 if (!me.statusStore) {
23 throw "no status storage specified";
24 }
25
26 var rstore = me.statusStore;
27
ce8395e5 28 var statusview = Ext.create('PVE.openvz.StatusView', {
0070ee37 29 title: gettext('Status'),
ce8395e5 30 pveSelNode: me.pveSelNode,
3732a665
DM
31 width: 400,
32 rstore: rstore
ce8395e5
DM
33 });
34
ce8395e5
DM
35 var rrdurl = "/api2/png/nodes/" + nodename + "/openvz/" + vmid + "/rrd";
36
ea55d5c6 37 var notesview = Ext.create('PVE.panel.NotesView', {
ce8395e5
DM
38 pveSelNode: me.pveSelNode,
39 flex: 1
40 });
41
42 Ext.apply(me, {
3732a665
DM
43 tbar: [
44 '->',
45 {
46 xtype: 'pveRRDTypeSelector'
47 }
48 ],
ce8395e5
DM
49 autoScroll: true,
50 bodyStyle: 'padding:10px',
51 defaults: {
52 style: 'padding-top:10px',
53 width: 800
54 },
55 items: [
56 {
57 style: 'padding-top:0px',
58 layout: {
59 type: 'hbox',
60 align: 'stretchmax'
61 },
62 border: false,
63 items: [ statusview, notesview ]
64 },
65 {
66 xtype: 'pveRRDView',
4af2c66c 67 title: gettext('CPU usage'),
ce8395e5
DM
68 pveSelNode: me.pveSelNode,
69 datasource: 'cpu',
70 rrdurl: rrdurl
71 },
72 {
73 xtype: 'pveRRDView',
0070ee37 74 title: gettext('Memory usage'),
ce8395e5
DM
75 pveSelNode: me.pveSelNode,
76 datasource: 'mem,maxmem',
77 rrdurl: rrdurl
78 },
3055d5f6
DM
79 {
80 xtype: 'pveRRDView',
0070ee37 81 title: gettext('Network traffic'),
3055d5f6
DM
82 pveSelNode: me.pveSelNode,
83 datasource: 'netin,netout',
84 rrdurl: rrdurl
85 },
86 {
87 xtype: 'pveRRDView',
0070ee37 88 title: gettext('Disk IO'),
3055d5f6
DM
89 pveSelNode: me.pveSelNode,
90 datasource: 'diskread,diskwrite',
91 rrdurl: rrdurl
92 }
ce8395e5
DM
93 ]
94 });
95
96 me.on('show', function() {
ce8395e5
DM
97 notesview.load();
98 });
99
ce8395e5
DM
100 me.callParent();
101 }
102});