diff --git a/new-lamassu-admin/src/pages/Maintenance/MachineDetailsCard.js b/new-lamassu-admin/src/pages/Maintenance/MachineDetailsCard.js index d04dc8fa..f755dd3f 100644 --- a/new-lamassu-admin/src/pages/Maintenance/MachineDetailsCard.js +++ b/new-lamassu-admin/src/pages/Maintenance/MachineDetailsCard.js @@ -128,19 +128,19 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess }) => { /> { setErrorMessage(null) machineAction({ variables: { deviceId: machine.deviceId, - action: `${action?.command}`.toLowerCase(), - ...(action?.command === 'Rename' && { newName: value }) + action: `${action?.command}`, + ...(action?.command === 'rename' && { newName: value }) } }) }} @@ -174,7 +174,8 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess }) => { InverseIcon={EditReversedIcon} onClick={() => setAction({ - command: 'Rename', + command: 'rename', + humanReadable: 'Rename', confirmationMessage: 'Write the new name for this machine' }) }> @@ -188,7 +189,8 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess }) => { disabled={loading} onClick={() => setAction({ - command: 'Unpair' + command: 'unpair', + humanReadable: 'Unpair' }) }> Unpair @@ -201,26 +203,42 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess }) => { disabled={loading} onClick={() => setAction({ - command: 'Reboot' + command: 'reboot', + humanReadable: 'Reboot' }) }> Reboot setAction({ - command: 'Shutdown', + command: 'shutdown', + humanReadable: 'Shutdown', message: 'In order to bring it back online, the machine will need to be visited and its power reset.' }) }> Shutdown + + setAction({ + command: 'restartServices', + humanReadable: 'Restart services for' + }) + }> + Restart Services +