diff --git a/ui/src/pages/session-details/activity-plot/activity-plot.tsx b/ui/src/pages/session-details/activity-plot/activity-plot.tsx index 9c61728dd..711c11a1b 100644 --- a/ui/src/pages/session-details/activity-plot/activity-plot.tsx +++ b/ui/src/pages/session-details/activity-plot/activity-plot.tsx @@ -19,13 +19,11 @@ const tooltipBorderColor = CONSTANTS.COLOR_THEME.border export interface ActivityPlotProps { session: SessionDetails setActiveCaptureId: (captureId: string) => void - snapToDetections?: boolean timeline: TimelineTick[] } export const ActivityPlot = ({ session, - snapToDetections, timeline, setActiveCaptureId, }: ActivityPlotProps) => { @@ -156,14 +154,13 @@ export const ActivityPlot = ({ return } - const captureId = - snapToDetections || !timelineTick.representativeCaptureId - ? findClosestCaptureId({ - snapToDetections, - timeline, - targetDate: timelineTick.startDate, - }) - : timelineTick.representativeCaptureId + const captureId = !timelineTick.representativeCaptureId + ? findClosestCaptureId({ + snapToDetections: false, + timeline, + targetDate: timelineTick.startDate, + }) + : timelineTick.representativeCaptureId if (captureId) { setActiveCaptureId(captureId) diff --git a/ui/src/pages/session-details/process/process.tsx b/ui/src/pages/session-details/process/process.tsx index f32779685..7d9c412ca 100644 --- a/ui/src/pages/session-details/process/process.tsx +++ b/ui/src/pages/session-details/process/process.tsx @@ -18,13 +18,22 @@ import { STRING, translate } from 'utils/language' import { UserPermission } from 'utils/user/types' import { ProcessNow } from './process-now' -export const Process = ({ capture }: { capture: CaptureDetails }) => { +export const Process = ({ capture }: { capture?: CaptureDetails }) => { const { projectId } = useParams() const { project } = useProjectDetails(projectId as string, true) const [pipelineId, setPipelineId] = useState( project?.settings.defaultProcessingPipeline?.id ) + if (!capture) { + return ( + + ) + } + return ( diff --git a/ui/src/pages/session-details/session-details.tsx b/ui/src/pages/session-details/session-details.tsx index cf7d9bbfa..3b6eabf78 100644 --- a/ui/src/pages/session-details/session-details.tsx +++ b/ui/src/pages/session-details/session-details.tsx @@ -86,7 +86,6 @@ const Content = ({ session }: { session: SessionDetails }) => { const [settings, setSettings] = useState({ defaultFilters: true, showDetections: true, - snapToDetections: session.numDetections ? true : false, }) // Data @@ -124,107 +123,105 @@ const Content = ({ session }: { session: SessionDetails }) => { })} tooltip={translate(STRING.TOOLTIP_SESSION)} > - {activeCapture ? : null} + {user.loggedIn ? : null} -
-
- - - - - - - - -
- -
-
- -
- {activeCapture ? ( - - ) : null} -
-
- -
- -
-
-
-
-
-
- + + + + -
-
-
- {activeCapture ? ( - <> - - {activeCapture.dateTimeLabel} - - - - - - - - - ) : null} + + + + +
+
-
- + + +
+ {activeCapture ? : null}
-
- + + +
+
+
+ + +
+
+ +
+
+
+ {activeCapture ? ( + <> + + {activeCapture.dateTimeLabel} + + + + + + + + + ) : ( + + {translate(STRING.LOADING_DATA)}... + + )} +
+
+ +
+
+
-
+
void - session: SessionDetails settings: { defaultFilters: boolean showDetections: boolean - snapToDetections: boolean } }) => { const { projectId } = useParams() @@ -33,7 +28,7 @@ export const ViewSettings = ({ @@ -70,18 +65,6 @@ export const ViewSettings = ({ /> {project ? : null}
- - onSettingsChange({ - ...settings, - snapToDetections: !settings.snapToDetections, - }) - } - disabled={session.numDetections ? false : true} - />