Strip SLO from frontend: remove _renderSlos, sloRoot param, slo-* CSS,
Some checks are pending
build / lint-test (push) Waiting to run
build / build-push (push) Blocked by required conditions

and the 'Stale' tile (which was derived from the SLO freshness count).
Backend still computes slo_status for future use; UI just ignores it.
This commit is contained in:
kianiadee 2026-05-27 22:14:24 +03:00
parent de34103f18
commit cba1a3b044
2 changed files with 2 additions and 35 deletions

View file

@ -318,12 +318,11 @@ function _popupHtml(props) {
/* ---------- render ---------- */
export function renderView(map, payload, { summaryRoot, sloRoot } = {}) {
export function renderView(map, payload, { summaryRoot } = {}) {
if (!payload || !payload.geojson) return;
const src = map.getSource(VEHICLE_SOURCE);
if (src) src.setData(payload.geojson);
if (summaryRoot) _renderSummary(summaryRoot, payload.summary || {});
if (sloRoot) _renderSlos(sloRoot, payload.slo_status || {});
}
function _renderSummary(root, summary) {
@ -332,7 +331,6 @@ function _renderSummary(root, summary) {
{ label: 'Moving', value: summary.moving ?? '—' },
{ label: 'Parked', value: summary.parked ?? '—' },
{ label: 'Offline', value: summary.offline ?? '—' },
{ label: 'Stale', value: summary.below_freshness_slo ?? '—' },
];
root.innerHTML = tiles
.map(t => `
@ -342,25 +340,6 @@ function _renderSummary(root, summary) {
</div>`).join('');
}
function _renderSlos(root, slos) {
const entries = Object.entries(slos);
if (entries.length === 0) {
root.innerHTML = '<div class="slo-empty">SLO data not yet available</div>';
return;
}
root.innerHTML = entries.map(([metric, info]) => {
const status = info.status || 'unknown';
const current = info.current ?? '—';
const threshold = info.threshold ?? '—';
return `
<div class="slo slo-${status}">
<span class="slo-name">${metric}</span>
<span class="slo-value">${current} / ${threshold}</span>
<span class="slo-status">${status}</span>
</div>`;
}).join('');
}
/* ---------- filters (multi-select dropdowns) ---------- */
/**

View file

@ -35,7 +35,7 @@
}
button.logout:hover { color: var(--text); border-color: var(--text); }
/* ─────────── top dashboard band: tiles + slos + filters ─────────── */
/* ─────────── top dashboard band: tiles + filters ─────────── */
.top-band {
display: grid;
grid-template-columns: minmax(260px,1fr) minmax(280px,auto);
@ -58,18 +58,6 @@
.tile-label { font-size: 9px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.tile-value { font-size: 18px; font-weight: 600; line-height: 1.1; }
.slo {
display: grid; grid-template-columns: 1fr auto auto; gap: 8px;
padding: 3px 8px; border-radius: 4px; font-size: 11px;
background: var(--panel-2);
}
.slo-name { color: var(--muted); }
.slo-status { text-transform: uppercase; font-size: 9px; letter-spacing: 0.06em; }
.slo-green .slo-status { color: var(--accent); }
.slo-red .slo-status { color: var(--bad); }
.slo-unknown .slo-status { color: var(--muted); }
.slo-empty { color: var(--muted); font-size: 11px; }
/* ─────────── multi-select filter widget ─────────── */
.ms { position: relative; min-width: 180px; }
.ms-btn {