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,13 @@
|
||||
// scenario-delete.js — удаление сценария
|
||||
|
||||
async function deleteScenario(defId, name) {
|
||||
if (!confirm('Удалить сценарий «' + name + '»?')) return;
|
||||
try {
|
||||
const r = await fetch('/api/scenario/definitions/' + defId, { method: 'DELETE' });
|
||||
const d = await r.json();
|
||||
if (d.error) { alert(d.error); return; }
|
||||
await loadScenarios();
|
||||
} catch (e) {
|
||||
alert('Ошибка: ' + e.message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user