Show empty-state text on empty table panels

A table panel with no rows rendered its column headers over an empty body. On a live PC Details page that made Network Interfaces and Listening Ports look like cards that had failed to load, when the real answer was that the agent had not reported any yet. List panels already honoured panel.empty; table panels did not.

Also records the simulation-suite requirement uncovered when rolling containers: the pytest suite builds its schema from the models, so an unapplied migration is invisible to it while every query against the affected table 500s in the running image.
This commit is contained in:
benjamin.baker
2026-09-05 07:22:58 -04:00
parent 0c9bd1ed32
commit f77a288bdc
3 changed files with 108 additions and 2 deletions

View File

@@ -126,7 +126,10 @@
v-if="((tabSections(panel)[activeTab(panel)] || {}).columns || []).length"
class="pap-table-wrap"
>
<table class="pap-table">
<table
v-if="((tabSections(panel)[activeTab(panel)] || {}).rows || []).length"
class="pap-table"
>
<thead>
<tr>
<th
@@ -174,7 +177,10 @@
<!-- table: columns declared by the panel (or inferred from row keys) -->
<div v-else-if="panel.render === 'table'" class="pap-table-wrap">
<table class="pap-table">
<!-- Headers are suppressed when there are no rows. A bare header row
over an empty body reads as a broken card; the declared empty
message says which of "nothing here" or "nothing reported" it is. -->
<table v-if="rows(panel).length" class="pap-table">
<thead>
<tr><th v-for="col in tableColumns(panel)" :key="col.key">{{ col.label }}</th></tr>
</thead>
@@ -184,6 +190,9 @@
</tr>
</tbody>
</table>
<div v-else class="pap-empty">
<span class="muted">{{ panel.empty || 'Nothing to show.' }}</span>
</div>
</div>
<!-- badge: a row of colored badges -->