v1.1.22: fix currentSvcShort scope — move to module level

This commit is contained in:
2026-07-29 12:37:50 +04:00
parent 515fadbcde
commit 0df6804d79
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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.21"
VERSION = "1.1.22"
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")
+2 -1
View File
@@ -28,6 +28,7 @@
let svcInstances=[], selectedInst=null, selectedOp=null, pollTimer=null;
let currentSvcId=1; // динамический — обновляется при selectService()
let currentSvcName=''; // имя текущего сервиса (колонка «тип инстанса»)
let currentSvcShort=''; // краткое имя (redis, postgres) для displayName
const AUTOTEST_PREFIX='autotest-';
// Первый сервис из списка (рендерится Jinja2)
@@ -47,7 +48,7 @@ async function selectService(svcId){
const d=await r.json();
svcInstances=d.instances||[];
currentSvcName=d.svc||'';
let currentSvcShort=d.svcShort||'';
currentSvcShort=d.svcShort||'';
// Обновить текст кнопки создания
const btnSpan=document.querySelector('#create-btn-area span');
if(btnSpan) btnSpan.textContent='+ Создать новый инстанс '+(currentSvcName||'сервиса');