Skip to content

Commit 594e291

Browse files
committed
add missing type
1 parent 4eaf1b7 commit 594e291

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

tensorboard/webapp/metrics/store/metrics_reducers.ts

+10
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,16 @@ const {initialState, reducers: namespaceContextedReducer} =
453453
settings: METRICS_SETTINGS_DEFAULT,
454454
settingOverrides: {},
455455
visibleCardMap: new Map<ElementId, CardId>(),
456+
previousCardInteractions: {
457+
tagFilters: [],
458+
pins: [],
459+
clicks: [],
460+
},
461+
newCardInteractions: {
462+
tagFilters: [],
463+
pins: [],
464+
clicks: [],
465+
},
456466
},
457467

458468
/** onNavigated */

tensorboard/webapp/metrics/store/metrics_types.ts

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
} from '../data_source';
2828
import {
2929
CardId,
30+
CardIdWithMetadata,
3031
CardMetadata,
3132
CardUniqueInfo,
3233
HistogramMode,
@@ -166,6 +167,12 @@ export type CardStepIndexMap = Record<
166167
CardStepIndexMetaData | null
167168
>;
168169

170+
export type CardInteractions = {
171+
tagFilters: string[];
172+
pins: CardIdWithMetadata[];
173+
clicks: CardIdWithMetadata[];
174+
};
175+
169176
export type CardToPinnedCard = Map<NonPinnedCardId, PinnedCardId>;
170177

171178
export type PinnedCardToCard = Map<PinnedCardId, NonPinnedCardId>;
@@ -254,6 +261,8 @@ export interface MetricsNonNamespacedState {
254261
* Map from ElementId to CardId. Only contains all visible cards.
255262
*/
256263
visibleCardMap: Map<ElementId, CardId>;
264+
previousCardInteractions: CardInteractions;
265+
newCardInteractions: CardInteractions;
257266
}
258267

259268
export type MetricsState = NamespaceContextedState<

tensorboard/webapp/metrics/testing.ts

+10
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ function buildBlankState(): MetricsState {
112112
isSettingsPaneOpen: false,
113113
isSlideoutMenuOpen: false,
114114
tableEditorSelectedTab: DataTableMode.SINGLE,
115+
previousCardInteractions: {
116+
tagFilters: [],
117+
pins: [],
118+
clicks: [],
119+
},
120+
newCardInteractions: {
121+
tagFilters: [],
122+
pins: [],
123+
clicks: [],
124+
},
115125
};
116126
}
117127

0 commit comments

Comments
 (0)