Add new reboot option and restart lamassu-browser

This commit is contained in:
Rafael Taranto 2019-07-16 12:00:16 +01:00 committed by Josh Harvey
parent 371454b6d4
commit 9f8693a33e
6 changed files with 89 additions and 5 deletions

View file

@ -71,3 +71,9 @@ encodeAction action =
[ ( "action", E.string "reboot" )
, ( "deviceId", E.string machine.deviceId )
]
RestartServices machine ->
E.object
[ ( "action", E.string "restartServices" )
, ( "deviceId", E.string machine.deviceId )
]

View file

@ -33,6 +33,7 @@ type MachineAction
= ResetCashOutBills Machine
| UnpairMachine Machine
| RebootMachine Machine
| RestartServices Machine
type Msg

View file

@ -36,7 +36,9 @@ rowView machine =
[ td []
[ button [ class [ C.TableButton ], onClick (Submit (UnpairMachine machine)) ] [ text "Unpair" ] ]
, td []
[ button [ class [ C.TableButton ], onClick (Submit (RebootMachine machine)) ] [ text "Reboot" ] ]
[ button [ class [ C.TableButton ], onClick (Submit (RebootMachine machine)) ] [ text "Reboot OS" ] ]
, td []
[ button [ class [ C.TableButton ], onClick (Submit (RestartServices machine)) ] [ text "Restart Services" ] ]
, resetBills
]