mirror of
https://dev.azure.com/tstanciu94/ReverseProxy/_git/ReverseProxy_Frontend
synced 2025-08-05 17:22:36 +03:00
Add IsChainMember feature with tooltip to ServerSummary and update translations
This commit is contained in:
parent
60218fe5ad
commit
8bb8ae6d22
@ -138,6 +138,8 @@
|
|||||||
"Wizard": "wizard",
|
"Wizard": "wizard",
|
||||||
"HostName": "Server host",
|
"HostName": "Server host",
|
||||||
"SessionsCount": "Sessions count",
|
"SessionsCount": "Sessions count",
|
||||||
|
"IsChainMember": "Is chain member",
|
||||||
|
"IsChainMemberTooltip": "If the proxy is a chain member, it runs behind another proxy; if it isn't, it’s the first or only proxy receiving the request.",
|
||||||
"Domain": "Domain",
|
"Domain": "Domain",
|
||||||
"ActiveSession": "Active session",
|
"ActiveSession": "Active session",
|
||||||
"ActiveSessionSubtitle": "Expand to see forwards",
|
"ActiveSessionSubtitle": "Expand to see forwards",
|
||||||
|
@ -129,6 +129,8 @@
|
|||||||
"Wizard": "vrăjitor",
|
"Wizard": "vrăjitor",
|
||||||
"HostName": "Gazdă server",
|
"HostName": "Gazdă server",
|
||||||
"SessionsCount": "Număr sesiuni",
|
"SessionsCount": "Număr sesiuni",
|
||||||
|
"IsChainMember": "Este membru al unui lanț",
|
||||||
|
"IsChainMemberTooltip": "Dacă proxy-ul este membru al lanțului, acesta rulează în spatele unui alt proxy; dacă nu este, este primul sau singurul proxy care primește cererea.",
|
||||||
"Domain": "Domeniu",
|
"Domain": "Domeniu",
|
||||||
"ActiveSession": "Sesiune activă",
|
"ActiveSession": "Sesiune activă",
|
||||||
"ActiveSessionSubtitle": "Extindeţi pentru a vedea redirectările",
|
"ActiveSessionSubtitle": "Extindeţi pentru a vedea redirectările",
|
||||||
|
@ -3,7 +3,7 @@ import PropTypes from "prop-types";
|
|||||||
import { CheckCircleOutlineRounded, RemoveRounded } from "@material-ui/icons";
|
import { CheckCircleOutlineRounded, RemoveRounded } from "@material-ui/icons";
|
||||||
import { LinearProgress, Grid } from "@material-ui/core";
|
import { LinearProgress, Grid } from "@material-ui/core";
|
||||||
|
|
||||||
const ActiveIcon = ({ active, loading }) => {
|
const ActiveIcon = ({ active, loading, color }) => {
|
||||||
if (loading && loading === true) {
|
if (loading && loading === true) {
|
||||||
return (
|
return (
|
||||||
<Grid container>
|
<Grid container>
|
||||||
@ -16,8 +16,9 @@ const ActiveIcon = ({ active, loading }) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const circleColor = color || "primary";
|
||||||
return active && active === true ? (
|
return active && active === true ? (
|
||||||
<CheckCircleOutlineRounded color="primary" fontSize="small" />
|
<CheckCircleOutlineRounded color={circleColor} fontSize="small" />
|
||||||
) : (
|
) : (
|
||||||
<RemoveRounded fontSize="small" />
|
<RemoveRounded fontSize="small" />
|
||||||
);
|
);
|
||||||
@ -25,7 +26,8 @@ const ActiveIcon = ({ active, loading }) => {
|
|||||||
|
|
||||||
ActiveIcon.propTypes = {
|
ActiveIcon.propTypes = {
|
||||||
active: PropTypes.bool,
|
active: PropTypes.bool,
|
||||||
loading: PropTypes.bool
|
loading: PropTypes.bool,
|
||||||
|
color: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ActiveIcon;
|
export default ActiveIcon;
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { Grid, Typography, Link } from "@material-ui/core";
|
import { Grid, Typography, Link, Tooltip } from "@material-ui/core";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import styles from "../../../components/common/styles/gridStyles";
|
import styles from "../../../components/common/styles/gridStyles";
|
||||||
|
import ActiveIcon from "../../../components/common/ActiveIcon";
|
||||||
|
|
||||||
const useStyles = makeStyles(styles);
|
const useStyles = makeStyles(styles);
|
||||||
|
|
||||||
@ -18,22 +19,27 @@ const ServerSummary = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid container>
|
<Grid container>
|
||||||
<Grid item xs={6} sm={3} md={3}>
|
<Grid item xs={6} sm={3} md={2}>
|
||||||
{`${t("Server.Domain")}: `}
|
|
||||||
<span className={classes.value}>{data.domain.name}</span>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Grid item xs={6} sm={3} md={3}>
|
|
||||||
{`${t("Server.HostName")}: `}
|
{`${t("Server.HostName")}: `}
|
||||||
<span className={classes.value}>{serverHost || ""}</span>
|
<span className={classes.value}>{serverHost || ""}</span>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Grid item xs={6} sm={3} md={2}>
|
||||||
<Grid item xs={6} sm={3} md={3}>
|
|
||||||
{`${t("Server.SessionsCount")}: `}
|
{`${t("Server.SessionsCount")}: `}
|
||||||
<span className={classes.value}>{data.sessionsCount}</span>
|
<span className={classes.value}>{data.sessionsCount}</span>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Grid item xs={6} sm={3} md={2}>
|
||||||
<Grid item xs={6} sm={3} md={3}>
|
<Tooltip title={t("Server.IsChainMemberTooltip")}>
|
||||||
|
<span>
|
||||||
|
{`${t("Server.IsChainMember")}: `}
|
||||||
|
<ActiveIcon active={data.isChainMember} color="action" />
|
||||||
|
</span>
|
||||||
|
</Tooltip>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={6} sm={3} md={2}>
|
||||||
|
{`${t("Server.Domain")}: `}
|
||||||
|
<span className={classes.value}>{data.domain.name}</span>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={6} sm={3} md={2}>
|
||||||
{`${t("Server.DDNSProvider")}: `}
|
{`${t("Server.DDNSProvider")}: `}
|
||||||
<Link
|
<Link
|
||||||
href="#"
|
href="#"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user