swarm-ui: say when the hive or permission list failed to load, and name the permissions group
This commit is contained in:
parent
8c67ac01fe
commit
46a6fc36d8
2 changed files with 25 additions and 8 deletions
|
|
@ -309,7 +309,9 @@ export function CreateAgentForm({
|
|||
disabled={!hivesReady}
|
||||
placeholder={
|
||||
!hives
|
||||
? "loading…"
|
||||
? hivesError
|
||||
? "could not load hives"
|
||||
: "loading…"
|
||||
: hives.length === 0
|
||||
? "no hives configured"
|
||||
: "select a hive"
|
||||
|
|
@ -340,8 +342,8 @@ export function CreateAgentForm({
|
|||
)}
|
||||
</>
|
||||
)}
|
||||
<FormField label="permissions" htmlFor="agent-permissions">
|
||||
<div id="agent-permissions">
|
||||
<FormField label="permissions" labelId="agent-permissions-label">
|
||||
<div role="group" aria-labelledby="agent-permissions-label">
|
||||
{catalogue ? (
|
||||
<MultiselectFilterOptions
|
||||
options={catalogue.all}
|
||||
|
|
@ -349,7 +351,9 @@ export function CreateAgentForm({
|
|||
onToggle={(v) => setSelected((s) => togglePermission(s, v))}
|
||||
/>
|
||||
) : (
|
||||
<span>loading…</span>
|
||||
<span>
|
||||
{catalogueError ? "could not load permissions" : "loading…"}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</FormField>
|
||||
|
|
|
|||
Loading…
Reference in a new issue