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
17 lines
877 B
JavaScript
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();
|