Files
app-autotest/site/static/app.js
T
naeel a96658b9b5 v1.1.55: split large files + CRUD scenario editor
Backend (5→7 files):
- api_test.py: 622→479, terraform functions → operations/terraform.py (142)
- api_scenario.py: 241→split into run (153) + defs (108) with _validate_steps()
- db/scenario_defs.py: +client_id, stand, is_seed in list_definitions

Frontend (1→10 files):
- app.js: 554→16 (loader), split into:
  utils.js (45), instances.js (89), operations.js (249),
  history.js (35), scenario-list.js (90)
- New CRUD: scenario-form.js (128), create (25), edit (12), delete (13)

Max file size: JS 249, PY 479
2026-07-30 22:02:22 +04:00

17 lines
877 B
JavaScript

// app.js — загрузчик модулей фронтенда
// Файлы подгружаются в index.html в порядке зависимостей:
// utils.js → instances.js → operations.js → history.js → scenario-list.js
// window.APP — переменные из Jinja2: { version, stand, hasUserToken, firstServiceId }
/*
* Архитектура: ванильный JS, модули по файлам:
* utils.js — _esc(), validateJson(), busy, лог-панель
* instances.js — selectService(), toggleInstance(), refreshInstances()
* operations.js — startCreate(), runOp(), showParams(), executeOp(), poll
* history.js — toggleHistory(), loadHistory()
* scenario-list.js — toggleScenario(), loadScenarios(), runScenario()
*/
// Инициализация лог-панели
startLogPoll();