From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 manager] fix #3301: show currently running QEMU version
Date: Tue, 9 Mar 2021 10:15:00 +0100 [thread overview]
Message-ID: <20210309091500.5058-1-f.ebner@proxmox.com> (raw)
in the VM summary page.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
Changes from v1:
* use a separate field instead of attaching it directly to the
status.
Put it directly below the Status field, because it feels like they belong
together. OTOH the information might not be as relevant so maybe it should be
further below?
I thought about dynamically hiding the field when the VM is not running, but I
didn't see an easy way in this case (would need to add some new functionality
to the StatusView base class AFAICT). An alternative would be using cbind for
running too, but that's not dynamic. Instead, simply use a renderer that checks
for running.
www/manager6/panel/GuestStatusView.js | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/www/manager6/panel/GuestStatusView.js b/www/manager6/panel/GuestStatusView.js
index 8dab4c19..acf3b7c5 100644
--- a/www/manager6/panel/GuestStatusView.js
+++ b/www/manager6/panel/GuestStatusView.js
@@ -43,6 +43,24 @@ Ext.define('PVE.panel.GuestStatusView', {
return text;
},
},
+ {
+ itemId: 'qemuversion',
+ xtype: 'pveInfoWidget',
+ title: gettext('QEMU version'),
+ iconCls: 'fa fa-info fa-fw',
+ printBar: false,
+ multiField: true,
+ renderer: function(record) {
+ if (record.data.status !== 'running') {
+ return gettext('not running');
+ }
+ return record.data['running-qemu'] || 'N/A';
+ },
+ cbind: {
+ hidden: '{!isQemu}',
+ disabled: '{!isQemu}',
+ },
+ },
{
itemId: 'hamanaged',
iconCls: 'fa fa-heartbeat fa-fw',
--
2.20.1
reply other threads:[~2021-03-09 9:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210309091500.5058-1-f.ebner@proxmox.com \
--to=f.ebner@proxmox.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