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
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// scenario-edit.js — редактирование существующего сценария
|
||||
|
||||
async function editScenario(defId) {
|
||||
try {
|
||||
const r = await fetch('/api/scenario/definitions/' + defId);
|
||||
const def = await r.json();
|
||||
if (def.error) { alert(def.error); return; }
|
||||
showScenarioEditor(def);
|
||||
} catch (e) {
|
||||
alert('Ошибка загрузки: ' + e.message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user