mirror of
https://github.com/ShaYmez/HBmonitor.git
synced 2024-11-15 12:51:45 -05:00
Update web_tables.py
Fix problem with use BRIDGES_INC from config.py
This commit is contained in:
parent
b878515f65
commit
a35bcc3c03
@ -361,10 +361,10 @@ def build_stats():
|
|||||||
global build_time
|
global build_time
|
||||||
now = time()
|
now = time()
|
||||||
if True: #now > build_time + 1:
|
if True: #now > build_time + 1:
|
||||||
if CONFIG and CONFIG_INC:
|
if CONFIG:
|
||||||
table = 'd' + dtemplate.render(_table=CTABLE)
|
table = 'd' + dtemplate.render(_table=CTABLE)
|
||||||
dashboard_server.broadcast(table)
|
dashboard_server.broadcast(table)
|
||||||
if BRIDGES and BRIDGES_INC:
|
if BRIDGES:
|
||||||
table = 'b' + btemplate.render(_table=BTABLE['BRIDGES'])
|
table = 'b' + btemplate.render(_table=BTABLE['BRIDGES'])
|
||||||
dashboard_server.broadcast(table)
|
dashboard_server.broadcast(table)
|
||||||
build_time = now
|
build_time = now
|
||||||
@ -480,7 +480,8 @@ def process_message(_message):
|
|||||||
logging.debug('got BRIDGE_SND opcode')
|
logging.debug('got BRIDGE_SND opcode')
|
||||||
BRIDGES = load_dictionary(_message)
|
BRIDGES = load_dictionary(_message)
|
||||||
BRIDGES_RX = strftime('%Y-%m-%d %H:%M:%S', localtime(time()))
|
BRIDGES_RX = strftime('%Y-%m-%d %H:%M:%S', localtime(time()))
|
||||||
BTABLE['BRIDGES'] = build_bridge_table(BRIDGES)
|
if BRIDGES_INC:
|
||||||
|
BTABLE['BRIDGES'] = build_bridge_table(BRIDGES)
|
||||||
|
|
||||||
elif opcode == OPCODE['LINK_EVENT']:
|
elif opcode == OPCODE['LINK_EVENT']:
|
||||||
logging.info('LINK_EVENT Received: {}'.format(repr(_message[1:])))
|
logging.info('LINK_EVENT Received: {}'.format(repr(_message[1:])))
|
||||||
|
Loading…
Reference in New Issue
Block a user