diff --git a/src/WebAppDIRAC/WebApp/handler/ExampleAppHandler.py b/src/WebAppDIRAC/WebApp/handler/ExampleAppHandler.py deleted file mode 100644 index f3aa64c1..00000000 --- a/src/WebAppDIRAC/WebApp/handler/ExampleAppHandler.py +++ /dev/null @@ -1,21 +0,0 @@ -from WebAppDIRAC.Lib.WebHandler import WebHandler -import datetime - - -class ExampleAppHandler(WebHandler): - DEFAULT_AUTHORIZATION = "all" - - def web_getJobData(self): - timestamp = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M [UTC]") - total = 5 - values = [ - {"ExampleId": 1, "ExampleValue": "Zoli"}, - {"ExampleId": 2, "ExampleValue": "a"}, - {"ExampleId": 3, "ExampleValue": "aaaa"}, - {"ExampleId": 4, "ExampleValue": "bbbb"}, - {"ExampleId": 5, "ExampleValue": "adsd"}, - ] - return {"success": "true", "result": values, "total": total, "date": timestamp} - - def web_getSelectionData(self): - return {"firstName": ["A", "C", "D"], "lastName": ["wwww", "dsds", "sads"]} diff --git a/src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py b/src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py index b43d1222..0b6f672f 100644 --- a/src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py +++ b/src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py @@ -61,9 +61,8 @@ def web_getProxyManagerData( if self.getUserName().lower() == "anonymous": return {"success": "false", "error": "You are not authorize to access these data"} req = self.__prepareParameters(username, expiredBefore, expiredAfter) - gLogger.info("!!! S O R T : ", sort := [[sortField, sortDirection]]) + sort = [[sortField, sortDirection]] result = gProxyManager.getDBContents(req, sort, start, limit) - gLogger.info(f"*!*!*! RESULT: \n{result}") if not result["OK"]: return {"success": "false", "error": result["Message"]} svcData = result["Value"] @@ -71,10 +70,10 @@ def web_getProxyManagerData( for record in svcData["Records"]: proxies.append( { - "proxyid": f"{record[1]}@{record[2]}", - "UserName": str(record[0]), + "proxyid": f"{record[1]}", + "UserName": record[0], "UserDN": record[1], - "ExpirationTime": str(record[3]), + "ExpirationTime": str(record[2]), } ) timestamp = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M [UTC]")