public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC PATCH manager 3/4] ui: data/PermPathStore: load list of groups to show their path
Date: Thu, 17 Jun 2021 15:32:02 +0200	[thread overview]
Message-ID: <20210617133203.549-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20210617133203.549-1-d.csapak@proxmox.com>

tries to load the list of defined groups and adds them to the store

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
also not really sure about it either, if we save the realmlist, maybe
the grouplist too? or as i already wrote, load the realmlist everytime
too?

 www/manager6/data/PermPathStore.js | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/www/manager6/data/PermPathStore.js b/www/manager6/data/PermPathStore.js
index f55257cc..c1c52b75 100644
--- a/www/manager6/data/PermPathStore.js
+++ b/www/manager6/data/PermPathStore.js
@@ -83,5 +83,25 @@ Ext.define('PVE.data.PermPathStore', {
 	    property: 'value',
 	    direction: 'ASC',
 	});
+
+	Proxmox.Utils.API2Request({
+	    url: `/access/groups`,
+	    success: function(response) {
+		me.suspendEvents();
+		response.result.data.forEach((group) => {
+		    me.add({
+			value: `/access/groups/${group.groupid}`,
+		    });
+		});
+		me.resumeEvents();
+
+		me.fireEvent('refresh', me);
+		me.fireEvent('datachanged', me);
+		me.sort({
+			property: 'value',
+			direction: 'ASC',
+		});
+	    },
+	});
     },
 });
-- 
2.20.1





  parent reply	other threads:[~2021-06-17 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 13:32 [pve-devel] [PATCH manager 1/4] ui: data/PermPathStore: add missing basic acl paths to acl selector Dominik Csapak
2021-06-17 13:32 ` [pve-devel] [RFC PATCH manager 2/4] ui: data/PermPathStore: show/load acl paths for realms Dominik Csapak
2021-06-17 13:32 ` Dominik Csapak [this message]
2021-06-17 13:32 ` [pve-devel] [PATCH manager 4/4] ui: dc/ACLView: make the window wider Dominik Csapak
2021-06-18 15:09   ` [pve-devel] applied: " Thomas Lamprecht
2021-06-18 15:07 ` [pve-devel] applied: [PATCH manager 1/4] ui: data/PermPathStore: add missing basic acl paths to acl selector Thomas Lamprecht

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=20210617133203.549-3-d.csapak@proxmox.com \
    --to=d.csapak@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