swarm-ui: agents page — explainer message when the roster is empty
Table gains an optional emptyMessage prop, rendered as a single full-width row in place of a bare empty tbody; AgentsPage is the first consumer. Screenshot-verified against a mock server returning an empty roster.
This commit is contained in:
parent
f1ab7cd43d
commit
46d1271603
3 changed files with 34 additions and 7 deletions
|
|
@ -115,7 +115,14 @@ export function AgentsPage() {
|
|||
>
|
||||
{error ? <ApiErrorPanel context="failed to load the agent roster" problem={error} /> : null}
|
||||
{!error && rows === null ? <p>loading…</p> : null}
|
||||
{rows ? <Table columns={COLUMNS} rows={rows} rowKey={(a) => a.name} /> : null}
|
||||
{rows ? (
|
||||
<Table
|
||||
columns={COLUMNS}
|
||||
rows={rows}
|
||||
rowKey={(a) => a.name}
|
||||
emptyMessage="no agents yet — the swarm-wide identity store has no agents registered on any hive"
|
||||
/>
|
||||
) : null}
|
||||
<Dialog open={createOpen} onClose={() => setCreateOpen(false)} label="create agent">
|
||||
<CreateAgentForm />
|
||||
</Dialog>
|
||||
|
|
|
|||
Loading…
Reference in a new issue