feat: added shutdown function to the machine loader
feat: created shutdown route and call it from gql server (called from admin UI button) feat: added an extra message property to the ConfirmDialog refactor: simplified the MachineDetailsCard component feat: added an extra information message to the Shutdown machine action
This commit is contained in:
parent
f10b49f31c
commit
3a5bbbca1f
4 changed files with 59 additions and 43 deletions
|
|
@ -111,6 +111,10 @@ function reboot (rec) {
|
|||
return axios.post(`http://localhost:3030/reboot?device_id=${rec.deviceId}`)
|
||||
}
|
||||
|
||||
function shutdown (rec) {
|
||||
return axios.post(`http://localhost:3030/shutdown?device_id=${rec.deviceId}`)
|
||||
}
|
||||
|
||||
function restartServices (rec) {
|
||||
return axios.post(`http://localhost:3030/restartServices?device_id=${rec.deviceId}`)
|
||||
}
|
||||
|
|
@ -122,6 +126,7 @@ function setMachine (rec) {
|
|||
case 'resetCashOutBills': return resetCashOutBills(rec)
|
||||
case 'unpair': return unpair(rec)
|
||||
case 'reboot': return reboot(rec)
|
||||
case 'shutdown': return shutdown(rec)
|
||||
case 'restartServices': return restartServices(rec)
|
||||
default: throw new Error('No such action: ' + rec.action)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue