fix
parent
e9c7bacb06
commit
8250f361df
4
.env
4
.env
|
@ -2,4 +2,6 @@
|
||||||
|
|
||||||
REACT_APP_IDENTITY_AUTHENTICATION_URL=https://toodle.ddns.net/identity-server-api/identity/authenticate?UserName={username}&Password={password}
|
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_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
|
|
@ -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 apiUrl = `${process.env.REACT_APP_NETWORK_RESURRECTOR_API_URL}/network`;
|
||||||
const serverUrl = `${process.env.REACT_APP_NETWORK_RESURRECTOR_SERVER_URL}/resurrector`;
|
const serverUrl = `${process.env.REACT_APP_NETWORK_RESURRECTOR_SERVER_URL}/resurrector`;
|
||||||
|
@ -9,12 +9,12 @@ const readMachines = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const wakeMachine = macAddress => {
|
const wakeMachine = macAddress => {
|
||||||
const promise = get(`${serverUrl}/wake`, { macAddress });
|
const promise = post(`${serverUrl}/wake`, { macAddress });
|
||||||
return promise;
|
return promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
const pingMachine = ipAddressOrMachineName => {
|
const pingMachine = ipAddressOrMachineName => {
|
||||||
const promise = get(`${serverUrl}/ping`, { ipAddressOrMachineName });
|
const promise = post(`${serverUrl}/ping`, { ipAddressOrMachineName });
|
||||||
return promise;
|
return promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,10 @@ const MachineItem = ({ machine, actions }) => {
|
||||||
<TableCell align="right">
|
<TableCell align="right">
|
||||||
<>
|
<>
|
||||||
{actions.map(action => (
|
{actions.map(action => (
|
||||||
<Tooltip title={t(action.tooltip)}>
|
<Tooltip
|
||||||
|
title={t(action.tooltip)}
|
||||||
|
key={`machine-item-${machine.machineId}-${action.code}-tooltip`}
|
||||||
|
>
|
||||||
<span>
|
<span>
|
||||||
<IconButton
|
<IconButton
|
||||||
id={`machine-item-${machine.machineId}-${action.code}`}
|
id={`machine-item-${machine.machineId}-${action.code}`}
|
||||||
|
|
Loading…
Reference in New Issue