Skip to content

Commit

Permalink
[frontend] case incident
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkha committed Mar 12, 2024
1 parent 5c2399b commit e3e9a72
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 233 deletions.
2 changes: 1 addition & 1 deletion opencti-platform/opencti-front/src/private/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const Index = ({ settings }: IndexProps) => {
Component={boundaryWrapper(RootAnalyses)}
/>
{/* Need to refactor below */}
<Route path="/cases" Component={boundaryWrapper(RootCases)} />
<Route path="/cases/*" Component={boundaryWrapper(RootCases)} />
<Route path="/events" Component={boundaryWrapper(RootEvents)} />

<Route path="/threats" Component={boundaryWrapper(RootThreats)} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
// TODO Remove this when V6
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
import React, { Suspense, lazy } from 'react';
import { Redirect, Routes } from 'react-router-dom';
import { Navigate, Route, Routes } from 'react-router-dom';
import { boundaryWrapper } from '@components/Error';
import { useIsHiddenEntity } from '../../../utils/hooks/useEntitySettings';
import { BoundaryRoute } from '../Error';
import Loader from '../../../components/Loader';

const CaseIncidents = lazy(() => import('./CaseIncidents'));
Expand Down Expand Up @@ -36,55 +32,49 @@ const Root = () => {
return (
<Suspense fallback={<Loader />}>
<Routes>
<BoundaryRoute
exact
path="/dashboard/cases"
render={() => <Redirect to={`/dashboard/cases/${redirect}`} />}
<Route
path="/"
element={<Navigate to={`/dashboard/cases/${redirect}`} />}
/>
<BoundaryRoute
exact
path="/dashboard/cases/incidents"
component={CaseIncidents}
<Route
path="/incidents"
Component={boundaryWrapper(CaseIncidents)}
/>
<BoundaryRoute
path="/dashboard/cases/incidents/:caseId"
component={RootIncident}
<Route
path="/incidents/:caseId/*"
Component={boundaryWrapper(RootIncident)}
/>
<BoundaryRoute
exact
path="/dashboard/cases/rfis"
component={CaseRfis}
<Route
path="/rfis"
Component={boundaryWrapper(CaseRfis)}
/>
<BoundaryRoute
path="/dashboard/cases/rfis/:caseId"
component={RootCaseRfi}
<Route
path="/rfis/:caseId"
Component={boundaryWrapper(RootCaseRfi)}
/>
<BoundaryRoute
exact
path="/dashboard/cases/rfts"
component={CaseRfts}
<Route
path="/rfts"
Component={boundaryWrapper(CaseRfts)}
/>
<BoundaryRoute
path="/dashboard/cases/rfts/:caseId"
component={RootCaseRft}
<Route
path="/rfts/:caseId"
Component={boundaryWrapper(RootCaseRft)}
/>
<BoundaryRoute
exact
path="/dashboard/cases/tasks"
component={Tasks}
<Route
path="/tasks"
Component={boundaryWrapper(Tasks)}
/>
<BoundaryRoute
path="/dashboard/cases/tasks/:taskId"
component={RootTask}
<Route
path="/tasks/:taskId"
Component={boundaryWrapper(RootTask)}
/>
<BoundaryRoute
exact
path="/dashboard/cases/feedbacks"
component={Feedbacks}
<Route
path="/feedbacks"
Component={boundaryWrapper(Feedbacks)}
/>
<BoundaryRoute
path="/dashboard/cases/feedbacks/:caseId"
component={RootFeedback}
<Route
path="/feedbacks/:caseId"
Component={boundaryWrapper(RootFeedback)}
/>
</Routes>
</Suspense>
Expand Down
Loading

0 comments on commit e3e9a72

Please sign in to comment.