调整几个iframe动态化
尝试添加dockerfile
This commit is contained in:
@@ -20,13 +20,31 @@ APP_START_TIME = time.time()
|
||||
@system_bp.route('/api_docs')
|
||||
@login_required
|
||||
def api_docs():
|
||||
return render_template('api_docs.html')
|
||||
src = request.args.get('src')
|
||||
if not src:
|
||||
try:
|
||||
server = current_app.dashboard_server
|
||||
cfg = getattr(server.robot, "ipad_config", {}) or {}
|
||||
src = cfg.get("server_url", "http://127.0.0.1:8059/")
|
||||
except Exception:
|
||||
src = "http://127.0.0.1:8059/"
|
||||
return render_template('api_docs.html', src_url=src)
|
||||
|
||||
|
||||
@system_bp.route('/system_status')
|
||||
@login_required
|
||||
def system_status():
|
||||
return render_template('system_status.html')
|
||||
src = request.args.get('src')
|
||||
if not src:
|
||||
try:
|
||||
server = current_app.dashboard_server
|
||||
glances = getattr(server.robot, "config").glances if hasattr(server.robot, "config") else {}
|
||||
host = glances.get("host", "127.0.0.1")
|
||||
port = glances.get("port", 61208)
|
||||
src = f"http://{host}:{port}/"
|
||||
except Exception:
|
||||
src = "http://127.0.0.1:61208/"
|
||||
return render_template('system_status.html', src_url=src)
|
||||
|
||||
|
||||
# 页面路由
|
||||
|
||||
Reference in New Issue
Block a user