diff --git a/DOCS/ARCHITECTURE.md b/DOCS/ARCHITECTURE.md index c3f2a85..ba7b01f 100644 --- a/DOCS/ARCHITECTURE.md +++ b/DOCS/ARCHITECTURE.md @@ -1,6 +1,6 @@ # Архитектура app-autotest — полный документ -v1.0.67, 27.07.2026 +v1.0.68, 27.07.2026 --- diff --git a/DOCS/HISTORY.md b/DOCS/HISTORY.md index 79d683c..dc394d3 100644 --- a/DOCS/HISTORY.md +++ b/DOCS/HISTORY.md @@ -1,6 +1,16 @@ # История разработки 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`. diff --git a/site/app.py b/site/app.py index a600ce0..1cf1377 100644 --- a/site/app.py +++ b/site/app.py @@ -6,7 +6,7 @@ from routes.main import bp as main_bp from routes.api import bp as api_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.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-dev.ngcloud.ru/api/v1/svc") diff --git a/site/templates/index.html b/site/templates/index.html index a4e2e7c..483383a 100644 --- a/site/templates/index.html +++ b/site/templates/index.html @@ -18,6 +18,20 @@ .inst-ops { display:none; margin-left:16px; } .inst-ops.open { display:flex; flex-wrap:wrap; gap:4px; padding:4px 0; } .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 label { width:160px; font-size:11px; text-align:right; flex-shrink:0; } .param-row label.req { font-weight:600; } @@ -141,11 +155,21 @@ async function toggleInstance(iuid){ const d=await r.json(); const ops=d.operations.filter(o=>o.operation!=='reconcile'&&o.operation!=='create'); opsEl.innerHTML=ops.map(o=> - `` + `` ).join(''); 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(){ selectedInst=null; stopPoll(); document.querySelectorAll('[data-iuid]').forEach(e=>e.classList.remove('active')); @@ -230,7 +254,10 @@ function setFinishedState(statusText, statusClass, statusError, statusDuration){ btn.disabled=false; btn.textContent='Готово'; btn.onclick=null; - document.getElementById('test-status').innerHTML=` ${statusText} ${statusError||''} ${statusDuration||''}s`; + const opName=selectedOp?.opName||'операция'; + const durationText=statusDuration!==undefined&&statusDuration!==null?`${statusDuration}s`:'0s'; + const extra=statusError||''; + document.getElementById('test-status').innerHTML=` ${statusText} ${opName} ${durationText} ${extra}`; } function setRunningState(opName, displayName){