Skip to content

Commit 8073e2a

Browse files
committed
clean up sysinfo deps
1 parent dd68b73 commit 8073e2a

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

frontend/app/view/sysinfo/sysinfo.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright 2026, Command Line Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import type { BlockNodeModel } from "@/app/block/blocktypes";
5-
import type { TabModel } from "@/app/store/tab-model";
64
import { globalStore } from "@/app/store/jotaiStore";
75
import { makeORef } from "@/app/store/wos";
86
import * as util from "@/util/util";
@@ -16,7 +14,7 @@ import * as React from "react";
1614
import { useDimensionsWithExistingRef } from "@/app/hook/useDimensions";
1715
import { waveEventSubscribeSingle } from "@/app/store/wps";
1816
import { TabRpcClient } from "@/app/store/wshrpcutil";
19-
import { BlockMetaKeyAtomFn, WaveEnv } from "@/app/waveenv/waveenv";
17+
import type { BlockMetaKeyAtomFnType, WaveEnv } from "@/app/waveenv/waveenv";
2018
import { OverlayScrollbarsComponent, OverlayScrollbarsComponentRef } from "overlayscrollbars-react";
2119

2220
export type SysinfoEnv = {
@@ -28,7 +26,7 @@ export type SysinfoEnv = {
2826
fullConfigAtom: WaveEnv["atoms"]["fullConfigAtom"];
2927
};
3028
getConnStatusAtom: WaveEnv["getConnStatusAtom"];
31-
getBlockMetaKeyAtom: BlockMetaKeyAtomFn<"graph:numpoints" | "sysinfo:type" | "connection" | "count">;
29+
getBlockMetaKeyAtom: BlockMetaKeyAtomFnType<"graph:numpoints" | "sysinfo:type" | "connection" | "count">;
3230
};
3331

3432
const DefaultNumPoints = 120;
@@ -106,8 +104,6 @@ function convertWaveEventToDataItem(event: Extract<WaveEvent, { event: "sysinfo"
106104

107105
class SysinfoViewModel implements ViewModel {
108106
viewType: string;
109-
nodeModel: BlockNodeModel;
110-
tabModel: TabModel;
111107
termMode: jotai.Atom<string>;
112108
htmlElemFocusRef: React.RefObject<HTMLInputElement>;
113109
blockId: string;
@@ -130,9 +126,7 @@ class SysinfoViewModel implements ViewModel {
130126
plotTypeSelectedAtom: jotai.Atom<string>;
131127
env: SysinfoEnv;
132128

133-
constructor({ blockId, nodeModel, tabModel, waveEnv }: ViewModelInitType) {
134-
this.nodeModel = nodeModel;
135-
this.tabModel = tabModel;
129+
constructor({ blockId, waveEnv }: ViewModelInitType) {
136130
this.viewType = "sysinfo";
137131
this.blockId = blockId;
138132
this.env = waveEnv;

frontend/app/waveenv/waveenv.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React from "react";
77

88
type ConfigAtoms = { [K in keyof SettingsType]: Atom<SettingsType[K]> };
99

10-
export type BlockMetaKeyAtomFn<Keys extends keyof MetaType = keyof MetaType> = <T extends Keys>(
10+
export type BlockMetaKeyAtomFnType<Keys extends keyof MetaType = keyof MetaType> = <T extends Keys>(
1111
blockId: string,
1212
key: T
1313
) => Atom<MetaType[T]>;
@@ -23,7 +23,7 @@ export type WaveEnv = {
2323
showContextMenu: (menu: ContextMenuItem[], e: React.MouseEvent) => void;
2424
getConnStatusAtom: (conn: string) => PrimitiveAtom<ConnStatus>;
2525
getWaveObjectAtom: <T extends WaveObj>(oref: string) => Atom<T>;
26-
getBlockMetaKeyAtom: BlockMetaKeyAtomFn;
26+
getBlockMetaKeyAtom: BlockMetaKeyAtomFnType;
2727
};
2828

2929
export const WaveEnvContext = React.createContext<WaveEnv>(null);

0 commit comments

Comments
 (0)