Closed bertrandrigaud closed 1 year ago
Thank you for your first contribution to DIRAC. 2 things:
pre-commit
in your (conda? mamba?) env: https://github.com/DIRACGrid/DIRAC#code-qualityHello,
Pre-commit seems to work properly when I commit from my local branch but "Basic tests / pre-commit" is failing here. Can you help me passing this step please? (Error message is not clear to me)
Concerning column names (AT and RT), I started with full names as it is in ProxyManager app but this leads to large columns. As this app is mostly viewed by admins, I thought AT and RT could be easily understood. What do you think?
Does your pre-commit
include also prettier
, for the JS code?
Other than that, I think you can solve everything doing:
black src/WebAppDIRAC/WebApp/handler/TokenManagerHandler.py
and for JS you can follow instructions in https://prettier.io/docs/en/index.html
of apply by hand the following diff:
diff --git a/src/WebAppDIRAC/WebApp/static/DIRAC/TokenManager/classes/TokenManager.js b/src/WebAppDIRAC/WebApp/static/DIRAC/TokenManager/classes/TokenManager.js
index 8e36b53..01381d8 100644
--- a/src/WebAppDIRAC/WebApp/static/DIRAC/TokenManager/classes/TokenManager.js
+++ b/src/WebAppDIRAC/WebApp/static/DIRAC/TokenManager/classes/TokenManager.js
@@ -115,8 +115,6 @@ Ext.define("DIRAC.TokenManager.classes.TokenManager", {
url: "TokenManager/getSelectionData",
});
-
-
/*
* -----------------------------------------------------------------------------------------------------------
* DEFINITION OF THE GRID
@@ -225,7 +223,9 @@ Ext.define("DIRAC.TokenManager.classes.TokenManager", {
var timeLimit = 30; // 30 days before expiration
if (secsLeft < timeLimit) {
- return '<span style="color:red">' + Ext.Date.format(record.data.RefreshTokenExpirationTime, "Y-m-d H:i:s") + " (" + secsLeft + ")" + "</span>";
+ return (
+ '<span style="color:red">' + Ext.Date.format(record.data.RefreshTokenExpirationTime, "Y-m-d H:i:s") + " (" + secsLeft + ")" + "</span>"
+ );
} else {
return '<span style="color:green">' + Ext.Date.format(record.data.RefreshTokenExpirationTime, "Y-m-d H:i:s") + "</span>";
}
Concerning column names (AT and RT), I started with full names as it is in ProxyManager app but this leads to large columns. As this app is mostly viewed by admins, I thought AT and RT could be easily understood. What do you think?
I'd go with full names. It is not uncommon that an expert-but-not-so-expert-on-that-specific-topic ends up debugging something on a topic he is not that familiar with. And having acronyms does not really make that job easy :-)
I solved prettier check issue (NodeJS version had to be updated) but I don't know why, I'm back to the commit message check issue. I tried with: feat: update token manager web application feat (TokenManager): update token manager web application feat(TokenManager): update token manager web application but without success :(
Can you help me please?
I think the "breaking" commit is https://github.com/DIRACGrid/WebAppDIRAC/pull/729/commits/1082188c75161134a71ce760accf2acda07c23bf
I'm afraid checks have finally passed! \o/
So I included full name in columns title
Sweep summary
Sweep ran in https://github.com/DIRACGrid/WebAppDIRAC/actions/runs/4414343332
PR for displaying Token informations (such as proxymanager) in web application
BEGINRELEASENOTES
CHANGE: Display user access and refresh tokens with details (right click pop up window)
ENDRELEASENOTES