From: Matthias Heiserer <m.heiserer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] fix #2435: GUI: LXC summary: Add privileged status and os type
Date: Mon, 8 Aug 2022 13:48:16 +0200 [thread overview]
Message-ID: <20220808114816.265306-1-m.heiserer@proxmox.com> (raw)
---
I'm a bit unsure about the icons, there are probably better ones, but I couldn't
think of/find any. One alternative for OS type would be the OS logos.
www/manager6/.lint-incremental | 0
www/manager6/panel/GuestStatusView.js | 44 +++++++++++++++++++++++++++
2 files changed, 44 insertions(+)
create mode 100644 www/manager6/.lint-incremental
diff --git a/www/manager6/.lint-incremental b/www/manager6/.lint-incremental
new file mode 100644
index 00000000..e69de29b
diff --git a/www/manager6/panel/GuestStatusView.js b/www/manager6/panel/GuestStatusView.js
index 8db1f492..96e9adea 100644
--- a/www/manager6/panel/GuestStatusView.js
+++ b/www/manager6/panel/GuestStatusView.js
@@ -11,6 +11,30 @@ Ext.define('PVE.panel.GuestStatusView', {
};
},
+ controller: {
+ xclass: 'Ext.app.ViewController',
+
+ init: function(view) {
+ const nodename = view.pveSelNode.get("node");
+ const id = view.pveSelNode.get("vmid");
+ const me = this;
+ Proxmox.Utils.API2Request({
+ url: `/api2/extjs/nodes/${nodename}/lxc/${id}/config`,
+ waitMsgTarget: view,
+ method: 'GET',
+ success: function(response) {
+ const ostype = response.result.data.ostype;
+ const label = me.lookup("ostype").getComponent('label');
+ label.update(Ext.apply(label.data, {
+ usage: ostype,
+ }));
+ const unprivileged = response.result.data.unprivileged;
+ me.lookup('privileged').updateValue(!unprivileged);
+ },
+ });
+ },
+ },
+
layout: {
type: 'vbox',
align: 'stretch',
@@ -58,6 +82,26 @@ Ext.define('PVE.panel.GuestStatusView', {
},
printBar: false,
},
+ {
+ title: gettext('OS type'),
+ printBar: false,
+ reference: 'ostype',
+ cbind: {
+ hidden: '{isQemu}',
+ disabled: '{isQemu}',
+ },
+ iconCls: 'fa fa-mouse-pointer fa-fw',
+ },
+ {
+ title: gettext('Privileged'),
+ printBar: false,
+ reference: 'privileged',
+ cbind: {
+ hidden: '{isQemu}',
+ disabled: '{isQemu}',
+ },
+ iconCls: 'fa fa-user-circle-o fa-fw',
+ },
{
xtype: 'box',
height: 15,
--
2.30.2
next reply other threads:[~2022-08-08 11:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-08 11:48 Matthias Heiserer [this message]
2022-09-09 6:20 ` Thomas Lamprecht
2022-09-16 12:13 ` 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=20220808114816.265306-1-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.