Ext.define('PVE.panel.GuestStatusView', {
- extend: 'PVE.panel.StatusView',
+ extend: 'Proxmox.panel.StatusView',
alias: 'widget.pveGuestStatusView',
mixins: ['Proxmox.Mixin.CBind'],
- height: 300,
-
- cbindData: function (initialConfig) {
+ cbindData: function(initialConfig) {
var me = this;
return {
isQemu: me.pveSelNode.data.type === 'qemu',
- isLxc: me.pveSelNode.data.type === 'lxc'
+ isLxc: me.pveSelNode.data.type === 'lxc',
};
},
layout: {
type: 'vbox',
- align: 'stretch'
+ align: 'stretch',
},
defaults: {
- xtype: 'pveInfoWidget',
- padding: '2 25'
+ xtype: 'pmxInfoWidget',
+ padding: '2 25',
},
items: [
{
xtype: 'box',
- height: 20
+ height: 20,
},
{
itemId: 'status',
title: gettext('Status'),
iconCls: 'fa fa-info fa-fw',
printBar: false,
- textField: 'status'
+ multiField: true,
+ renderer: function(record) {
+ var me = this;
+ var text = record.data.status;
+ var qmpstatus = record.data.qmpstatus;
+ if (qmpstatus && qmpstatus !== record.data.status) {
+ text += ' (' + qmpstatus + ')';
+ }
+ return text;
+ },
},
{
itemId: 'hamanaged',
title: gettext('HA State'),
printBar: false,
textField: 'ha',
- renderer: PVE.Utils.format_ha
+ renderer: PVE.Utils.format_ha,
},
{
- xtype: 'pveInfoWidget',
itemId: 'node',
iconCls: 'fa fa-building fa-fw',
title: gettext('Node'),
cbind: {
- text: '{pveSelNode.data.node}'
+ text: '{pveSelNode.data.node}',
},
- printBar: false
+ printBar: false,
},
{
xtype: 'box',
- height: 15
+ height: 15,
},
{
itemId: 'cpu',
- iconCls: 'fa fa-fw pve-itype-icon-processor pve-icon',
+ iconCls: 'fa fa-fw pmx-itype-icon-processor pmx-icon',
title: gettext('CPU usage'),
valueField: 'cpu',
maxField: 'cpus',
- renderer: PVE.Utils.render_cpu_usage,
+ renderer: Proxmox.Utils.render_cpu_usage,
// in this specific api call
// we already have the correct value for the usage
- calculate: Ext.identityFn
+ calculate: Ext.identityFn,
},
{
itemId: 'memory',
- iconCls: 'fa fa-fw pve-itype-icon-memory pve-icon',
+ iconCls: 'fa fa-fw pmx-itype-icon-memory pmx-icon',
title: gettext('Memory usage'),
valueField: 'mem',
- maxField: 'maxmem'
+ maxField: 'maxmem',
},
{
itemId: 'swap',
- xtype: 'pveInfoWidget',
iconCls: 'fa fa-refresh fa-fw',
title: gettext('SWAP usage'),
valueField: 'swap',
maxField: 'maxswap',
cbind: {
hidden: '{isQemu}',
- disabled: '{isQemu}'
- }
+ disabled: '{isQemu}',
+ },
},
{
itemId: 'rootfs',
var me = this;
me.setPrintBar(used > 0);
if (used === 0) {
- return PVE.Utils.render_size(max);
+ return Proxmox.Utils.render_size(max);
} else {
- return PVE.Utils.render_size_usage(used,max);
+ return Proxmox.Utils.render_size_usage(used, max);
}
- }
+ },
},
{
xtype: 'box',
- height: 15
+ height: 15,
},
{
itemId: 'ips',
rstore: '{rstore}',
pveSelNode: '{pveSelNode}',
hidden: '{isLxc}',
- disabled: '{isLxc}'
- }
- }
+ disabled: '{isLxc}',
+ },
+ },
],
updateTitle: function() {
}
me.setTitle(me.getRecordValue('name') + text);
- }
+ },
});