]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/panel/TemplateStatusView.js
ui: use byte unit and power-of-two base for memory rrd graphs
[pve-manager.git] / www / manager6 / panel / TemplateStatusView.js
CommitLineData
f6710aac 1Ext.define('PVE.panel.TemplateStatusView', {
c0a14978
DC
2 extend: 'PVE.panel.StatusView',
3 alias: 'widget.pveTemplateStatusView',
4
3ff9bf5a
DC
5 layout: {
6 type: 'vbox',
f6710aac 7 align: 'stretch',
3ff9bf5a
DC
8 },
9
c0a14978
DC
10 defaults: {
11 xtype: 'pveInfoWidget',
12 printBar: false,
f6710aac 13 padding: '2 25',
c0a14978
DC
14 },
15 items: [
16 {
17 xtype: 'box',
f6710aac 18 height: 20,
c0a14978 19 },
20d76d1a
DC
20 {
21 itemId: 'hamanaged',
22 iconCls: 'fa fa-heartbeat fa-fw',
23 title: gettext('HA State'),
24 printBar: false,
25 textField: 'ha',
f6710aac 26 renderer: PVE.Utils.format_ha,
20d76d1a 27 },
c0a14978
DC
28 {
29 itemId: 'node',
3ff9bf5a 30 iconCls: 'fa fa-fw fa-building',
f6710aac 31 title: gettext('Node'),
c0a14978
DC
32 },
33 {
34 xtype: 'box',
f6710aac 35 height: 20,
c0a14978
DC
36 },
37 {
38 itemId: 'cpus',
3ff9bf5a 39 iconCls: 'fa fa-fw pve-itype-icon-processor pve-icon',
c0a14978 40 title: gettext('Processors'),
f6710aac 41 textField: 'cpus',
c0a14978
DC
42 },
43 {
44 itemId: 'memory',
3ff9bf5a 45 iconCls: 'fa fa-fw pve-itype-icon-memory pve-icon',
c0a14978
DC
46 title: gettext('Memory'),
47 textField: 'maxmem',
f6710aac 48 renderer: PVE.Utils.render_size,
c0a14978
DC
49 },
50 {
51 itemId: 'swap',
3ff9bf5a 52 iconCls: 'fa fa-refresh fa-fw',
c0a14978
DC
53 title: gettext('Swap'),
54 textField: 'maxswap',
f6710aac 55 renderer: PVE.Utils.render_size,
c0a14978
DC
56 },
57 {
58 itemId: 'disk',
3ff9bf5a 59 iconCls: 'fa fa-hdd-o fa-fw',
c0a14978
DC
60 title: gettext('Bootdisk size'),
61 textField: 'maxdisk',
f6710aac 62 renderer: PVE.Utils.render_size,
c0a14978
DC
63 },
64 {
65 xtype: 'box',
f6710aac
TL
66 height: 20,
67 },
c0a14978
DC
68 ],
69
70 initComponent: function() {
71 var me = this;
72
73 var name = me.pveSelNode.data.name;
74 if (!name) {
75 throw "no name specified";
76 }
77
78 me.title = name;
79
80 me.callParent();
81 if (me.pveSelNode.data.type !== 'lxc') {
82 me.remove(me.getComponent('swap'));
83 }
84 me.getComponent('node').updateValue(me.pveSelNode.data.node);
f6710aac 85 },
c0a14978 86});