From bd3420fbdd82cd17f854b6c0f1f50102dd0f0d88 Mon Sep 17 00:00:00 2001 From: Camille Moussu Date: Mon, 20 May 2024 11:34:32 +0400 Subject: [PATCH] [#6] added tooltip for help on parametters + added file to complete with defs --- .../applicationsComponents/CasApp.tsx | 53 ++++-- .../applicationsComponents/NativeApp.tsx | 115 ++++++++++--- .../applicationsComponents/OIDCApp.tsx | 44 +++-- .../applicationsComponents/OptionOidc.tsx | 160 +++++++++++++----- .../applicationsComponents/OptionSaml.tsx | 83 ++++++--- .../applicationsComponents/SAMLApp.tsx | 32 +++- .../authParamOptions/OptionRenderer.tsx | 100 ++++++++--- .../managerComponents/MandatoryFields.tsx | 15 +- src/static/definitions.json | 3 + 9 files changed, 467 insertions(+), 138 deletions(-) create mode 100644 src/static/definitions.json diff --git a/src/components/applicationsComponents/CasApp.tsx b/src/components/applicationsComponents/CasApp.tsx index 6442430..396adee 100644 --- a/src/components/applicationsComponents/CasApp.tsx +++ b/src/components/applicationsComponents/CasApp.tsx @@ -20,7 +20,10 @@ import { Radio, RadioGroup, TextField, + Tooltip, } from "@mui/material"; +import Markdown from "markdown-to-jsx"; +import definitions from "../../static/definitions.json"; export function CasApp({ name }: { name: string }) { const vars = useAppSelector((state) => @@ -67,8 +70,16 @@ export function CasApp({ name }: { name: string }) { - - + + + + + + - - + + + + + + - + + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - - - - + + + + + + + + + + + + - + {definitions.test}}> + + - + {definitions.test}}> + + - - - - + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + + - - + {definitions.test}}> + + + {definitions.test}}> + + - - - - - + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - - - - + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + + - - + {definitions.test}}> + + + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - - + {definitions.test}}> + + + {definitions.test}}> + +
{t("keys")}{t("values")} + {definitions.test}}> + {t("keys")} + {definitions.test}}> + {t("values")}
{t("keys")}{t("values")} + {definitions.test}}> + {t("keys")} + {definitions.test}}> + {t("values")}
{t("casAppMetaDataOptionsDisplayName")} + {definitions.test}}> + {t("casAppMetaDataOptionsDisplayName")}
{t("casAppMetaDataOptionsService")}{t("casAppMetaDataOptionsService")}
{t("casAppMetaDataOptionsLogout")}{t("casAppMetaDataOptionsLogout")}
{t("casAppMetaDataOptionsAuthnLevel")}{t("casAppMetaDataOptionsAuthnLevel")}
{t("casAppMetaDataOptionsRule")}{t("casAppMetaDataOptionsRule")}
{t("casAppMetaDataOptionsComment")}{t("casAppMetaDataOptionsComment")} ) { ); })}
{t("defaultRule")}{t("defaultRule")}
{t("vhostComment")}{t("regexp")}{t("rules")}{t("rulesAuthnLevel")} + {definitions.test}}> + {t("vhostComment")} + {definitions.test}}> + {t("regexp")} + {definitions.test}}> + {t("rules")} + {definitions.test}}> + {t("rulesAuthnLevel")}
{t("defaultRule")}{t("defaultRule")}
{t("maintenance")}{t("maintenance")}
{t("vhostComment")}{t("regexp")}{t("rules")}{t("rulesAuthnLevel")}{t("vhostComment")}{t("regexp")}{t("rules")}{t("rulesAuthnLevel")}
{t("keys")}{t("values")}{t("keys")}{t("values")}
{t("postUrl")}{t("postTargetUrl")}{t("jqueryUrl")}{t("jqueryFormSelector")}{t("jqueryButtonSelector")}{t("postUrl")}{t("postTargetUrl")}{t("jqueryUrl")}{t("jqueryFormSelector")}{t("jqueryButtonSelector")}
{t("port")}{t("port")}
{t("vhostHttps")}{t("vhostHttps")}
{t("maintenance")}{t("maintenance")}
{t("vhostAliases")}{t("vhostAliases")}
{t("vhostAccessToTrace")}{t("vhostAccessToTrace")}
{t("vhostType")}{t("vhostType")} {t("vhostType")} @@ -796,7 +855,9 @@ export function NativeApp({ name }: { name: string }) {
{t("vhostAuthnLevel")}{t("vhostAuthnLevel")}
{t("vhostServiceTokenTTL")}{t("vhostServiceTokenTTL")}
{t("oidcRPMetaDataOptionsRedirectUris")}{t("oidcRPMetaDataOptionsRedirectUris")}
{t("oidcRPMetaDataOptionsAuthMethod")}{t("oidcRPMetaDataOptionsAuthMethod")}
{t("oidcRPMetaDataOptionsDisplay")}{t("oidcRPMetaDataOptionsDisplay")}
{t("oidcRPMetaDataOptionsIcon")}{t("oidcRPMetaDataOptionsIcon")}
{t("claimName")}{t("variableName")}{t("type")}{t("array")}{t("claimName")}{t("variableName")}{t("type")}{t("array")}
{t("keys")}{t("values")}{t("keys")}{t("values")}
{t("oidcRPMetaDataOptionsBypassConsent")}{t("oidcRPMetaDataOptionsBypassConsent")}
{t("oidcRPMetaDataOptionsIDTokenForceClaims")}{t("oidcRPMetaDataOptionsIDTokenForceClaims")}
{t("oidcRPMetaDataOptionsAccessTokenJWT")}{t("oidcRPMetaDataOptionsAccessTokenJWT")}
{t("oidcRPMetaDataOptionsAccessTokenClaims")}{t("oidcRPMetaDataOptionsAccessTokenClaims")}
{t("oidcRPMetaDataOptionsRefreshToken")}{t("oidcRPMetaDataOptionsRefreshToken")}
{t("oidcRPMetaDataOptionsUserIDAttr")}{t("oidcRPMetaDataOptionsUserIDAttr")}
{t("oidcRPMetaDataOptionsAdditionalAudiences")}{t("oidcRPMetaDataOptionsAdditionalAudiences")}
{t("keys")}{t("values")}{t("keys")}{t("values")}
- - + {definitions.test}}> + + + {definitions.test}}> + +
{t("keys")}{t("values")}{t("keys")}{t("values")}
- + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + +
{t("oidcRPMetaDataOptionsIDTokenSignAlg")}{t("oidcRPMetaDataOptionsIDTokenSignAlg")} @@ -433,7 +461,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsAccessTokenSignAlg")}{t("oidcRPMetaDataOptionsAccessTokenSignAlg")} @@ -472,7 +502,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsUserInfoSignAlg")}{t("oidcRPMetaDataOptionsUserInfoSignAlg")} @@ -508,7 +540,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsRequirePKCE")}{t("oidcRPMetaDataOptionsRequirePKCE")}
{t("oidcRPMetaDataOptionsAllowOffline")}{t("oidcRPMetaDataOptionsAllowOffline")}
{t("oidcRPMetaDataOptionsAllowPasswordGrant")}{t("oidcRPMetaDataOptionsAllowPasswordGrant")}
{t("oidcRPMetaDataOptionsAllowClientCredentialsGrant")}{t("oidcRPMetaDataOptionsAllowClientCredentialsGrant")}
{t("oidcRPMetaDataOptionsRequestUris")}{t("oidcRPMetaDataOptionsRequestUris")}
{t("oidcRPMetaDataOptionsAuthnLevel")}{t("oidcRPMetaDataOptionsAuthnLevel")}
{t("oidcRPMetaDataOptionsRule")}{t("oidcRPMetaDataOptionsRule")}
{t("oidcRPMetaDataOptionsAccessTokenEncKeyMgtAlg")}{t("oidcRPMetaDataOptionsAccessTokenEncKeyMgtAlg")} @@ -782,7 +830,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsAccessTokenEncContentEncAlg")}{t("oidcRPMetaDataOptionsAccessTokenEncContentEncAlg")} @@ -825,7 +875,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsIdTokenEncKeyMgtAlg")}{t("oidcRPMetaDataOptionsIdTokenEncKeyMgtAlg")} @@ -865,7 +917,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsIdTokenEncContentEncAlg")}{t("oidcRPMetaDataOptionsIdTokenEncContentEncAlg")} @@ -906,7 +960,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsUserInfoEncKeyMgtAlg")}{t("oidcRPMetaDataOptionsUserInfoEncKeyMgtAlg")} @@ -946,7 +1002,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsUserInfoEncContentEncAlg")}{t("oidcRPMetaDataOptionsUserInfoEncContentEncAlg")} @@ -987,7 +1045,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsLogoutEncKeyMgtAlg")}{t("oidcRPMetaDataOptionsLogoutEncKeyMgtAlg")} @@ -1027,7 +1087,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsLogoutEncContentEncAlg")}{t("oidcRPMetaDataOptionsLogoutEncContentEncAlg")} @@ -1072,7 +1134,9 @@ export function OptionOidc({ name }: { name: string }) { - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + +
{t("oidcRPMetaDataOptionsJwksUri")}{t("oidcRPMetaDataOptionsJwksUri")}
{t("oidcRPMetaDataOptionsAuthorizationCodeExpiration")}{t("oidcRPMetaDataOptionsAuthorizationCodeExpiration")}
{t("oidcRPMetaDataOptionsIDTokenExpiration")}{t("oidcRPMetaDataOptionsIDTokenExpiration")}
{t("oidcRPMetaDataOptionsAccessTokenExpiration")}{t("oidcRPMetaDataOptionsAccessTokenExpiration")}
{t("oidcRPMetaDataOptionsOfflineSessionExpiration")}{t("oidcRPMetaDataOptionsOfflineSessionExpiration")}
{t("oidcRPMetaDataOptionsLogoutBypassConfirm")}{t("oidcRPMetaDataOptionsLogoutBypassConfirm")}
{t("oidcRPMetaDataOptionsLogoutSessionRequired")}{t("oidcRPMetaDataOptionsLogoutSessionRequired")}
{t("oidcRPMetaDataOptionsLogoutType")}{t("oidcRPMetaDataOptionsLogoutType")} @@ -1414,7 +1492,9 @@ export function OptionOidc({ name }: { name: string }) {
{t("oidcRPMetaDataOptionsLogoutUrl")}{t("oidcRPMetaDataOptionsLogoutUrl")}
{t("oidcRPMetaDataOptionsPostLogoutRedirectUris")}{t("oidcRPMetaDataOptionsPostLogoutRedirectUris")} @@ -45,7 +48,9 @@ export function OptionSaml({ name }: { name: string }) { - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + + - + {definitions.test}}> + +
{t("samlSPMetaDataOptionsNameIDFormat")}{t("samlSPMetaDataOptionsNameIDFormat")} @@ -79,7 +84,9 @@ export function OptionSaml({ name }: { name: string }) {
{t("samlSPMetaDataOptionsNameIDSessionKey")}{t("samlSPMetaDataOptionsNameIDSessionKey")}
{t("samlSPMetaDataOptionsOneTimeUse")}{t("samlSPMetaDataOptionsOneTimeUse")}
{t("samlSPMetaDataOptionsSessionNotOnOrAfterTimeout")}{t("samlSPMetaDataOptionsSessionNotOnOrAfterTimeout")}
{t("samlSPMetaDataOptionsNotOnOrAfterTimeout")}{t("samlSPMetaDataOptionsNotOnOrAfterTimeout")}
{t("samlSPMetaDataOptionsForceUTF8")}{t("samlSPMetaDataOptionsForceUTF8")}
{t("samlSPMetaDataOptionsSignatureMethod")}{t("samlSPMetaDataOptionsSignatureMethod")} @@ -254,7 +271,9 @@ export function OptionSaml({ name }: { name: string }) {
{t("samlSPMetaDataOptionsSignSSOMessage")}{t("samlSPMetaDataOptionsSignSSOMessage")}
{t("samlSPMetaDataOptionsCheckSSOMessageSignature")}{t("samlSPMetaDataOptionsCheckSSOMessageSignature")}
{t("samlSPMetaDataOptionsSignatureMethod")}{t("samlSPMetaDataOptionsSignatureMethod")} @@ -351,7 +374,9 @@ export function OptionSaml({ name }: { name: string }) {
{t("samlSPMetaDataOptionsSignSLOMessage")}{t("samlSPMetaDataOptionsSignSLOMessage")}
{t("samlSPMetaDataOptionsCheckSLOMessageSignature")}{t("samlSPMetaDataOptionsCheckSLOMessageSignature")}
{t("samlSPMetaDataOptionsEncryptionMode")}{t("samlSPMetaDataOptionsEncryptionMode")} @@ -459,7 +488,9 @@ export function OptionSaml({ name }: { name: string }) {
{t("samlSPMetaDataOptionsEnableIDPInitiatedURL")}{t("samlSPMetaDataOptionsEnableIDPInitiatedURL")}
{t("samlSPMetaDataOptionsAuthnLevel")}{t("samlSPMetaDataOptionsAuthnLevel")}
{t("samlSPMetaDataOptionsRule")}{t("samlSPMetaDataOptionsRule")}
{t("samlSPMetaDataOptionsFederationEntityID")}{t("samlSPMetaDataOptionsFederationEntityID")}
{t("samlSPMetaDataOptionsFederationOptionalAttributes")} + {t("samlSPMetaDataOptionsFederationOptionalAttributes")} + @@ -605,7 +646,11 @@ export function OptionSaml({ name }: { name: string }) {
{t("samlSPMetaDataOptionsFederationRequiredAttributes")} + {t("samlSPMetaDataOptionsFederationRequiredAttributes")} + diff --git a/src/components/applicationsComponents/SAMLApp.tsx b/src/components/applicationsComponents/SAMLApp.tsx index 28059d6..7e17b25 100644 --- a/src/components/applicationsComponents/SAMLApp.tsx +++ b/src/components/applicationsComponents/SAMLApp.tsx @@ -27,7 +27,11 @@ import { Select, TextField, styled, + Tooltip, } from "@mui/material"; +import Markdown from "markdown-to-jsx"; +import definitions from "../../static/definitions.json"; + import AddCircleIcon from "@mui/icons-material/AddCircle"; import RemoveCircleIcon from "@mui/icons-material/RemoveCircle"; @@ -337,11 +341,21 @@ export function SAMLApp({ name }: { name: string }) { - - - - - + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + + + {definitions.test}}> + +
{t("variableName")}{t("attributeName")}{t("friendlyName")}{t("mandatory")}{t("format")}{t("variableName")}{t("attributeName")}{t("friendlyName")}{t("mandatory")}{t("format")}