diff --git a/jumpserver/views.py b/jumpserver/views.py index afe5ddd38..b95c314b4 100644 --- a/jumpserver/views.py +++ b/jumpserver/views.py @@ -356,7 +356,7 @@ def web_terminal(request): if asset: print asset hostname = asset.hostname - web_terminal_uri = '%s/terminal?id=%s&role=%s' % (WEB_SOCKET_HOST, asset_id, role_name) + web_terminal_uri = '%s/ws/terminal?id=%s&role=%s' % (WEB_SOCKET_HOST, asset_id, role_name) return render_to_response('jlog/web_terminal.html', locals()) diff --git a/run_websocket.py b/run_websocket.py index 2c761ee50..0f758b947 100755 --- a/run_websocket.py +++ b/run_websocket.py @@ -439,8 +439,8 @@ def main(): } tornado_app = tornado.web.Application( [ - # (r'/monitor', MonitorHandler), - (r'/terminal', WebTerminalHandler), + (r'/monitor', MonitorHandler), + (r'/ws/terminal', WebTerminalHandler), (r'/kill', WebTerminalKillHandler), (r'/exec', ExecHandler), (r"/static/(.*)", tornado.web.StaticFileHandler,