conf
This commit is contained in:
commit
6a15888251
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"zookeeper" : "10.135.38.122:2181",
|
"zookeeper" : "10.8.0.26:2181",
|
||||||
"api": "http://127.0.0.1:9076/v1",
|
"api": "http://127.0.0.1:9076/v1"
|
||||||
"ws": "ws://46.101.119.89:8000/socket"
|
|
||||||
}
|
}
|
||||||
|
4
rbmd.py
4
rbmd.py
@ -50,11 +50,11 @@ class MainHandler(tornado.web.RequestHandler):
|
|||||||
logging.info(tornado.escape.xhtml_escape(self.current_user))
|
logging.info(tornado.escape.xhtml_escape(self.current_user))
|
||||||
logging.info('123')
|
logging.info('123')
|
||||||
user_id = self.get_secure_cookie("user")
|
user_id = self.get_secure_cookie("user")
|
||||||
ws = config("ws")
|
# ws = config("ws")
|
||||||
try: metrics = json.loads(action('metrics', 'get'))
|
try: metrics = json.loads(action('metrics', 'get'))
|
||||||
except ValueError: metrics = {}
|
except ValueError: metrics = {}
|
||||||
my_status = zk_fetch("/rbmd/log/health") #action('status', 'get')
|
my_status = zk_fetch("/rbmd/log/health") #action('status', 'get')
|
||||||
dct = {'ws': ws, 'metrics': metrics, 'status': my_status}
|
dct = {'metrics': metrics, 'status': my_status}
|
||||||
self.render("index.html", **dct)
|
self.render("index.html", **dct)
|
||||||
|
|
||||||
def get_current_user(self):
|
def get_current_user(self):
|
||||||
|
@ -84,7 +84,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
var ws = new WebSocket('{{escape(ws)}}');
|
var url = "ws://" + location.host + "/socket";
|
||||||
|
var ws = new WebSocket(url);
|
||||||
console.log(ws);
|
console.log(ws);
|
||||||
var a, selected_node, deadNode, node2;
|
var a, selected_node, deadNode, node2;
|
||||||
ws.onopen = function() {ws.send(""); };
|
ws.onopen = function() {ws.send(""); };
|
||||||
|
Loading…
Reference in New Issue
Block a user