def edit_runner_properties(): user_id, permissions, token = get_request_data() if len(request.params) > 0: runtime.set_runner_properties(int(request.params['timestep']), int(request.params['factor'])) return dict(status="success", msg="Settings saved") else: return template("runner_form", action="/config/runner", value=runtime.get_runner_properties())
def edit_runner_properties(): user_id, permissions, token = get_request_data() if len(request.params) > 0: log_levels = { 'agent': request.params.get('log_level_agent'), 'system': request.params.get('log_level_system'), 'world': request.params.get('log_level_world') } result, msg = runtime.set_runner_properties( int(request.params['timestep']), bool(request.params.get('infguard')), bool(request.params.get('profile_nodenet')), bool(request.params.get('profile_world')), log_levels, request.params.get('log_file')) return dict(status="success" if result else "error", msg="Settings saved" if result else msg) else: return template("runner_form", action="/config/runner", value=runtime.get_runner_properties())
def get_runner_properties(): return True, runtime.get_runner_properties()
def get_runner_properties(): """ Return the server-settings, returning timestep in a dict""" return True, runtime.get_runner_properties()