Align sized cluster seeds and GET dumps with PVE wire shapes; restyle DATA panel.
- Scale small/large/big seeds (3×50 / 10×1000 / 20×2000) with proportional backups, snapshots, HA, replication, Ceph capacity, and OSD totals (10 / 100 / 500) plus matching node disks and crush/pg metadata - Enrich handler responses for apt, certificates, qemu/lxc status, storage, SDN, metrics export, and related cluster/node dumps - Flatten nested body_example fields into PARAMS and sync the request body via dotted paths (oVirt-style) - Restyle DATA controls as size cards with full-width Reset to minimal / Refresh stats; unload reloads the minimal cluster
This commit is contained in:
@@ -73,6 +73,33 @@ def _surface_error(major: dict[str, Any]) -> str:
|
||||
return f"{len(fails)} critical: " + "; ".join(parts)
|
||||
|
||||
|
||||
def _verb_histogram_rows(surface: list[dict[str, Any]]) -> list[str]:
|
||||
rows: list[str] = []
|
||||
for major in surface:
|
||||
histogram = major.get("verb_histogram") or {}
|
||||
if not histogram:
|
||||
# Fall back to by_verb totals when slim payload lacks histogram.
|
||||
by_verb = major.get("by_verb") or {}
|
||||
histogram = {
|
||||
verb: {"total": sum(buckets.values()), "buckets": buckets}
|
||||
for verb, buckets in by_verb.items()
|
||||
}
|
||||
for verb, info in sorted(histogram.items()):
|
||||
buckets = info.get("buckets") or {}
|
||||
bucket_txt = ", ".join(
|
||||
f"{name}={count}" for name, count in sorted(buckets.items()) if count
|
||||
)
|
||||
rows.append(
|
||||
"<tr>"
|
||||
f"<td>{html.escape(str(major.get('version') or major.get('major')))}</td>"
|
||||
f"<td>{html.escape(str(verb))}</td>"
|
||||
f"<td>{html.escape(str(info.get('total') or 0))}</td>"
|
||||
f"<td><code>{html.escape(bucket_txt)}</code></td>"
|
||||
"</tr>"
|
||||
)
|
||||
return rows
|
||||
|
||||
|
||||
def write_html(payload: dict[str, Any], path: Path) -> None:
|
||||
surface = payload.get("surface") or []
|
||||
scenarios = payload.get("scenarios") or []
|
||||
@@ -240,6 +267,20 @@ code {{ font-family: var(--mono); font-size: .85em; }}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>Verb histogram (incl. synthetic HEAD)</h2>
|
||||
<p class="lead">
|
||||
Contract verbs GET/PUT/POST/DELETE count toward coverage.
|
||||
HEAD is probed on every GET path for the matrix but is not part of declared/probed.
|
||||
</p>
|
||||
<table>
|
||||
<thead><tr>
|
||||
<th>Major</th><th>Verb</th><th>Total</th><th>Buckets</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
{''.join(_verb_histogram_rows(surface)) or '<tr><td colspan="4" class="empty">No histogram</td></tr>'}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>Critical surface failures</h2>
|
||||
<table>
|
||||
<thead><tr>
|
||||
|
||||
Reference in New Issue
Block a user