From 4d186982ce9fb907d9d25006dc7646e14e589d32 Mon Sep 17 00:00:00 2001 From: Bjoern Gruening Date: Wed, 8 Jun 2016 11:55:50 +0200 Subject: [PATCH] fix a few bugs, we should now be back to buisness --- scripts/communication/communication_server.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/communication/communication_server.py b/scripts/communication/communication_server.py index 7c2fd8492c6..a7384280a93 100755 --- a/scripts/communication/communication_server.py +++ b/scripts/communication/communication_server.py @@ -13,9 +13,10 @@ pip install flask flask-login flask-socketio eventlet # install the requiremen As a next step start the communication server with something like this: -./scripts/communication_server.py --port 7070 --host localhost +./scripts/communication/communication_server.py --port 7070 --host localhost -Please make sure the host and the port matches the ones on config/galaxy.ini +Please make sure the host and the port matches the ones on config/galaxy.ini and +set the "secret_id". The communication server feature of Galaxy can be controlled on three different levels: 1. Admin can activate/deactivate communication (config/galaxy.ini) @@ -64,7 +65,7 @@ id_secret = app_properties.get('id_secret', 'dangerous_default') security_helper = SecurityHelper(id_secret=id_secret) # And get access to the models -# Login manager to manager current_user functionality +# Login manager to manage current_user functionality login_manager = flask_login.LoginManager() app = Flask(__name__) @@ -130,7 +131,7 @@ def crossdomain(origin=None, methods=None, headers=None, return decorator script_dir = os.path.dirname(os.path.realpath( __file__)) -communication_directory = os.path.join( script_dir, 'communication', 'template' ) +communication_directory = os.path.join( script_dir, 'template' ) @app.route('/') @crossdomain(origin='*') @@ -164,13 +165,13 @@ def event_broadcast(message): @socketio.on('event room', namespace='/chat') def send_room_message(message): - message = sanitize_html(message['data']) + data = sanitize_html(message['data']) room = sanitize_html(message['room']) log.debug("%s sent '%s' to %s" % (current_user.username, message, room)) emit('event response room', - {'data': message, 'user': current_user.username, 'chatroom': room}, room=room) + {'data': data, 'user': current_user.username, 'chatroom': room}, room=room) @socketio.on('event disconnect', namespace='/chat')