[pve-devel] [PATCH manager v2 2/3] show qmpstatus if available

Dominik Csapak d.csapak at proxmox.com
Mon Apr 30 11:00:34 CEST 2018


this patch shows the qmpstatus if it is available on the summary in
parenthesis

this shows things like 'suspended' and 'io-error'

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
* show qmpstatus in parenthesis when available
 www/manager6/panel/GuestStatusView.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/www/manager6/panel/GuestStatusView.js b/www/manager6/panel/GuestStatusView.js
index 2a17869a..2a9198cf 100644
--- a/www/manager6/panel/GuestStatusView.js
+++ b/www/manager6/panel/GuestStatusView.js
@@ -32,7 +32,16 @@ Ext.define('PVE.panel.GuestStatusView', {
 	    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',
-- 
2.11.0





More information about the pve-devel mailing list