From 82de574412cf8f758023275fe406e6da944e9968 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Mon, 22 Jan 2024 13:00:59 +0100 Subject: [PATCH] feat: removed proxies persistency flag --- src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py | 9 +++------ .../static/DIRAC/ProxyManager/classes/ProxyManager.js | 10 ---------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py b/src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py index 0aaadaae1..069ecd640 100644 --- a/src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py +++ b/src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py @@ -65,13 +65,12 @@ def web_getProxyManagerData( sortField="UserName", username="[]", usergroup="[]", - persistent="", expiredBefore=0, expiredAfter=0, ): if self.getUserName().lower() == "anonymous": return {"success": "false", "error": "You are not authorize to access these data"} - req = self.__prepareParameters(username, usergroup, persistent, expiredBefore, expiredAfter) + req = self.__prepareParameters(username, usergroup, expiredBefore, expiredAfter) gLogger.info("!!! S O R T : ", sort := [[sortField, sortDirection]]) # pylint: disable=no-member result = gProxyManager.getDBContents(req, sort, start, limit) @@ -89,7 +88,6 @@ def web_getProxyManagerData( "UserDN": record[1], "UserGroup": record[2], "ExpirationTime": str(record[3]), - "PersistentFlag": str(record[4]), } ) timestamp = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M [UTC]") @@ -147,14 +145,13 @@ def __humanize_time(self, sec=False): elif day > 0: return f"{day} days" - def __prepareParameters(self, username, usergroup, persistent, expiredBefore, expiredAfter): + def __prepareParameters(self, username, usergroup, expiredBefore, expiredAfter): req = {} if users := list(json.loads(username)): req["UserName"] = users if usersgroup := list(json.loads(usergroup)): req["UserGroup"] = usersgroup - if usersgroup and persistent in ["True", "False"]: - req["PersistentFlag"] = persistent + if expiredBefore > expiredAfter: expiredBefore, expiredAfter = expiredAfter, expiredBefore if expiredBefore: diff --git a/src/WebAppDIRAC/WebApp/static/DIRAC/ProxyManager/classes/ProxyManager.js b/src/WebAppDIRAC/WebApp/static/DIRAC/ProxyManager/classes/ProxyManager.js index afcaafe2a..3c89f490e 100644 --- a/src/WebAppDIRAC/WebApp/static/DIRAC/ProxyManager/classes/ProxyManager.js +++ b/src/WebAppDIRAC/WebApp/static/DIRAC/ProxyManager/classes/ProxyManager.js @@ -61,9 +61,6 @@ Ext.define("DIRAC.ProxyManager.classes.ProxyManager", { type: "date", dateFormat: "Y-m-d H:i:s", }, - { - name: "PersistentFlag", - }, ], initComponent: function () { @@ -197,13 +194,6 @@ Ext.define("DIRAC.ProxyManager.classes.ProxyManager", { } }, }, - Persistent: { - dataIndex: "PersistentFlag", - properties: { - width: 100, - sortable: true, - }, - }, }; me.grid = Ext.create("Ext.dirac.utils.DiracGridPanel", {