Skip to content

Commit

Permalink
[#6] added tooltip for help on parametters + added file to complete w…
Browse files Browse the repository at this point in the history
…ith defs
  • Loading branch information
Eriikah committed May 20, 2024
1 parent 889a059 commit bd3420f
Show file tree
Hide file tree
Showing 9 changed files with 467 additions and 138 deletions.
53 changes: 43 additions & 10 deletions src/components/applicationsComponents/CasApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down Expand Up @@ -67,8 +70,16 @@ export function CasApp({ name }: { name: string }) {
<table id="exportedVars">
<thead>
<tr>
<th>{t("keys")}</th>
<th>{t("values")}</th>
<th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("keys")}</th>
</Tooltip>
</th>
<th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("values")}</th>
</Tooltip>
</th>
<th>
<Button
className="plus"
Expand Down Expand Up @@ -103,8 +114,16 @@ export function CasApp({ name }: { name: string }) {
<table id="macros">
<thead>
<tr>
<th>{t("keys")}</th>
<th>{t("values")}</th>
<th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("keys")}</th>
</Tooltip>
</th>
<th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("values")}</th>
</Tooltip>
</th>
<th>
<Button
className="plus"
Expand Down Expand Up @@ -138,7 +157,11 @@ export function CasApp({ name }: { name: string }) {
<table>
<tbody>
<tr>
<th>{t("casAppMetaDataOptionsDisplayName")}</th>
<th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("casAppMetaDataOptionsDisplayName")}</th>
</Tooltip>
</th>
<td>
<TextField
size="small"
Expand All @@ -164,7 +187,9 @@ export function CasApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("casAppMetaDataOptionsService")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("casAppMetaDataOptionsService")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand All @@ -190,7 +215,9 @@ export function CasApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("casAppMetaDataOptionsLogout")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("casAppMetaDataOptionsLogout")}</th>
</Tooltip>
<td>
<FormControl>
<RadioGroup
Expand Down Expand Up @@ -228,7 +255,9 @@ export function CasApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("casAppMetaDataOptionsAuthnLevel")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("casAppMetaDataOptionsAuthnLevel")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand All @@ -254,7 +283,9 @@ export function CasApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("casAppMetaDataOptionsRule")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("casAppMetaDataOptionsRule")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand All @@ -280,7 +311,9 @@ export function CasApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("casAppMetaDataOptionsComment")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("casAppMetaDataOptionsComment")}</th>
</Tooltip>
<td>
<TextField
variant="filled"
Expand Down
115 changes: 89 additions & 26 deletions src/components/applicationsComponents/NativeApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ import {
RadioGroup,
Select,
TextField,
Tooltip,
} from "@mui/material";
import RemoveCircleIcon from "@mui/icons-material/RemoveCircle";
import Markdown from "markdown-to-jsx";
import definitions from "../../static/definitions.json";
function updateRules(tableID: string) {
const ruleList = [];

Expand Down Expand Up @@ -201,7 +204,9 @@ function NativeRule(appName: string, locationRules: Record<string, string>) {
);
})}
<tr>
<th>{t("defaultRule")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("defaultRule")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand Down Expand Up @@ -422,13 +427,31 @@ export function NativeApp({ name }: { name: string }) {
<table>
<tbody>
<tr>
<th>{t("vhostComment")}</th>
<th>{t("regexp")}</th>
<th>{t("rules")}</th>
<th>{t("rulesAuthnLevel")}</th>
<th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("vhostComment")}</th>
</Tooltip>
</th>
<th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("regexp")}</th>
</Tooltip>
</th>
<th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("rules")}</th>
</Tooltip>
</th>
<th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("rulesAuthnLevel")}</th>
</Tooltip>
</th>
</tr>
<tr>
<th>{t("defaultRule")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("defaultRule")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand Down Expand Up @@ -476,7 +499,9 @@ export function NativeApp({ name }: { name: string }) {
<table>
<tbody>
<tr>
<th>{t("maintenance")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("maintenance")}</th>
</Tooltip>
<td>
<FormControl>
<RadioGroup
Expand Down Expand Up @@ -519,10 +544,18 @@ export function NativeApp({ name }: { name: string }) {
<table id="locationRules">
<thead>
<tr>
<th>{t("vhostComment")}</th>
<th>{t("regexp")}</th>
<th>{t("rules")}</th>
<th>{t("rulesAuthnLevel")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("vhostComment")}</th>
</Tooltip>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("regexp")}</th>
</Tooltip>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("rules")}</th>
</Tooltip>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("rulesAuthnLevel")}</th>
</Tooltip>
<th>
<Button
className="plus"
Expand All @@ -546,8 +579,12 @@ export function NativeApp({ name }: { name: string }) {
<table id="exportedHeaders">
<thead>
<tr>
<th>{t("keys")}</th>
<th>{t("values")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("keys")}</th>
</Tooltip>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("values")}</th>
</Tooltip>
<th>
<Button
className="plus"
Expand Down Expand Up @@ -582,11 +619,21 @@ export function NativeApp({ name }: { name: string }) {
<table id="post">
<thead>
<tr>
<th>{t("postUrl")}</th>
<th>{t("postTargetUrl")}</th>
<th>{t("jqueryUrl")}</th>
<th>{t("jqueryFormSelector")}</th>
<th>{t("jqueryButtonSelector")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("postUrl")}</th>
</Tooltip>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("postTargetUrl")}</th>
</Tooltip>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("jqueryUrl")}</th>
</Tooltip>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("jqueryFormSelector")}</th>
</Tooltip>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("jqueryButtonSelector")}</th>
</Tooltip>
<th>
<Button
className="plus"
Expand Down Expand Up @@ -614,7 +661,9 @@ export function NativeApp({ name }: { name: string }) {
<table>
<tbody>
<tr>
<th>{t("port")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("port")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand All @@ -640,7 +689,9 @@ export function NativeApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("vhostHttps")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("vhostHttps")}</th>
</Tooltip>
<td>
<FormControl>
<RadioGroup
Expand Down Expand Up @@ -680,7 +731,9 @@ export function NativeApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("maintenance")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("maintenance")}</th>
</Tooltip>
<td>
<FormControl>
<RadioGroup
Expand Down Expand Up @@ -711,7 +764,9 @@ export function NativeApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("vhostAliases")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("vhostAliases")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand All @@ -737,7 +792,9 @@ export function NativeApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("vhostAccessToTrace")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("vhostAccessToTrace")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand All @@ -763,7 +820,9 @@ export function NativeApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("vhostType")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("vhostType")}</th>
</Tooltip>
<td>
<FormControl sx={{ m: 1, minWidth: 120 }}>
<InputLabel>{t("vhostType")}</InputLabel>
Expand Down Expand Up @@ -796,7 +855,9 @@ export function NativeApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("vhostAuthnLevel")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("vhostAuthnLevel")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand All @@ -818,7 +879,9 @@ export function NativeApp({ name }: { name: string }) {
</td>
</tr>
<tr>
<th>{t("vhostServiceTokenTTL")}</th>
<Tooltip title={<Markdown>{definitions.test}</Markdown>}>
<th>{t("vhostServiceTokenTTL")}</th>
</Tooltip>
<td>
<TextField
size="small"
Expand Down
Loading

0 comments on commit bd3420f

Please sign in to comment.