Make seppuku command trigger frontend reload

This commit is contained in:
Kristóf Tóth 2018-04-20 14:51:08 +02:00
parent 41d6fa7417
commit 31c1391726
1 changed files with 6 additions and 5 deletions

View File

@ -37,11 +37,12 @@ class TestCommands(TerminalCommands):
def command_seppuku_tfw(self, *args):
seppuku = ('nohup sh -c "supervisorctl restart tfwserver event_handler_main" &> /dev/null & '
'clear && echo "Committed seppuku! :)" && sleep infinity')
TFWServerConnector().send_to_eventhandler({
'key': 'shell',
'data': {'command': 'write',
'shellcmd': f'{seppuku}\n'}
})
uplink = TFWServerConnector()
uplink.send_to_eventhandler({'key': 'shell',
'data': {'command': 'write',
'shellcmd': f'{seppuku}\n'}})
uplink.send({'key': 'dashboard',
'data' :{'command': 'reload_frontend'}})
def command_changelayout(self, *args):
message = {'key': 'dashboard',