swarm-ui: minimal agent creation page
Adds /agents: a name field that POSTs to swarm-controller's POST /api/agents (from the CreateIdentity work), shows the queued job node id, and links to /jobs to watch it settle. Scope matches the issue exactly - no forge/deploy options, those aren't wired server-side yet.
This commit is contained in:
parent
abf3a9e530
commit
d044281040
4 changed files with 151 additions and 0 deletions
54
frontend/packages/swarm-ui/src/pages/AgentsPage.css
Normal file
54
frontend/packages/swarm-ui/src/pages/AgentsPage.css
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/* <AgentsPage> — the create-agent form. First form in this package, so
|
||||
its input/button chrome lives here rather than in `ui/` — see the
|
||||
component's own comment for why. Reuses the same base16 slots
|
||||
(../theme.css) every other component draws from. */
|
||||
.agents-intro {
|
||||
margin: 0 0 1.5em;
|
||||
color: var(--muted);
|
||||
}
|
||||
.agents-form {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 0.75em;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.agents-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.3em;
|
||||
}
|
||||
.agents-label {
|
||||
font-size: 0.85em;
|
||||
color: var(--muted);
|
||||
}
|
||||
.agents-input {
|
||||
background: var(--bg);
|
||||
color: var(--fg);
|
||||
border: 1px solid var(--purple-dim);
|
||||
border-radius: 0.3em;
|
||||
padding: 0.4em 0.6em;
|
||||
font: inherit;
|
||||
min-width: 16em;
|
||||
}
|
||||
.agents-submit {
|
||||
background: var(--purple-dim);
|
||||
color: var(--fg);
|
||||
border: none;
|
||||
border-radius: 0.3em;
|
||||
padding: 0.5em 1.2em;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.agents-submit:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: default;
|
||||
}
|
||||
.agents-result {
|
||||
margin-top: 1em;
|
||||
}
|
||||
.agents-result-ok {
|
||||
color: var(--green);
|
||||
}
|
||||
.agents-result-error {
|
||||
color: var(--red);
|
||||
}
|
||||
Loading…
Reference in a new issue