public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Matthias Heiserer <m.heiserer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/3] GUI: LXC Template Summary: display privileged status and os type
Date: Fri,  2 Dec 2022 14:50:17 +0100	[thread overview]
Message-ID: <20221202135018.250016-2-m.heiserer@proxmox.com> (raw)
In-Reply-To: <20221202135018.250016-1-m.heiserer@proxmox.com>

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
---
 www/manager6/panel/TemplateStatusView.js | 35 ++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/www/manager6/panel/TemplateStatusView.js b/www/manager6/panel/TemplateStatusView.js
index 4e17a41c..5543f4fe 100644
--- a/www/manager6/panel/TemplateStatusView.js
+++ b/www/manager6/panel/TemplateStatusView.js
@@ -1,12 +1,28 @@
 Ext.define('PVE.panel.TemplateStatusView', {
     extend: 'Proxmox.panel.StatusView',
     alias: 'widget.pveTemplateStatusView',
+    mixins: ['Proxmox.Mixin.CBind'],
+
+    cbindData: function(initialConfig) {
+	var me = this;
+	return {
+	    isQemu: me.pveSelNode.data.type === 'qemu',
+	};
+    },
 
     layout: {
 	type: 'vbox',
 	align: 'stretch',
     },
 
+    controller: {
+	xclass: 'Ext.app.ViewController',
+
+	init: function(view) {
+	    view.applyLogos(this);
+	},
+    },
+
     defaults: {
 	xtype: 'pmxInfoWidget',
 	printBar: false,
@@ -30,6 +46,25 @@ Ext.define('PVE.panel.TemplateStatusView', {
 	    iconCls: 'fa fa-fw fa-building',
 	    title: gettext('Node'),
 	},
+	{
+	    title: gettext('OS type'),
+	    printBar: false,
+	    reference: 'ostype',
+	    cbind: {
+		hidden: '{isQemu}',
+		disabled: '{isQemu}',
+	    },
+	},
+	{
+	    title: gettext('Privileged'),
+	    printBar: false,
+	    reference: 'privileged',
+	    cbind: {
+		hidden: '{isQemu}',
+		disabled: '{isQemu}',
+	    },
+	    iconCls: 'fa fa-user-circle-o fa-fw',
+	},
 	{
 	    xtype: 'box',
 	    height: 20,
-- 
2.30.2





  reply	other threads:[~2022-12-02 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 13:50 [pve-devel] [PATCH manager 1/3] fix #2435: GUI: LXC summary: Add " Matthias Heiserer
2022-12-02 13:50 ` Matthias Heiserer [this message]
2022-12-02 13:50 ` [pve-devel] [PATCH manager 3/3] code cleanup: convert var to let/const Matthias Heiserer

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=20221202135018.250016-2-m.heiserer@proxmox.com \
    --to=m.heiserer@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal