refactor(decnet_web/DeckyFleet): move IntervalEditor out
Verbatim move of the per-decky mutation-interval modal (~60 LOC) into its own file. Saves null when the toggle is off, minutes otherwise. - New DeckyFleet/IntervalEditor.tsx - IntervalEditor.test.tsx covers null-current disabled path, numeric-current enabled path, and CANCEL not firing onSave. - src/test/fixtures/decky.ts now derives DeckyFixture from the canonical Decky type (the fixture's loose swarm shape was missing host_address/host_status; aligning to Decky catches that statically).
This commit is contained in:
21
decnet_web/src/test/fixtures/decky.ts
vendored
21
decnet_web/src/test/fixtures/decky.ts
vendored
@@ -1,21 +1,6 @@
|
||||
export interface DeckyFixture {
|
||||
name: string;
|
||||
ip: string;
|
||||
services: string[];
|
||||
distro: string;
|
||||
hostname: string;
|
||||
archetype: string | null;
|
||||
service_config: Record<string, Record<string, unknown>>;
|
||||
mutate_interval: number | null;
|
||||
last_mutated: number;
|
||||
swarm?: {
|
||||
host_uuid: string;
|
||||
host_name: string;
|
||||
state: string;
|
||||
last_error: string | null;
|
||||
last_seen: string | null;
|
||||
};
|
||||
}
|
||||
import type { Decky } from '../../components/DeckyFleet/types';
|
||||
|
||||
export type DeckyFixture = Decky;
|
||||
|
||||
export const makeDecky = (overrides: Partial<DeckyFixture> = {}): DeckyFixture => ({
|
||||
name: 'decoy-01',
|
||||
|
||||
Reference in New Issue
Block a user