]>
Commit | Line | Data |
---|---|---|
a5c093b1 | 1 | Ext.define('PVE.node.StatusView', { |
e3c4b75d | 2 | extend: 'Proxmox.panel.StatusView', |
cb892fb3 | 3 | alias: 'widget.pveNodeStatus', |
a5c093b1 | 4 | |
cb892fb3 | 5 | height: 300, |
7ec884ca | 6 | bodyPadding: '20 15 20 15', |
a5c093b1 | 7 | |
701acf20 DC |
8 | layout: { |
9 | type: 'table', | |
10 | columns: 2, | |
11 | tableAttrs: { | |
12 | style: { | |
f6710aac TL |
13 | width: '100%', |
14 | }, | |
15 | }, | |
701acf20 DC |
16 | }, |
17 | ||
cb892fb3 | 18 | defaults: { |
c95917c2 | 19 | xtype: 'pmxInfoWidget', |
f6710aac | 20 | padding: '0 15 5 15', |
cb892fb3 | 21 | }, |
a5c093b1 | 22 | |
cb892fb3 | 23 | items: [ |
cb892fb3 DC |
24 | { |
25 | itemId: 'cpu', | |
a8ea1b68 | 26 | iconCls: 'fa fa-fw pmx-itype-icon-processor pmx-icon', |
cb892fb3 DC |
27 | title: gettext('CPU usage'), |
28 | valueField: 'cpu', | |
29 | maxField: 'cpuinfo', | |
1bd7bcdb | 30 | renderer: Proxmox.Utils.render_node_cpu_usage, |
cb892fb3 DC |
31 | }, |
32 | { | |
33 | itemId: 'wait', | |
3ff9bf5a | 34 | iconCls: 'fa fa-fw fa-clock-o', |
cb892fb3 | 35 | title: gettext('IO delay'), |
701acf20 | 36 | valueField: 'wait', |
f6710aac | 37 | rowspan: 2, |
cb892fb3 DC |
38 | }, |
39 | { | |
40 | itemId: 'load', | |
3ff9bf5a | 41 | iconCls: 'fa fa-fw fa-tasks', |
cb892fb3 DC |
42 | title: gettext('Load average'), |
43 | printBar: false, | |
f6710aac | 44 | textField: 'loadavg', |
cb892fb3 DC |
45 | }, |
46 | { | |
47 | xtype: 'box', | |
701acf20 | 48 | colspan: 2, |
f6710aac | 49 | padding: '0 0 20 0', |
cb892fb3 DC |
50 | }, |
51 | { | |
a8ea1b68 | 52 | iconCls: 'fa fa-fw pmx-itype-icon-memory pmx-icon', |
cb892fb3 DC |
53 | itemId: 'memory', |
54 | title: gettext('RAM usage'), | |
55 | valueField: 'memory', | |
56 | maxField: 'memory', | |
1bd7bcdb | 57 | renderer: Proxmox.Utils.render_node_size_usage, |
cb892fb3 DC |
58 | }, |
59 | { | |
60 | itemId: 'ksm', | |
61 | printBar: false, | |
62 | title: gettext('KSM sharing'), | |
63 | textField: 'ksm', | |
64 | renderer: function(record) { | |
1bd7bcdb | 65 | return Proxmox.Utils.render_size(record.shared); |
cb892fb3 | 66 | }, |
f6710aac | 67 | padding: '0 15 10 15', |
cb892fb3 DC |
68 | }, |
69 | { | |
3ff9bf5a | 70 | iconCls: 'fa fa-fw fa-hdd-o', |
cb892fb3 DC |
71 | itemId: 'rootfs', |
72 | title: gettext('HD space') + '(root)', | |
73 | valueField: 'rootfs', | |
74 | maxField: 'rootfs', | |
1bd7bcdb | 75 | renderer: Proxmox.Utils.render_node_size_usage, |
cb892fb3 DC |
76 | }, |
77 | { | |
3ff9bf5a | 78 | iconCls: 'fa fa-fw fa-refresh', |
cb892fb3 DC |
79 | itemId: 'swap', |
80 | printSize: true, | |
81 | title: gettext('SWAP usage'), | |
82 | valueField: 'swap', | |
83 | maxField: 'swap', | |
1bd7bcdb | 84 | renderer: Proxmox.Utils.render_node_size_usage, |
cb892fb3 DC |
85 | }, |
86 | { | |
87 | xtype: 'box', | |
701acf20 | 88 | colspan: 2, |
f6710aac | 89 | padding: '0 0 20 0', |
cb892fb3 DC |
90 | }, |
91 | { | |
92 | itemId: 'cpus', | |
701acf20 | 93 | colspan: 2, |
cb892fb3 | 94 | printBar: false, |
4198e16f | 95 | title: gettext('CPU(s)'), |
cb892fb3 | 96 | textField: 'cpuinfo', |
1bd7bcdb | 97 | renderer: Proxmox.Utils.render_cpu_model, |
f6710aac | 98 | value: '', |
cb892fb3 DC |
99 | }, |
100 | { | |
101 | itemId: 'kversion', | |
701acf20 | 102 | colspan: 2, |
cb892fb3 DC |
103 | title: gettext('Kernel Version'), |
104 | printBar: false, | |
105 | textField: 'kversion', | |
f6710aac | 106 | value: '', |
cb892fb3 DC |
107 | }, |
108 | { | |
109 | itemId: 'version', | |
701acf20 | 110 | colspan: 2, |
cb892fb3 DC |
111 | printBar: false, |
112 | title: gettext('PVE Manager Version'), | |
113 | textField: 'pveversion', | |
f6710aac TL |
114 | value: '', |
115 | }, | |
cb892fb3 | 116 | ], |
a5c093b1 | 117 | |
cb892fb3 DC |
118 | updateTitle: function() { |
119 | var me = this; | |
e7ade592 | 120 | var uptime = Proxmox.Utils.render_uptime(me.getRecordValue('uptime')); |
cb892fb3 | 121 | me.setTitle(me.pveSelNode.data.node + ' (' + gettext('Uptime') + ': ' + uptime + ')'); |
f6710aac | 122 | }, |
cb892fb3 | 123 | |
a5c093b1 | 124 | }); |