]>
Commit | Line | Data |
---|---|---|
c0a14978 DC |
1 | Ext.define('PVE.panel.TemplateStatusView',{ |
2 | extend: 'PVE.panel.StatusView', | |
3 | alias: 'widget.pveTemplateStatusView', | |
4 | ||
3ff9bf5a DC |
5 | layout: { |
6 | type: 'vbox', | |
7 | align: 'stretch' | |
8 | }, | |
9 | ||
c0a14978 DC |
10 | defaults: { |
11 | xtype: 'pveInfoWidget', | |
12 | printBar: false, | |
3ff9bf5a | 13 | padding: '2 25' |
c0a14978 DC |
14 | }, |
15 | items: [ | |
16 | { | |
17 | xtype: 'box', | |
3ff9bf5a | 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', | |
26 | renderer: PVE.Utils.format_ha | |
27 | }, | |
c0a14978 DC |
28 | { |
29 | itemId: 'node', | |
3ff9bf5a | 30 | iconCls: 'fa fa-fw fa-building', |
c0a14978 DC |
31 | title: gettext('Node') |
32 | }, | |
33 | { | |
34 | xtype: 'box', | |
3ff9bf5a | 35 | height: 20 |
c0a14978 DC |
36 | }, |
37 | { | |
38 | itemId: 'cpus', | |
3ff9bf5a | 39 | iconCls: 'fa fa-fw pve-itype-icon-processor pve-icon', |
c0a14978 DC |
40 | title: gettext('Processors'), |
41 | textField: 'cpus' | |
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', | |
48 | renderer: PVE.Utils.render_size | |
49 | }, | |
50 | { | |
51 | itemId: 'swap', | |
3ff9bf5a | 52 | iconCls: 'fa fa-refresh fa-fw', |
c0a14978 DC |
53 | title: gettext('Swap'), |
54 | textField: 'maxswap', | |
55 | renderer: PVE.Utils.render_size | |
56 | }, | |
57 | { | |
58 | itemId: 'disk', | |
3ff9bf5a | 59 | iconCls: 'fa fa-hdd-o fa-fw', |
c0a14978 DC |
60 | title: gettext('Bootdisk size'), |
61 | textField: 'maxdisk', | |
62 | renderer: PVE.Utils.render_size | |
63 | }, | |
64 | { | |
65 | xtype: 'box', | |
3ff9bf5a | 66 | height: 20 |
c0a14978 DC |
67 | } |
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); | |
85 | } | |
86 | }); |