translations
parent
1ed2ff01ee
commit
e3dc3dc18b
|
@ -27,5 +27,14 @@
|
||||||
"IncorrectCredentials": "Incorrect credentials.",
|
"IncorrectCredentials": "Incorrect credentials.",
|
||||||
"Hello": "Hi, {{username}}",
|
"Hello": "Hi, {{username}}",
|
||||||
"AuthenticationDate": "Authentication date"
|
"AuthenticationDate": "Authentication date"
|
||||||
|
},
|
||||||
|
"Machine": {
|
||||||
|
"FullName": "Full machine name",
|
||||||
|
"Name": "Machine name",
|
||||||
|
"IP": "IP",
|
||||||
|
"Actions": {
|
||||||
|
"Wake": "Wake",
|
||||||
|
"Ping": "Ping"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,5 +18,14 @@
|
||||||
"IncorrectCredentials": "Credențiale incorecte.",
|
"IncorrectCredentials": "Credențiale incorecte.",
|
||||||
"Hello": "Salut, {{username}}",
|
"Hello": "Salut, {{username}}",
|
||||||
"AuthenticationDate": "Momentul autentificării"
|
"AuthenticationDate": "Momentul autentificării"
|
||||||
|
},
|
||||||
|
"Machine": {
|
||||||
|
"FullName": "Nume intreg masina",
|
||||||
|
"Name": "Nume masina",
|
||||||
|
"IP": "IP",
|
||||||
|
"Actions": {
|
||||||
|
"Wake": "Pornește",
|
||||||
|
"Ping": "Ping"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ import {
|
||||||
import { KeyboardArrowDown, KeyboardArrowUp } from "@material-ui/icons";
|
import { KeyboardArrowDown, KeyboardArrowUp } from "@material-ui/icons";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import MachineLog from "./MachineLog";
|
import MachineLog from "./MachineLog";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
|
|
||||||
const useRowStyles = makeStyles({
|
const useRowStyles = makeStyles({
|
||||||
root: {
|
root: {
|
||||||
|
@ -23,7 +22,6 @@ const useRowStyles = makeStyles({
|
||||||
const Machine = ({ machine, actions, logs }) => {
|
const Machine = ({ machine, actions, logs }) => {
|
||||||
const [open, setOpen] = React.useState(false);
|
const [open, setOpen] = React.useState(false);
|
||||||
const classes = useRowStyles();
|
const classes = useRowStyles();
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
@ -46,7 +44,7 @@ const Machine = ({ machine, actions, logs }) => {
|
||||||
<>
|
<>
|
||||||
{actions.map(action => (
|
{actions.map(action => (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={t(action.tooltip)}
|
title={action.tooltip}
|
||||||
key={`machine-item-${machine.machineId}-${action.code}-tooltip`}
|
key={`machine-item-${machine.machineId}-${action.code}-tooltip`}
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
|
|
@ -4,10 +4,12 @@ import Machine from "./Machine";
|
||||||
import * as api from "../api";
|
import * as api from "../api";
|
||||||
import { useToast } from "../../../hooks";
|
import { useToast } from "../../../hooks";
|
||||||
import { PowerSettingsNew, LastPage } from "@material-ui/icons";
|
import { PowerSettingsNew, LastPage } from "@material-ui/icons";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const MachineContainer = ({ machine }) => {
|
const MachineContainer = ({ machine }) => {
|
||||||
const [logs, setLogs] = useState([]);
|
const [logs, setLogs] = useState([]);
|
||||||
const { success, error } = useToast();
|
const { success, error } = useToast();
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const addLog = text => {
|
const addLog = text => {
|
||||||
setLogs(prev => [...prev, text]);
|
setLogs(prev => [...prev, text]);
|
||||||
|
@ -40,13 +42,13 @@ const MachineContainer = ({ machine }) => {
|
||||||
code: "wake",
|
code: "wake",
|
||||||
effect: wakeMachine,
|
effect: wakeMachine,
|
||||||
icon: PowerSettingsNew,
|
icon: PowerSettingsNew,
|
||||||
tooltip: "Wake"
|
tooltip: t("Machine.Actions.Wake")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: "ping",
|
code: "ping",
|
||||||
effect: pingMachine,
|
effect: pingMachine,
|
||||||
icon: LastPage,
|
icon: LastPage,
|
||||||
tooltip: "Ping"
|
tooltip: t("Machine.Actions.Ping")
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -10,17 +10,19 @@ import {
|
||||||
} from "@material-ui/core";
|
} from "@material-ui/core";
|
||||||
import Paper from "@material-ui/core/Paper";
|
import Paper from "@material-ui/core/Paper";
|
||||||
import MachineContainer from "./MachineContainer";
|
import MachineContainer from "./MachineContainer";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const MachinesList = ({ dense, machines, actions }) => {
|
const MachinesList = ({ dense, machines }) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<TableContainer component={Paper}>
|
<TableContainer component={Paper}>
|
||||||
<Table aria-label="collapsible table" size={dense ? "small" : "medium"}>
|
<Table aria-label="collapsible table" size={dense ? "small" : "medium"}>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell />
|
<TableCell />
|
||||||
<TableCell>Full machine name</TableCell>
|
<TableCell>{t("Machine.FullName")}</TableCell>
|
||||||
<TableCell>Machine name</TableCell>
|
<TableCell>{t("Machine.Name")}</TableCell>
|
||||||
<TableCell>IP</TableCell>
|
<TableCell>{t("Machine.IP")}</TableCell>
|
||||||
<TableCell align="right" />
|
<TableCell align="right" />
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
|
|
Loading…
Reference in New Issue