swarm-ui: show, sort and filter the hive domain by one value, say when the roster is empty, keep the schedule agent picker current
The domain column showed a dash unless a hive had a dashboard but sorted and filtered on the domain alone, so rows looked mis-sorted. It now shows the domain as text when there is no dashboard to link. An empty hive roster says so. The schedule form's agent names reload with the schedules and the form says when that load failed.
This commit is contained in:
parent
885c051b33
commit
8c67ac01fe
1 changed files with 140 additions and 32 deletions
|
|
@ -51,6 +51,7 @@ function nextMinuteUnix(): number {
|
|||
export function ScheduleForm({
|
||||
schedule,
|
||||
agentOptions,
|
||||
agentsError,
|
||||
onSaved,
|
||||
onCancel,
|
||||
}: {
|
||||
|
|
@ -58,6 +59,8 @@ export function ScheduleForm({
|
|||
schedule?: Schedule;
|
||||
/** Every agent a schedule can target. */
|
||||
agentOptions: string[];
|
||||
/** Why the agent list could not load; unset when it did. */
|
||||
agentsError?: string;
|
||||
onSaved: () => void;
|
||||
onCancel: () => void;
|
||||
}) {
|
||||
|
|
@ -187,7 +190,11 @@ export function ScheduleForm({
|
|||
<div class="ui-schedule-form-agents">
|
||||
<span class="ui-form-field-label">agents</span>
|
||||
{agentOptions.length === 0 ? (
|
||||
<span class="ui-schedule-form-hint">no agents to pick from</span>
|
||||
<span class="ui-schedule-form-hint">
|
||||
{agentsError
|
||||
? `could not load the agent list: ${agentsError}`
|
||||
: "no agents to pick from"}
|
||||
</span>
|
||||
) : (
|
||||
<MultiselectFilterOptions
|
||||
options={agentOptions}
|
||||
|
|
|
|||
Loading…
Reference in a new issue