Fix pod logs dock tab (#4738)

- Move all dependencies into a transient LogsViewModel

- Remove dependencies on dockStore.selectedTab

- Make all bindings as late as possible, as per mobx rules

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-01-25 07:04:11 -05:00
1 parent b037c3bf02
commit b3df5b4fc6
42 files changed
+646 -640

No files matched your search

+7 -2
View File
@@ -5,9 +5,14 @@
// Helper for working with time updates / data-polling callbacks
type IntervalCallback = (count: number) => void;
export interface IntervalFn {
start(runImmediately?: boolean): void;
stop(): void;
restart(runImmediately?: boolean): void;
readonly isRunning: boolean;
}
export function interval(timeSec = 1, callback: IntervalCallback, autoRun = false) {
export function interval(timeSec = 1, callback: (count: number) => void, autoRun = false): IntervalFn {
let count = 0;
let timer = -1;
let isRunning = false;