From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager 1/2] ui: qemu: hardware: add new memory format support
Date: Mon, 20 Feb 2023 17:27:28 +0100 [thread overview]
Message-ID: <20230220162729.1907695-2-aderumier@odiso.com> (raw)
In-Reply-To: <20230220162729.1907695-1-aderumier@odiso.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
www/manager6/qemu/HardwareView.js | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index af35a980..0b17ef0d 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -77,11 +77,17 @@ Ext.define('PVE.qemu.HardwareView', {
renderer: function(value, metaData, record, ri, ci, store, pending) {
var res = '';
- var max = me.getObjectValue('memory', 512, pending);
+ let memory = me.getObjectValue('memory', undefined, pending);
+ let props = PVE.Parser.parsePropertyString(memory, 'current');
+ let current = 512;
+ if (props.current) {
+ current = props.current;
+ }
+
var balloon = me.getObjectValue('balloon', undefined, pending);
var shares = me.getObjectValue('shares', undefined, pending);
- res = Proxmox.Utils.format_size(max*1024*1024);
+ res = Proxmox.Utils.format_size(current*1024*1024);
if (balloon !== undefined && balloon > 0) {
res = Proxmox.Utils.format_size(balloon*1024*1024) + "/" + res;
@@ -92,6 +98,13 @@ Ext.define('PVE.qemu.HardwareView', {
} else if (balloon === 0) {
res += ' [balloon=0]';
}
+ if (props.max) {
+ res += ' [max=' + Proxmox.Utils.format_size(props.max*1024*1024) +']';
+ }
+ if (props.virtio) {
+ res += ' [virtio=' + props.virtio +']';
+ }
+
return res;
},
},
--
2.30.2
next prev parent reply other threads:[~2023-02-20 16:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 16:27 [pve-devel] [PATCH pve-manager 0/2] ui: add support for new memory format Alexandre Derumier
2023-02-20 16:27 ` Alexandre Derumier [this message]
2023-02-20 16:27 ` [pve-devel] [PATCH pve-manager 2/2] ui: qemu : memoryedit: add new max && virtio fields Alexandre Derumier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230220162729.1907695-2-aderumier@odiso.com \
--to=aderumier@odiso.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox