v1.1.22: fix currentSvcShort scope — move to module level
This commit is contained in:
+2
-1
@@ -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||'сервиса');
|
||||
|
||||
Reference in New Issue
Block a user