diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json
index a70e2bf..869baed 100644
--- a/public/locales/en/translations.json
+++ b/public/locales/en/translations.json
@@ -53,7 +53,7 @@
},
"Server": {
"Title": "Server",
- "Host": "Host",
+ "Subtitle": "Expand to see details",
"ServerHostName": "Server host",
"ApiHostName": "API host",
"Domain": "Domain",
diff --git a/public/locales/ro/translations.json b/public/locales/ro/translations.json
index 1e0b036..e428969 100644
--- a/public/locales/ro/translations.json
+++ b/public/locales/ro/translations.json
@@ -44,7 +44,7 @@
},
"Server": {
"Title": "Server",
- "Host": "Gazdă",
+ "Subtitle": "Extindeţi pentru a vedea detalii",
"ServerHostName": "Gazdă server",
"ApiHostName": "Gazdă API",
"Domain": "Domeniu",
diff --git a/src/features/server/components/ServerComponent.js b/src/features/server/components/ServerComponent.js
index c45d9af..b06087f 100644
--- a/src/features/server/components/ServerComponent.js
+++ b/src/features/server/components/ServerComponent.js
@@ -23,7 +23,7 @@ import { useTranslation } from "react-i18next";
const useStyles = makeStyles(styles);
-const ServerComponent = ({ data, openAbout }) => {
+const ServerComponent = ({ data, serverHost, openAbout }) => {
const classes = useStyles();
const { t } = useTranslation();
@@ -47,12 +47,16 @@ const ServerComponent = ({ data, openAbout }) => {
}
title={{t("Server.Title")}}
- subheader={`${t("Server.Host")}: ${
- data.hosts ? data.hosts.server : ""
- }`}
+ subheader={t("Server.Subtitle")}
/>
- {data.loaded && }
+ {data.loaded && (
+
+ )}
@@ -109,6 +113,7 @@ const ServerComponent = ({ data, openAbout }) => {
ServerComponent.propTypes = {
data: PropTypes.object.isRequired,
+ serverHost: PropTypes.string,
openAbout: PropTypes.func.isRequired
};
diff --git a/src/features/server/components/ServerContainer.js b/src/features/server/components/ServerContainer.js
index b0fb6e2..ec13b00 100644
--- a/src/features/server/components/ServerContainer.js
+++ b/src/features/server/components/ServerContainer.js
@@ -6,7 +6,7 @@ import { loadServerData, loadSystemVersion } from "../actionCreators";
import ServerComponent from "./ServerComponent";
import { withRouter } from "react-router-dom";
-const ServerContainer = ({ actions, data, history }) => {
+const ServerContainer = ({ actions, data, serverHost, history }) => {
useEffect(() => {
actions.loadServerData();
actions.loadSystemVersion();
@@ -17,18 +17,26 @@ const ServerContainer = ({ actions, data, history }) => {
event.preventDefault();
};
- return ;
+ return (
+
+ );
};
ServerContainer.propTypes = {
actions: PropTypes.object.isRequired,
data: PropTypes.object.isRequired,
- history: PropTypes.object.isRequired
+ history: PropTypes.object.isRequired,
+ serverHost: PropTypes.string
};
function mapStateToProps(state) {
return {
- data: state.server.data
+ data: state.server.data,
+ serverHost: state.server.activeSession.hostName
};
}
diff --git a/src/features/server/components/ServerSummary.js b/src/features/server/components/ServerSummary.js
index 50dd682..581c0d1 100644
--- a/src/features/server/components/ServerSummary.js
+++ b/src/features/server/components/ServerSummary.js
@@ -7,7 +7,7 @@ import styles from "../../../components/common/styles/gridStyles";
const useStyles = makeStyles(styles);
-const ServerSummary = ({ data, openAbout }) => {
+const ServerSummary = ({ data, serverHost, openAbout }) => {
const classes = useStyles();
const { t } = useTranslation();
@@ -20,7 +20,7 @@ const ServerSummary = ({ data, openAbout }) => {
{`${t("Server.ServerHostName")}: `}
- {data.hosts.server}
+ {serverHost || ""}
@@ -46,6 +46,7 @@ const ServerSummary = ({ data, openAbout }) => {
ServerSummary.propTypes = {
data: PropTypes.object.isRequired,
+ serverHost: PropTypes.string,
openAbout: PropTypes.func.isRequired
};