style.css: +93 lines — sidebar, view, tabs, toolbar, field (label on top), skeleton, snackbar, combobox classes. Font scale 13/14/16. icons.js (NEW): 10 inline-SVG Lucide icons (play, edit, trash, check, x, chevronDown, search, plus, rotateCw, cloud). stroke=currentColor. snackbar.js (NEW): showSnackbar(msg, type). bottom-right, 4s/8s auto-hide, stacking max 4, accessibility role=status aria-live=polite. index.html: include icons.js before utils.js
41 lines
1.4 KiB
Python
41 lines
1.4 KiB
Python
"""
|
||
app-autotest — точка входа Flask-приложения для автотестов Nubes.
|
||
|
||
Регистрирует три blueprint'а:
|
||
- main_bp → / (главная, токен, инфраструктура)
|
||
- api_bp → /api/run, /api/status, /api/config [LEGACY]
|
||
- api_test_bp → /api/test, /api/params, /api/log (основная логика)
|
||
|
||
Деплой: Nubes pythonk8s (gunicorn, несколько воркеров).
|
||
"""
|
||
|
||
import os
|
||
|
||
from flask import Flask
|
||
|
||
from routes.main import bp as main_bp
|
||
from routes.api_test import bp as api_test_bp
|
||
from routes.api_scenario_run import bp_run as api_scenario_run_bp
|
||
from routes.api_scenario_defs import bp_defs as api_scenario_defs_bp
|
||
|
||
# Версия — меняется при КАЖДОМ изменении кода. Показывается в топбаре UI.
|
||
VERSION = "1.2.7"
|
||
|
||
app = Flask(__name__, template_folder="templates", static_folder="static")
|
||
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-test.ngcloud.ru/api/v1/svc")
|
||
app.config["NUBES_API_TOKEN"] = os.getenv("NUBES_API_TOKEN", "")
|
||
app.config["VERSION"] = VERSION
|
||
app.register_blueprint(main_bp)
|
||
app.register_blueprint(api_test_bp)
|
||
app.register_blueprint(api_scenario_run_bp)
|
||
app.register_blueprint(api_scenario_defs_bp)
|
||
|
||
|
||
@app.route("/health")
|
||
def health():
|
||
return "OK"
|
||
|
||
|
||
if __name__ == "__main__":
|
||
app.run(debug=True, host="0.0.0.0", port=5000)
|