oops
This commit is contained in:
16
src/components/WolButton.js
Normal file
16
src/components/WolButton.js
Normal file
@@ -0,0 +1,16 @@
|
||||
function WolButton(props) {
|
||||
return (
|
||||
<div className="wake"><input type="button" id="wolbutton" onClick={runWakeCommand}></input>
|
||||
<label htmlFor="wolbutton"><span className="iconify" data-icon="mdi-monitor"></span></label></div>
|
||||
);
|
||||
}
|
||||
|
||||
export default WolButton;
|
||||
|
||||
function runWakeCommand() {
|
||||
const requestOptions = {
|
||||
method: 'GET',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
};
|
||||
fetch("/sui/api/wakeDakota", requestOptions)
|
||||
}
|
||||
Reference in New Issue
Block a user