Loading analyst/package.json +0 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ "@tanstack/react-router": "^1.109.2", "d3-array": "^3.2.4", "d3-axis": "^3.0.0", "d3-brush": "^3.0.0", "d3-format": "^3.1.0", "d3-hierarchy": "^3.1.2", "d3-polygon": "^3.0.1", Loading Loading @@ -64,7 +63,6 @@ "@types/d3": "^7.4.3", "@types/d3-array": "^3.2.1", "@types/d3-axis": "^3.0.6", "@types/d3-brush": "^3.0.6", "@types/d3-format": "^3.0.4", "@types/d3-hierarchy": "^3", "@types/d3-polygon": "^3", Loading analyst/src/components/ActionLog/index.tsx +19 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ import { ActionLogIcon } from '../ActionLogTitle/ActionLogIcon' import useActionLogs from '../dataHooks/useActionLogs' import { useTools } from '../dataHooks/useTools' import type { SelectedAction, SelectedState } from '../Overview/selectedReducer' import type { TimeRange } from '../Plots/TimeScatterPlot/types' const centerChildren = css` display: flex; Loading @@ -30,6 +31,8 @@ interface ActionLogProps { teamLimit?: number displayAction: DisplayActionType teamIds: string[] selectedTimeRange: TimeRange earliestStartTime: number } export const ActionLog: FC<ActionLogProps> = ({ Loading @@ -38,16 +41,26 @@ export const ActionLog: FC<ActionLogProps> = ({ teamLimit, displayAction, teamIds, selectedTimeRange, earliestStartTime, }) => { const tools = useTools() const actionLogs = useActionLogs({ teamLimit, teamIds }).filter(actionLog => const actionLogs = useActionLogs({ teamLimit, teamIds }) .filter(actionLog => displayActionFilter({ actionLog, displayAction, tools, }) ) .filter(actionLog => { const actionLogTime = new Date(actionLog.timestamp).getTime() return ( actionLogTime >= earliestStartTime + selectedTimeRange.rangeStart && actionLogTime <= earliestStartTime + selectedTimeRange.rangeEnd ) }) const getHandleClick = useCallback( (actionLog: IAnalystActionLogSimple) => () => Loading analyst/src/components/ActionLogOptions/displayActionFilter.ts +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ export const displayActionFilter = ({ }): boolean => { const { team, details, logType } = actionLog if (!displayAction.all) { // if displayAction.all === null, displayAction.all is not used if (displayAction.all === false) { return false } if (!displayAction.types[ACTION_TYPES.indexOf(logType)]) { Loading analyst/src/components/ActionLogOptions/index.tsx +2 −2 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ export const ActionLogOptions: FC<ActionLogOptionsProps> = ({ ) const filters = (() => { if (displayAuto && setDisplayAuto) { if (displayAuto && setDisplayAuto && displayAction.all !== null) { return ( <> <Checkbox Loading Loading @@ -207,7 +207,7 @@ export const ActionLogOptions: FC<ActionLogOptionsProps> = ({ const setAllDisplayStates = (state: boolean) => { setDisplayAction(prev => ({ all: state, all: prev.all === null ? null : state, types: prev.types.map(() => state), email: { sent: state, Loading analyst/src/components/ActionLogOptions/types.ts +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ export type DisplayAutoType = { } export type DisplayActionType = { all: boolean all: boolean | null // use null when only using DisplayAction (without DisplayAuto) types: boolean[] email: { sent: boolean Loading Loading
analyst/package.json +0 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ "@tanstack/react-router": "^1.109.2", "d3-array": "^3.2.4", "d3-axis": "^3.0.0", "d3-brush": "^3.0.0", "d3-format": "^3.1.0", "d3-hierarchy": "^3.1.2", "d3-polygon": "^3.0.1", Loading Loading @@ -64,7 +63,6 @@ "@types/d3": "^7.4.3", "@types/d3-array": "^3.2.1", "@types/d3-axis": "^3.0.6", "@types/d3-brush": "^3.0.6", "@types/d3-format": "^3.0.4", "@types/d3-hierarchy": "^3", "@types/d3-polygon": "^3", Loading
analyst/src/components/ActionLog/index.tsx +19 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ import { ActionLogIcon } from '../ActionLogTitle/ActionLogIcon' import useActionLogs from '../dataHooks/useActionLogs' import { useTools } from '../dataHooks/useTools' import type { SelectedAction, SelectedState } from '../Overview/selectedReducer' import type { TimeRange } from '../Plots/TimeScatterPlot/types' const centerChildren = css` display: flex; Loading @@ -30,6 +31,8 @@ interface ActionLogProps { teamLimit?: number displayAction: DisplayActionType teamIds: string[] selectedTimeRange: TimeRange earliestStartTime: number } export const ActionLog: FC<ActionLogProps> = ({ Loading @@ -38,16 +41,26 @@ export const ActionLog: FC<ActionLogProps> = ({ teamLimit, displayAction, teamIds, selectedTimeRange, earliestStartTime, }) => { const tools = useTools() const actionLogs = useActionLogs({ teamLimit, teamIds }).filter(actionLog => const actionLogs = useActionLogs({ teamLimit, teamIds }) .filter(actionLog => displayActionFilter({ actionLog, displayAction, tools, }) ) .filter(actionLog => { const actionLogTime = new Date(actionLog.timestamp).getTime() return ( actionLogTime >= earliestStartTime + selectedTimeRange.rangeStart && actionLogTime <= earliestStartTime + selectedTimeRange.rangeEnd ) }) const getHandleClick = useCallback( (actionLog: IAnalystActionLogSimple) => () => Loading
analyst/src/components/ActionLogOptions/displayActionFilter.ts +2 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ export const displayActionFilter = ({ }): boolean => { const { team, details, logType } = actionLog if (!displayAction.all) { // if displayAction.all === null, displayAction.all is not used if (displayAction.all === false) { return false } if (!displayAction.types[ACTION_TYPES.indexOf(logType)]) { Loading
analyst/src/components/ActionLogOptions/index.tsx +2 −2 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ export const ActionLogOptions: FC<ActionLogOptionsProps> = ({ ) const filters = (() => { if (displayAuto && setDisplayAuto) { if (displayAuto && setDisplayAuto && displayAction.all !== null) { return ( <> <Checkbox Loading Loading @@ -207,7 +207,7 @@ export const ActionLogOptions: FC<ActionLogOptionsProps> = ({ const setAllDisplayStates = (state: boolean) => { setDisplayAction(prev => ({ all: state, all: prev.all === null ? null : state, types: prev.types.map(() => state), email: { sent: state, Loading
analyst/src/components/ActionLogOptions/types.ts +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ export type DisplayAutoType = { } export type DisplayActionType = { all: boolean all: boolean | null // use null when only using DisplayAction (without DisplayAuto) types: boolean[] email: { sent: boolean Loading