src/server/server.py
def on_set_enter_at_level(data):
    '''Set node enter-at level.'''
    node_index = data['node']
    enter_at_level = data['enter_at_level']

    if not enter_at_level:
        logger.info('Node enter-at set null; getting from node: Node {0}'.format(node_index+1))
        enter_at_level = INTERFACE.nodes[node_index].enter_at_level

    profile = getCurrentProfile()
    enter_ats = json.loads(profile.enter_ats)
    enter_ats["v"][node_index] = enter_at_level
    profile.enter_ats = json.dumps(enter_ats)
    DB.session.commit()

    INTERFACE.set_enter_at_level(node_index, enter_at_level)

    Events.trigger(Evt.ENTER_AT_LEVEL_SET, {
        'nodeIndex': node_index,
        'enter_at_level': enter_at_level,
        })

    logger.info('Node enter-at set: Node {0} Level {1}'.format(node_index+1, enter_at_level))
Set node enter-at level.
Set node enter-at level.
Set node enter - at level .
def on_set_enter_at_level(data):
    node_index = data['node']
    enter_at_level = data['enter_at_level']
    if not enter_at_level:
        logger.info('Node enter-at set null; getting from node: Node {0}'.format(node_index+1))
        enter_at_level = INTERFACE.nodes[node_index].enter_at_level
    profile = getCurrentProfile()
    enter_ats = json.loads(profile.enter_ats)
    enter_ats["v"][node_index] = enter_at_level
    profile.enter_ats = json.dumps(enter_ats)
    DB.session.commit()
    INTERFACE.set_enter_at_level(node_index, enter_at_level)
    Events.trigger(Evt.ENTER_AT_LEVEL_SET, {
        'nodeIndex': node_index,
        'enter_at_level': enter_at_level,
        })
    logger.info('Node enter-at set: Node {0} Level {1}'.format(node_index+1, enter_at_level))
def on_set_enter_at_level ( data ) : node_index = data [ 'node' ] enter_at_level = data [ 'enter_at_level' ] if not enter_at_level : logger . info ( 'Node enter-at set null; getting from node: Node {0}' . format ( node_index + 1 ) ) enter_at_level = INTERFACE . nodes [ node_index ] . enter_at_level profile = getCurrentProfile ( ) enter_ats = json . loads ( profile . enter_ats ) enter_ats [ "v" ] [ node_index ] = enter_at_level profile . enter_ats = json . dumps ( enter_ats ) DB . session . commit ( ) INTERFACE . set_enter_at_level ( node_index , enter_at_level ) Events . trigger ( Evt . ENTER_AT_LEVEL_SET , { 'nodeIndex' : node_index , 'enter_at_level' : enter_at_level , } ) logger . info ( 'Node enter-at set: Node {0} Level {1}' . format ( node_index + 1 , enter_at_level ) )
Set node enter-at level.
Set node enter - at level .
'''Set node enter-at level.'''
data