v1.2.15: aligned table columns everywhere

- Overview cards: .overview-table with table-layout:fixed, status column 70px
- History table: table-layout:fixed, Time 130px, Op 90px, Status 50px, Duration 55px
- All tables now have consistent column widths across cards
This commit is contained in:
2026-07-31 14:14:04 +04:00
parent bc09b69aa4
commit 0180f3cb3f
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ from routes.api_scenario_run import bp_run as api_scenario_run_bp
from routes.api_scenario_defs import bp_defs as api_scenario_defs_bp
# Версия — меняется при КАЖДОМ изменении кода. Показывается в топбаре UI.
VERSION = "1.2.14"
VERSION = "1.2.15"
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 -2
View File
@@ -16,8 +16,8 @@ async function loadHistory(){
const r=await fetch('/api/history');
const rows=await r.json();
if(!rows||!rows.length){body.innerHTML='<span style="color:var(--muted);font-size:11px;">Нет записей</span>'; return;}
let html='<table style="width:100%;font-size:11px;">';
html+='<tr><th style="padding:2px 6px;">Время</th><th style="padding:2px 6px;">Операция</th><th style="padding:2px 6px;">Инстанс</th><th style="padding:2px 6px;">Статус</th><th style="padding:2px 6px;">Длит.</th></tr>';
let html='<table style="width:100%;font-size:11px;table-layout:fixed;">';
html+='<tr><th style="padding:2px 6px;width:130px;">Время</th><th style="padding:2px 6px;width:90px;">Операция</th><th style="padding:2px 6px;">Инстанс</th><th style="padding:2px 6px;width:50px;">Статус</th><th style="padding:2px 6px;width:55px;">Длит.</th></tr>';
rows.forEach((r, i)=>{
const time=r.created_at?r.created_at.replace('T',' ').substring(0,19):'?';
const cls=r.status==='OK'?'badge-success':r.status==='FAIL'?'badge' :'';
+5 -2
View File
@@ -40,6 +40,9 @@
.token-row { display:flex; gap:4px; padding:8px 12px; }
.token-row input { flex:1; height:26px; font-size:11px; border:1px solid var(--brand-gray); border-radius:3px; padding:0 4px; background:var(--brand-grey-light); }
.token-row button { height:26px; font-size:10px; padding:0 6px; }
.overview-table { width:100%; table-layout:fixed; }
.overview-table td:first-child { width:auto; }
.overview-table td:last-child { width:70px; text-align:center; }
</style>
</head>
<body>
@@ -109,7 +112,7 @@
<div class="card">
<div class="card-header" style="cursor:pointer;" onclick="this.nextElementSibling.style.display=this.nextElementSibling.style.display==='none'?'block':'none'">Организация{% if client_id %} ({{ client_id }}){% endif %}</div>
<div class="card-body" style="padding:0;">
<table>
<table class="overview-table">
<tr><td style="font-size:12px;padding:3px 10px;">{{ organization.displayName }}<br><span style="color:var(--muted);font-size:10px;">{{ organization.instanceUid }}</span></td><td><span class="badge badge-success" style="font-size:10px;">{{ organization.explainedStatus or 'OK' }}</span></td></tr>
</table>
</div>
@@ -119,7 +122,7 @@
<div class="card" style="margin-top:8px;">
<div class="card-header" style="cursor:pointer;" onclick="this.nextElementSibling.style.display=this.nextElementSibling.style.display==='none'?'block':'none'">{{ svc_name }} ({{ items|length }})</div>
<div class="card-body" style="padding:0;max-height:200px;overflow-y:auto;">
<table>
<table class="overview-table">
{% for i in items %}
<tr><td style="font-size:12px;padding:3px 10px;">{{ i.displayName }}<br><span style="color:var(--muted);font-size:10px;">{{ i.instanceUid }}</span></td><td><span class="badge badge-success" style="font-size:10px;">{{ i.explainedStatus or '?' }}</span></td></tr>
{% endfor %}