public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 manager] fix #3301: show currently running QEMU version
@ 2021-03-09  9:15 Fabian Ebner
  0 siblings, 0 replies; only message in thread
From: Fabian Ebner @ 2021-03-09  9:15 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-09  9:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09  9:15 [pve-devel] [PATCH v2 manager] fix #3301: show currently running QEMU version Fabian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal