From 5b82423ea490ab5ac5eee1dd024904a8dccf8597 Mon Sep 17 00:00:00 2001 From: Jaehun You Date: Fri, 29 Nov 2024 21:49:27 +0900 Subject: [PATCH] Add `measurements` to channel info See also: #10 --- wlm-ui/src/store/slices/channel/channel.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wlm-ui/src/store/slices/channel/channel.ts b/wlm-ui/src/store/slices/channel/channel.ts index 76820dd..219d6e9 100644 --- a/wlm-ui/src/store/slices/channel/channel.ts +++ b/wlm-ui/src/store/slices/channel/channel.ts @@ -13,10 +13,17 @@ export interface SettingType { period: number; }; +export interface MeasurementType { + frequency?: number; + error?: string; + measuredAt: string; +}; + export interface ChannelInfo { channel: ChannelType; inUse: boolean; setting: SettingType; + measurements: MeasurementType[]; }; export interface ChannelListInfo { @@ -97,6 +104,7 @@ export const channelListSlice = createSlice({ channel: { channel: ch.channel, name: ch.name }, inUse: ch.inUse, setting: info?.setting ?? { exposure: 0, period: 0 }, + measurements: info?.measurements ?? [], } as ChannelInfo; }).sort((a, b) => a.channel.channel - b.channel.channel); })