v1.1.32: not-created instances — only show delete operation

This commit is contained in:
2026-07-29 13:57:51 +04:00
parent d17c84548d
commit b6a497400c
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -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=>
`<button class="btn btn-sm op-btn ${opClass(o.operation)}" onclick="runOp('${o.operation}',${o.svcOperationId})">${o.operation}</button>`
).join('');