]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/panel/GuestStatusView.js
1 Ext
.define('PVE.panel.GuestStatusView', {
2 extend
: 'PVE.panel.StatusView',
3 alias
: 'widget.pveGuestStatusView',
4 mixins
: ['Proxmox.Mixin.CBind'],
14 xtype
: 'pveInfoWidget',
24 title
: gettext('Status'),
25 iconCls
: 'fa fa-info fa-fw',
31 iconCls
: 'fa fa-heartbeat fa-fw',
32 title
: gettext('HA State'),
35 renderer
: PVE
.Utils
.format_ha
39 iconCls
: 'fa fa-building fa-fw',
40 title
: gettext('Node'),
49 iconCls
: 'fa fa-fw pve-itype-icon-processor pve-icon',
50 title
: gettext('CPU usage'),
53 renderer
: PVE
.Utils
.render_cpu_usage
,
54 // in this specific api call
55 // we already have the correct value for the usage
56 calculate
: Ext
.identityFn
60 iconCls
: 'fa fa-fw pve-itype-icon-memory pve-icon',
61 title
: gettext('Memory usage'),
67 iconCls
: 'fa fa-refresh fa-fw',
68 title
: gettext('SWAP usage'),
74 iconCls
: 'fa fa-hdd-o fa-fw',
75 title
: gettext('Bootdisk size'),
79 renderer: function(used
, max
) {
81 me
.setPrintBar(used
> 0);
83 return PVE
.Utils
.render_size(max
);
85 return PVE
.Utils
.render_size_usage(used
,max
);
95 xtype
: 'pveAgentIPView',
98 pveSelNode
: '{pveSelNode}'
103 updateTitle: function() {
105 var uptime
= me
.getRecordValue('uptime');
108 if (Number(uptime
) > 0) {
109 text
= " (" + gettext('Uptime') + ': ' + Proxmox
.Utils
.format_duration_long(uptime
)
113 me
.setTitle(me
.getRecordValue('name') + text
);
116 initComponent: function() {
120 if (me
.pveSelNode
.data
.type
!== 'lxc') {
121 me
.remove(me
.getComponent('swap'));
123 me
.remove(me
.getComponent('ips'));
125 me
.getComponent('node').updateValue(me
.pveSelNode
.data
.node
);