]>
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'],
8 cbindData: function (initialConfig
) {
11 isQemu
: me
.pveSelNode
.data
.type
=== 'qemu',
12 isLxc
: me
.pveSelNode
.data
.type
=== 'lxc'
22 xtype
: 'pveInfoWidget',
32 title
: gettext('Status'),
33 iconCls
: 'fa fa-info fa-fw',
39 iconCls
: 'fa fa-heartbeat fa-fw',
40 title
: gettext('HA State'),
43 renderer
: PVE
.Utils
.format_ha
46 xtype
: 'pveInfoWidget',
48 iconCls
: 'fa fa-building fa-fw',
49 title
: gettext('Node'),
51 text
: '{pveSelNode.data.node}'
61 iconCls
: 'fa fa-fw pve-itype-icon-processor pve-icon',
62 title
: gettext('CPU usage'),
65 renderer
: PVE
.Utils
.render_cpu_usage
,
66 // in this specific api call
67 // we already have the correct value for the usage
68 calculate
: Ext
.identityFn
72 iconCls
: 'fa fa-fw pve-itype-icon-memory pve-icon',
73 title
: gettext('Memory usage'),
79 xtype
: 'pveInfoWidget',
80 iconCls
: 'fa fa-refresh fa-fw',
81 title
: gettext('SWAP usage'),
91 iconCls
: 'fa fa-hdd-o fa-fw',
92 title
: gettext('Bootdisk size'),
96 renderer: function(used
, max
) {
98 me
.setPrintBar(used
> 0);
100 return PVE
.Utils
.render_size(max
);
102 return PVE
.Utils
.render_size_usage(used
,max
);
112 xtype
: 'pveAgentIPView',
115 pveSelNode
: '{pveSelNode}',
122 updateTitle: function() {
124 var uptime
= me
.getRecordValue('uptime');
127 if (Number(uptime
) > 0) {
128 text
= " (" + gettext('Uptime') + ': ' + Proxmox
.Utils
.format_duration_long(uptime
)
132 me
.setTitle(me
.getRecordValue('name') + text
);