mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-10 19:59:12 +00:00
use correct multiKey and getObjectValue calls for memory line
also show shares and if ballooning is off Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
d9ace13c6c
commit
1d90225274
@ -50,14 +50,26 @@ Ext.define('PVE.qemu.HardwareView', {
|
|||||||
never_delete: true,
|
never_delete: true,
|
||||||
defaultValue: '512',
|
defaultValue: '512',
|
||||||
tdCls: 'pve-itype-icon-memory',
|
tdCls: 'pve-itype-icon-memory',
|
||||||
renderer: function(value, metaData, record) {
|
multiKey: ['memory', 'balloon', 'shares'],
|
||||||
var balloon = me.getObjectValue('balloon');
|
renderer: function(value, metaData, record, ri, ci, store, pending) {
|
||||||
if (balloon) {
|
var res = '';
|
||||||
return Proxmox.Utils.format_size(balloon*1024*1024) + "/" +
|
|
||||||
Proxmox.Utils.format_size(value*1024*1024);
|
|
||||||
|
|
||||||
|
var max = me.getObjectValue('memory', 512, pending);
|
||||||
|
var balloon = me.getObjectValue('balloon', undefined, pending);
|
||||||
|
var shares = me.getObjectValue('shares', undefined, pending);
|
||||||
|
|
||||||
|
res = Proxmox.Utils.format_size(max*1024*1024);
|
||||||
|
|
||||||
|
if (balloon !== undefined && balloon > 0) {
|
||||||
|
res = Proxmox.Utils.format_size(balloon*1024*1024) + "/" + res;
|
||||||
|
|
||||||
|
if (shares) {
|
||||||
|
res += ' [shares=' + shares +']';
|
||||||
|
}
|
||||||
|
} else if (balloon === 0) {
|
||||||
|
res += ' [balloon=0]';
|
||||||
}
|
}
|
||||||
return Proxmox.Utils.format_size(value*1024*1024);
|
return res;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sockets: {
|
sockets: {
|
||||||
@ -146,8 +158,10 @@ Ext.define('PVE.qemu.HardwareView', {
|
|||||||
},
|
},
|
||||||
bios: {
|
bios: {
|
||||||
visible: false
|
visible: false
|
||||||
|
},
|
||||||
|
shares: {
|
||||||
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PVE.Utils.forEachBus(undefined, function(type, id) {
|
PVE.Utils.forEachBus(undefined, function(type, id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user