]>
Commit | Line | Data |
---|---|---|
f6710aac | 1 | Ext.define('PVE.panel.TemplateStatusView', { |
e3c4b75d | 2 | extend: 'Proxmox.panel.StatusView', |
c0a14978 DC |
3 | alias: 'widget.pveTemplateStatusView', |
4 | ||
3ff9bf5a DC |
5 | layout: { |
6 | type: 'vbox', | |
f6710aac | 7 | align: 'stretch', |
3ff9bf5a DC |
8 | }, |
9 | ||
c0a14978 | 10 | defaults: { |
c95917c2 | 11 | xtype: 'pmxInfoWidget', |
c0a14978 | 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', | |
a8ea1b68 | 39 | iconCls: 'fa fa-fw pmx-itype-icon-processor pmx-icon', |
c0a14978 | 40 | title: gettext('Processors'), |
f6710aac | 41 | textField: 'cpus', |
c0a14978 DC |
42 | }, |
43 | { | |
44 | itemId: 'memory', | |
a8ea1b68 | 45 | iconCls: 'fa fa-fw pmx-itype-icon-memory pmx-icon', |
c0a14978 DC |
46 | title: gettext('Memory'), |
47 | textField: 'maxmem', | |
1bd7bcdb | 48 | renderer: Proxmox.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', | |
1bd7bcdb | 55 | renderer: Proxmox.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', | |
1bd7bcdb | 62 | renderer: Proxmox.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 | }); |