|
1 | 1 | import { Navigate, Route, RouterProvider, createBrowserRouter, createRoutesFromElements } from "react-router-dom";
|
2 | 2 | import Layout from "./component/Layout";
|
3 |
| -import OverView from "./pages/OverView"; |
4 |
| -import AuditSnapshot from "./pages/confidentialVm/AuditSnapshot"; |
5 |
| -import DeployApplication from "./pages/confidentialVm/DeployApplication"; |
6 |
| -import DetectMalware from "./pages/confidentialVm/DetectMalware"; |
7 |
| -import SnapshotVm from "./pages/confidentialVm/SnapshotVm"; |
8 |
| -import UseConfidentialVm from "./pages/confidentialVm/UseConfidentialVm"; |
9 |
| -import VerifyIntegrity from "./pages/confidentialVm/VerifyIntegrity"; |
10 |
| -import AboutCovercrypt from "./pages/covercrypt/AboutCovercrypt"; |
11 |
| -import CreateEncryptionPolicy from "./pages/covercrypt/CreateEncryptionPolicy"; |
12 |
| -import CreateMasterKeyPair from "./pages/covercrypt/CreateMasterKeyPair"; |
13 |
| -import DecryptData from "./pages/covercrypt/DecryptData"; |
14 |
| -import EncryptData from "./pages/covercrypt/EncryptData"; |
15 |
| -import GenerateUDK from "./pages/covercrypt/GenerateUDK"; |
16 |
| -import SetupCovercrypt from "./pages/covercrypt/SetupCovercrypt"; |
17 |
| -import AboutCse from "./pages/cse/AboutCse"; |
18 |
| -import SetupCse from "./pages/cse/SetupCse"; |
19 |
| -import SummarizeDocument from "./pages/cse/SummarizeDocument"; |
20 |
| -import AboutFindex from "./pages/findex/AboutFindex"; |
21 |
| -import IndexDatabase from "./pages/findex/IndexDatabase"; |
22 |
| -import InstantiateFindex from "./pages/findex/InstantiateFindex"; |
23 |
| -import SearchInDatabase from "./pages/findex/SearchInDatabase"; |
24 |
| -import SetupFindex from "./pages/findex/SetupFindex"; |
25 |
| -import AboutPKI from "./pages/pki/AboutPKI"; |
26 |
| -import DecryptDataPKI from "./pages/pki/DecryptDataPKI"; |
27 |
| -import EncryptDataPki from "./pages/pki/EncryptDataPki"; |
28 |
| -import GetCertificate from "./pages/pki/GetCertificate"; |
29 |
| -import GrantAccess from "./pages/pki/GrantAccess"; |
30 |
| -import ImportAndUnwrapUDK from "./pages/pki/ImportAndUnwrapUDK"; |
31 |
| -import SendWrappedDecryptionKey from "./pages/pki/SendWrappedDecryptionKey"; |
32 |
| -import SetupPki from "./pages/pki/SetupPki"; |
33 |
| -import UploadCert from "./pages/pki/UploadCert"; |
34 |
| -import { navigationConfig } from "./utils/navigationConfig"; |
| 3 | +import { generateComponentsList, navigationConfig } from "./utils/navigationConfig"; |
| 4 | +import { routePathsConfig } from "./utils/routePathsConfig"; |
35 | 5 |
|
36 | 6 | const componentsList: {
|
37 | 7 | [key: string]: JSX.Element;
|
38 |
| -} = { |
39 |
| - // Overview |
40 |
| - overview: <OverView />, |
41 |
| - // Covercrypt |
42 |
| - "encrypt-with-access-policies/about-covercrypt": <AboutCovercrypt />, |
43 |
| - "encrypt-with-access-policies/set-up-service": <SetupCovercrypt />, |
44 |
| - "encrypt-with-access-policies/create-policy": <CreateEncryptionPolicy />, |
45 |
| - "encrypt-with-access-policies/generate-master-key-pair": <CreateMasterKeyPair />, |
46 |
| - "encrypt-with-access-policies/encrypt-data": <EncryptData />, |
47 |
| - "encrypt-with-access-policies/user-decryption-key": <GenerateUDK />, |
48 |
| - "encrypt-with-access-policies/decrypt-data": <DecryptData />, |
49 |
| - // Findex |
50 |
| - "build-encrypted-indexes/about-findex": <AboutFindex />, |
51 |
| - "build-encrypted-indexes/set-up-service": <SetupFindex />, |
52 |
| - "build-encrypted-indexes/instantiate-findex": <InstantiateFindex />, |
53 |
| - "build-encrypted-indexes/index-database": <IndexDatabase />, |
54 |
| - "build-encrypted-indexes/search-in-database": <SearchInDatabase />, |
55 |
| - // PKI |
56 |
| - "distibute-keys/about-pki": <AboutPKI />, |
57 |
| - "distibute-keys/set-up-service": <SetupPki />, |
58 |
| - "distibute-keys/encrypt-data": <EncryptDataPki />, |
59 |
| - "distibute-keys/save-sk-publish-certificate": <UploadCert />, |
60 |
| - "distibute-keys/grant-access": <GrantAccess />, |
61 |
| - "distibute-keys/retrieve-wrapped-decryption-key": <GetCertificate />, |
62 |
| - "distibute-keys/send-key-in-kms": <SendWrappedDecryptionKey />, |
63 |
| - "distibute-keys/unwrap-decryption-key": <ImportAndUnwrapUDK />, |
64 |
| - "distibute-keys/decrypt-data": <DecryptDataPKI />, |
65 |
| - |
66 |
| - // Confidential VM |
67 |
| - "confidential-vm/about-cosmian-vm": <UseConfidentialVm />, |
68 |
| - "confidential-vm/deploy-application": <DeployApplication />, |
69 |
| - "confidential-vm/snapshot-cosmian-vm": <SnapshotVm />, |
70 |
| - "confidential-vm/audit-snapshot": <AuditSnapshot />, |
71 |
| - "confidential-vm/verify-integrity": <VerifyIntegrity />, |
72 |
| - "confidential-vm/detect-malicious-activities": <DetectMalware />, |
73 |
| - |
74 |
| - // CSE |
75 |
| - "client-side-encryption/about-cse": <AboutCse />, |
76 |
| - "client-side-encryption/set-up-service": <SetupCse />, |
77 |
| - "client-side-encryption/get-summary": <SummarizeDocument />, |
78 |
| -}; |
| 8 | +} = generateComponentsList(routePathsConfig); |
79 | 9 |
|
80 | 10 | const router = createBrowserRouter(
|
81 | 11 | createRoutesFromElements(
|
|
0 commit comments