From b6a497400c9d5dacbf341429a79a152723d78f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Wed, 29 Jul 2026 13:57:51 +0400 Subject: [PATCH] =?UTF-8?q?v1.1.32:=20not-created=20instances=20=E2=80=94?= =?UTF-8?q?=20only=20show=20delete=20operation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/app.py | 2 +- site/static/app.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/site/app.py b/site/app.py index 43d3689..ec64d66 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.31" +VERSION = "1.1.32" 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 476505a..2721160 100644 --- a/site/static/app.js +++ b/site/static/app.js @@ -80,7 +80,12 @@ async function toggleInstance(iuid){ const r=await fetch('/api/operations/'+currentSvcId); const d=await r.json(); - const ops=d.operations.filter(o=>o.operation!=='reconcile'&&o.operation!=='create'); + let ops=d.operations.filter(o=>o.operation!=='reconcile'&&o.operation!=='create'); + // Для недосозданных инстансов — только delete + const inst=svcInstances.find(x=>x.instanceUid===iuid); + if(inst&&(inst.status||inst.explainedStatus)==='not created'){ + ops=ops.filter(o=>o.operation==='delete'); + } opsEl.innerHTML=ops.map(o=> `` ).join('');