def domain_define(): if request.args.get('json') == "define": network = virty.NodeNetworkList(request.args.get('node')) storage = virty.StorageList(request.args.get('node')) archive = virty.vsql.SqlGetAll('archive') return jsonify(network=network,storage=storage,archive=archive) else: virty.WorkerUp() html = render_template('domainDefineSteps.html',node=virty.vsql.SqlGetAll("node")) return html
def node_add(): virty.WorkerUp() html = render_template('NodeAdd.html') return html
def network_add(): virty.WorkerUp() html = render_template('NetworkAdd.html', node=virty.vsql.SqlGetAll("node")) return html
def storage_add(): virty.WorkerUp() node = virty.vsql.SqlGetAll('node') html = render_template('StorageAdd.html', node=node) return html
jwt.unauthorized_loader(jwt_unauthorized_loader_handler) @jwt.user_loader_callback_loader def user_loader_callback(identity): user = model.get_virty_user_class(identity) return user ############################ # STARTUP # ############################ if virty.vsql.RawFetchall("select name from sqlite_master where type='table';", []) == []: virty.vsql.SqlInit() virty.WorkerUp() else: virty.WorkerUp() ############################ # STATIC # ############################ @app.route('/') @login_required def route(): return redirect("/domain", code=302) @app.route('/static/<path:path>') def send_js(path):