v1.0.68: operation name shown after OK + muted operation buttons
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Архитектура app-autotest — полный документ
|
# Архитектура app-autotest — полный документ
|
||||||
|
|
||||||
v1.0.67, 27.07.2026
|
v1.0.68, 27.07.2026
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+11
-1
@@ -1,6 +1,16 @@
|
|||||||
# История разработки app-autotest
|
# История разработки app-autotest
|
||||||
|
|
||||||
# v1.0.67 (27.07.2026) — autotest instances are shown by cloud prefix
|
# v1.0.68 (27.07.2026) — operation name shown after OK + muted operation buttons
|
||||||
|
|
||||||
|
### Что изменилось
|
||||||
|
- В `site/templates/index.html` финальный статус теперь показывает имя операции рядом со временем.
|
||||||
|
- Кнопки операций получили спокойные неброские оттенки по типу операции.
|
||||||
|
|
||||||
|
### Что это чинит
|
||||||
|
- Неясность после завершения операции, когда было видно только `OK` и время без указания, что именно выполнялось.
|
||||||
|
- Слишком кислотный вид кнопок операций.
|
||||||
|
|
||||||
|
## v1.0.67 (27.07.2026) — autotest instances are shown by cloud prefix
|
||||||
|
|
||||||
### Что изменилось
|
### Что изменилось
|
||||||
- В `site/routes/main.py` список инстансов сервиса больше не отфильтровывается через `/tmp/instances.json`.
|
- В `site/routes/main.py` список инстансов сервиса больше не отфильтровывается через `/tmp/instances.json`.
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ from routes.main import bp as main_bp
|
|||||||
from routes.api import bp as api_bp
|
from routes.api import bp as api_bp
|
||||||
from routes.api_test import bp as api_test_bp
|
from routes.api_test import bp as api_test_bp
|
||||||
|
|
||||||
VERSION = "1.0.67"
|
VERSION = "1.0.68"
|
||||||
|
|
||||||
app = Flask(__name__, template_folder="templates", static_folder="static")
|
app = Flask(__name__, template_folder="templates", static_folder="static")
|
||||||
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-dev.ngcloud.ru/api/v1/svc")
|
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-dev.ngcloud.ru/api/v1/svc")
|
||||||
|
|||||||
@@ -18,6 +18,20 @@
|
|||||||
.inst-ops { display:none; margin-left:16px; }
|
.inst-ops { display:none; margin-left:16px; }
|
||||||
.inst-ops.open { display:flex; flex-wrap:wrap; gap:4px; padding:4px 0; }
|
.inst-ops.open { display:flex; flex-wrap:wrap; gap:4px; padding:4px 0; }
|
||||||
.btn-sm { height:24px; font-size:11px; padding:0 8px; }
|
.btn-sm { height:24px; font-size:11px; padding:0 8px; }
|
||||||
|
.op-btn { border-color:#d1d5db; color:#374151; background:#f8fafc; }
|
||||||
|
.op-btn:hover { background:#eef2f7; }
|
||||||
|
.op-btn-modify { background:#eef2ff; border-color:#c7d2fe; color:#3730a3; }
|
||||||
|
.op-btn-modify:hover { background:#e0e7ff; }
|
||||||
|
.op-btn-suspend { background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
|
||||||
|
.op-btn-suspend:hover { background:#ffedd5; }
|
||||||
|
.op-btn-resume { background:#ecfeff; border-color:#a5f3fc; color:#155e75; }
|
||||||
|
.op-btn-resume:hover { background:#cffafe; }
|
||||||
|
.op-btn-delete { background:#fef2f2; border-color:#fecaca; color:#b91c1c; }
|
||||||
|
.op-btn-delete:hover { background:#fee2e2; }
|
||||||
|
.op-btn-redeploy { background:#f5f3ff; border-color:#ddd6fe; color:#6d28d9; }
|
||||||
|
.op-btn-redeploy:hover { background:#ede9fe; }
|
||||||
|
.op-btn-reconcile { background:#f8fafc; border-color:#dbe4ea; color:#475569; }
|
||||||
|
.op-btn-reconcile:hover { background:#eef2f7; }
|
||||||
.param-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
|
.param-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
|
||||||
.param-row label { width:160px; font-size:11px; text-align:right; flex-shrink:0; }
|
.param-row label { width:160px; font-size:11px; text-align:right; flex-shrink:0; }
|
||||||
.param-row label.req { font-weight:600; }
|
.param-row label.req { font-weight:600; }
|
||||||
@@ -141,11 +155,21 @@ async function toggleInstance(iuid){
|
|||||||
const d=await r.json();
|
const d=await r.json();
|
||||||
const ops=d.operations.filter(o=>o.operation!=='reconcile'&&o.operation!=='create');
|
const ops=d.operations.filter(o=>o.operation!=='reconcile'&&o.operation!=='create');
|
||||||
opsEl.innerHTML=ops.map(o=>
|
opsEl.innerHTML=ops.map(o=>
|
||||||
`<button class="btn btn-sm" onclick="runOp('${o.operation}',${o.svcOperationId})">${o.operation}</button>`
|
`<button class="btn btn-sm op-btn ${opClass(o.operation)}" onclick="runOp('${o.operation}',${o.svcOperationId})">${o.operation}</button>`
|
||||||
).join('');
|
).join('');
|
||||||
opsEl.classList.add('open');
|
opsEl.classList.add('open');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function opClass(opName){
|
||||||
|
if(opName==='modify') return 'op-btn-modify';
|
||||||
|
if(opName==='suspend') return 'op-btn-suspend';
|
||||||
|
if(opName==='resume') return 'op-btn-resume';
|
||||||
|
if(opName==='delete') return 'op-btn-delete';
|
||||||
|
if(opName==='redeploy') return 'op-btn-redeploy';
|
||||||
|
if(opName==='reconcile') return 'op-btn-reconcile';
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
function startCreate(){
|
function startCreate(){
|
||||||
selectedInst=null; stopPoll();
|
selectedInst=null; stopPoll();
|
||||||
document.querySelectorAll('[data-iuid]').forEach(e=>e.classList.remove('active'));
|
document.querySelectorAll('[data-iuid]').forEach(e=>e.classList.remove('active'));
|
||||||
@@ -230,7 +254,10 @@ function setFinishedState(statusText, statusClass, statusError, statusDuration){
|
|||||||
btn.disabled=false;
|
btn.disabled=false;
|
||||||
btn.textContent='Готово';
|
btn.textContent='Готово';
|
||||||
btn.onclick=null;
|
btn.onclick=null;
|
||||||
document.getElementById('test-status').innerHTML=` <span class="badge ${statusClass}">${statusText}</span> ${statusError||''} ${statusDuration||''}s`;
|
const opName=selectedOp?.opName||'операция';
|
||||||
|
const durationText=statusDuration!==undefined&&statusDuration!==null?`${statusDuration}s`:'0s';
|
||||||
|
const extra=statusError||'';
|
||||||
|
document.getElementById('test-status').innerHTML=` <span class="badge ${statusClass}">${statusText}</span> <span style="color:var(--muted);">${opName}</span> <span style="color:var(--muted);">${durationText}</span> ${extra}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setRunningState(opName, displayName){
|
function setRunningState(opName, displayName){
|
||||||
|
|||||||
Reference in New Issue
Block a user