swarm-ui: show each agent's icon on its card
Each agent card now leads with the agent's icon, loaded as an `<img>` from `GET /api/agents/<name>/icon`: the same 5em square, background and fallback as the hive dashboard's container row. An agent with no icon (the route's 404), or any other failed load, shows the dimmed hyperhive mark (`/favicon.svg`) instead of a broken image. Only ever an `<img>`, never inline markup: the body is an agent-authored SVG, and an image load does not run its script.
This commit is contained in:
parent
e974194e3a
commit
3b8df27dcf
3 changed files with 111 additions and 39 deletions
|
|
@ -465,7 +465,8 @@ credential publishes it: the queue grants that credential
|
|||
none of the bucket. The harness writes once per start, because a config change
|
||||
reaches an agent by restarting its container. An agent with no icon deletes its
|
||||
key. Swarm-side, `GET /api/agents/<name>/icon` serves the stored bytes, and 404
|
||||
means the agent has no icon.
|
||||
means the agent has no icon. swarm-ui's agent cards load it as an `<img>` and show the
|
||||
dimmed hyperhive mark for an agent without one, as the hive dashboard does.
|
||||
|
||||
### Swarm-wide forge objects
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue