master
Tudor Stanciu 2021-04-17 14:07:53 +03:00
parent e9c7bacb06
commit 8250f361df
3 changed files with 10 additions and 5 deletions

4
.env
View File

@ -2,4 +2,6 @@
REACT_APP_IDENTITY_AUTHENTICATION_URL=https://toodle.ddns.net/identity-server-api/identity/authenticate?UserName={username}&Password={password}
REACT_APP_NETWORK_RESURRECTOR_API_URL=http://localhost:5064
REACT_APP_NETWORK_RESURRECTOR_SERVER_URL=http://localhost:5062
#REACT_APP_NETWORK_RESURRECTOR_SERVER_URL=http://localhost:5062
REACT_APP_NETWORK_RESURRECTOR_SERVER_URL=https://toodle.ddns.net/network-resurrector-api

View File

@ -1,4 +1,4 @@
import { get } from "../../utils/axios";
import { get, post } from "../../utils/axios";
const apiUrl = `${process.env.REACT_APP_NETWORK_RESURRECTOR_API_URL}/network`;
const serverUrl = `${process.env.REACT_APP_NETWORK_RESURRECTOR_SERVER_URL}/resurrector`;
@ -9,12 +9,12 @@ const readMachines = () => {
};
const wakeMachine = macAddress => {
const promise = get(`${serverUrl}/wake`, { macAddress });
const promise = post(`${serverUrl}/wake`, { macAddress });
return promise;
};
const pingMachine = ipAddressOrMachineName => {
const promise = get(`${serverUrl}/ping`, { ipAddressOrMachineName });
const promise = post(`${serverUrl}/ping`, { ipAddressOrMachineName });
return promise;
};

View File

@ -45,7 +45,10 @@ const MachineItem = ({ machine, actions }) => {
<TableCell align="right">
<>
{actions.map(action => (
<Tooltip title={t(action.tooltip)}>
<Tooltip
title={t(action.tooltip)}
key={`machine-item-${machine.machineId}-${action.code}-tooltip`}
>
<span>
<IconButton
id={`machine-item-${machine.machineId}-${action.code}`}