From 4f64e1c5d38c7eeee24ad02687bd2dfcbab10165 Mon Sep 17 00:00:00 2001 From: Sagi Frimer Date: Tue, 26 Mar 2019 21:05:31 +0200 Subject: [PATCH] Fixed slider bug --- backend/app/handlers/SocketHandler.py | 7 +++++-- chameleon-client/src/App.vue | 2 +- chameleon-client/src/main.js | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/backend/app/handlers/SocketHandler.py b/backend/app/handlers/SocketHandler.py index 2d08d8fa3..cf54b3e00 100644 --- a/backend/app/handlers/SocketHandler.py +++ b/backend/app/handlers/SocketHandler.py @@ -1,15 +1,18 @@ import tornado.websocket import json + class ChameleonWebSocket(tornado.websocket.WebSocketHandler): + def check_origin(self, origin): return True + def open(self): self.write_message(json.dumps( { 'cam1':{ - 'pipeline':1, - 'exposure':12 + 'pipeline': 1, + 'exposure': 12 } } )) diff --git a/chameleon-client/src/App.vue b/chameleon-client/src/App.vue index 535c7abab..1a28d8ed5 100644 --- a/chameleon-client/src/App.vue +++ b/chameleon-client/src/App.vue @@ -58,7 +58,7 @@ this.openedNames = ['']; } else { this.activeName = this.$refs.menu.currentActiveName; - this.openedNames = [this.activeName.split("-")[0]]; + this.openedNames = ["/" + this.activeName.split("/")[1]]; } this.$nextTick(function() { diff --git a/chameleon-client/src/main.js b/chameleon-client/src/main.js index d51ce89d9..c99f44797 100644 --- a/chameleon-client/src/main.js +++ b/chameleon-client/src/main.js @@ -9,7 +9,7 @@ import locale from 'iview/dist/locale/en-US'; Vue.use(VueRouter); Vue.use(iView , { locale }); -Vue.use(VueNativeSock,'ws://'+location.hostname+':8888/websocket'); +Vue.use(VueNativeSock,'ws://' + location.hostname + ':8888/websocket'); Vue.config.productionTip = false new Vue({