]> git.proxmox.com Git - pve-manager.git/blame - www/manager/qemu/Summary.js
Added translations
[pve-manager.git] / www / manager / qemu / Summary.js
CommitLineData
aff192e6
DM
1Ext.define('PVE.qemu.Summary', {
2 extend: 'Ext.panel.Panel',
3 alias: 'widget.pveQemuSummary',
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
52df9bc1
DM
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
aff192e6 28 var statusview = Ext.create('PVE.qemu.StatusView', {
0070ee37 29 title: gettext('Status'),
aff192e6 30 pveSelNode: me.pveSelNode,
3732a665
DM
31 width: 400,
32 rstore: rstore
aff192e6
DM
33 });
34
aff192e6
DM
35 var rrdurl = "/api2/png/nodes/" + nodename + "/qemu/" + vmid + "/rrd";
36
ea55d5c6 37 var notesview = Ext.create('PVE.panel.NotesView', {
aff192e6
DM
38 pveSelNode: me.pveSelNode,
39 flex: 1
40 });
41
42 Ext.apply(me, {
3732a665 43 tbar: [ '->', { xtype: 'pveRRDTypeSelector' } ],
aff192e6
DM
44 autoScroll: true,
45 bodyStyle: 'padding:10px',
46 defaults: {
47 style: 'padding-top:10px',
48 width: 800
49 },
50 items: [
51 {
52 style: 'padding-top:0px',
53 layout: {
54 type: 'hbox',
55 align: 'stretchmax'
56 },
57 border: false,
58 items: [ statusview, notesview ]
59 },
60 {
61 xtype: 'pveRRDView',
0070ee37 62 title: gettext('CPU usage %'),
aff192e6
DM
63 pveSelNode: me.pveSelNode,
64 datasource: 'cpu',
65 rrdurl: rrdurl
66 },
67 {
68 xtype: 'pveRRDView',
0070ee37 69 title: gettext('Memory usage'),
aff192e6
DM
70 pveSelNode: me.pveSelNode,
71 datasource: 'mem,maxmem',
72 rrdurl: rrdurl
73 },
74 {
75 xtype: 'pveRRDView',
0070ee37 76 title: gettext('Network traffic'),
aff192e6
DM
77 pveSelNode: me.pveSelNode,
78 datasource: 'netin,netout',
79 rrdurl: rrdurl
80 },
81 {
82 xtype: 'pveRRDView',
0070ee37 83 title: gettext('Disk IO'),
aff192e6
DM
84 pveSelNode: me.pveSelNode,
85 datasource: 'diskread,diskwrite',
86 rrdurl: rrdurl
87 }
88 ]
89 });
90
91 me.on('show', function() {
aff192e6
DM
92 notesview.load();
93 });
94
aff192e6
DM
95 me.callParent();
96 }
97});