server card update

master
Tudor Stanciu 2020-05-19 02:27:05 +03:00
parent 7620fbfb6c
commit 590f229f58
4 changed files with 22 additions and 6 deletions

View File

@ -52,6 +52,9 @@
"Version": "Version" "Version": "Version"
}, },
"Server": { "Server": {
"Title": "Server",
"Host": "Host",
"ServerHostName": "Server host",
"ApiHostName": "API host", "ApiHostName": "API host",
"Domain": "Domain", "Domain": "Domain",
"ActiveSession": "Active session", "ActiveSession": "Active session",

View File

@ -43,6 +43,9 @@
"Version": "Versiune" "Version": "Versiune"
}, },
"Server": { "Server": {
"Title": "Server",
"Host": "Gazdă",
"ServerHostName": "Gazdă server",
"ApiHostName": "Gazdă API", "ApiHostName": "Gazdă API",
"Domain": "Domeniu", "Domain": "Domeniu",
"ActiveSession": "Sesiune activă", "ActiveSession": "Sesiune activă",

View File

@ -17,11 +17,14 @@ import MoreVertIcon from "@material-ui/icons/MoreVert";
import DnsRoundedIcon from "@material-ui/icons/DnsRounded"; import DnsRoundedIcon from "@material-ui/icons/DnsRounded";
import styles from "../../../components/common/styles/expandableCardStyles"; import styles from "../../../components/common/styles/expandableCardStyles";
import ServerSummary from "./ServerSummary"; import ServerSummary from "./ServerSummary";
import { useTranslation } from "react-i18next";
const useStyles = makeStyles(styles); const useStyles = makeStyles(styles);
const ServerComponent = ({ data }) => { const ServerComponent = ({ data }) => {
const classes = useStyles(); const classes = useStyles();
const { t } = useTranslation();
const [expanded, setExpanded] = React.useState(false); const [expanded, setExpanded] = React.useState(false);
const handleExpandClick = () => { const handleExpandClick = () => {
@ -41,8 +44,10 @@ const ServerComponent = ({ data }) => {
<MoreVertIcon /> <MoreVertIcon />
</IconButton> </IconButton>
} }
title={<strong>Server</strong>} title={<strong>{t("Server.Title")}</strong>}
subheader="Host: StaWebSrv" subheader={`${t("Server.Host")}: ${
data.hosts ? data.hosts.server : ""
}`}
/> />
<CardContent>{data.loaded && <ServerSummary data={data} />}</CardContent> <CardContent>{data.loaded && <ServerSummary data={data} />}</CardContent>
<CardActions disableSpacing> <CardActions disableSpacing>

View File

@ -14,13 +14,18 @@ const ServerSummary = ({ data }) => {
return ( return (
<Grid container> <Grid container>
<Grid item xs={12} sm={4} md={4}> <Grid item xs={12} sm={4} md={4}>
{`${t("Server.ApiHostName")}: `} {`${t("Server.Domain")}: `}
<span className={classes.value}>{data.hosts.api}</span> <span className={classes.value}>{data.domain}</span>
</Grid> </Grid>
<Grid item xs={12} sm={4} md={4}> <Grid item xs={12} sm={4} md={4}>
{`${t("Server.Domain")}: `} {`${t("Server.ServerHostName")}: `}
<span className={classes.value}>{data.domain}</span> <span className={classes.value}>{data.hosts.server}</span>
</Grid>
<Grid item xs={12} sm={4} md={4}>
{`${t("Server.ApiHostName")}: `}
<span className={classes.value}>{data.hosts.api}</span>
</Grid> </Grid>
</Grid> </Grid>
); );