From 81c27fb270b8e2972dd6384b3a577ecba625fb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Wed, 29 Jul 2026 14:54:59 +0400 Subject: [PATCH] v1.1.34: busy=false in catch + CMDB OK no polling --- site/app.py | 2 +- site/static/app.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/site/app.py b/site/app.py index a24853e..efb9fd4 100644 --- a/site/app.py +++ b/site/app.py @@ -18,7 +18,7 @@ from routes.api import bp as api_bp from routes.api_test import bp as api_test_bp # Версия — меняется при КАЖДОМ изменении кода. Показывается в топбаре UI. -VERSION = "1.1.33" +VERSION = "1.1.34" 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") diff --git a/site/static/app.js b/site/static/app.js index 2721160..7619e58 100644 --- a/site/static/app.js +++ b/site/static/app.js @@ -337,6 +337,14 @@ async function executeOp(params){ })}); const d=await r.json(); if(d.status==='FAIL'){busy=false;document.getElementById('test-status').innerHTML=` FAIL ${d.error||''}`;btn.disabled=false;return;} + // CMDB delete — мгновенное удаление, не надо поллинга + if(d.status==='OK'&&(d.opUid||'').startsWith('cmdb-')){ + busy=false; + setFinishedState('OK','badge-success','',0,d.displayName); + await refreshInstances(); + if(historyOpen) await loadHistory(); + return; + } // start polling const opUid=d.opUid; const instanceName=d.displayName||displayName||findInstName(); @@ -354,6 +362,7 @@ async function executeOp(params){ } },2000); }catch(e){ + busy=false; document.getElementById('test-status').textContent=' Ошибка: '+e.message; btn.disabled=false; }