As that info is not available through the store (which stores the
status), it must be fetched separately.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
[ TL: rework subject and avoid arror-fn for controller to keep `this`
working, as reviewed by Dominik ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+ controller: {
+ xclass: 'Ext.app.ViewController',
+
+ init: function(view) {
+ if (view.pveSelNode.data.type !== 'lxc') {
+ return;
+ }
+
+ const nodename = view.pveSelNode.data.node;
+ const vmid = view.pveSelNode.data.vmid;
+
+ Proxmox.Utils.API2Request({
+ url: `/api2/extjs/nodes/${nodename}/lxc/${vmid}/config`,
+ waitMsgTargetView: view,
+ method: 'GET',
+ success: ({ result }) => {
+ view.down('#unprivileged').updateValue(
+ Proxmox.Utils.format_boolean(result.data.unprivileged));
+ },
+ });
+ },
+ },
+
layout: {
type: 'vbox',
align: 'stretch',
layout: {
type: 'vbox',
align: 'stretch',
+ {
+ itemId: 'unprivileged',
+ iconCls: 'fa fa-lock fa-fw',
+ title: gettext('Unprivileged'),
+ printBar: false,
+ cbind: {
+ hidden: '{isQemu}',
+ },
+ },
{
xtype: 'box',
height: 15,
{
xtype: 'box',
height: 15,