A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
feat(app): feature flag
dextmorgnae070c14c715
diff --git a/flowsint-app/src/components/layout/sidebar.tsx b/flowsint-app/src/components/layout/sidebar.tsxindex 85b477a3..e1ddea51 100644--- a/flowsint-app/src/components/layout/sidebar.tsx+++ b/flowsint-app/src/components/layout/sidebar.tsx@@ -18,7 +18,7 @@ export const Sidebar = memo(() => {const navItems: NavItem[] = [{ icon: Home, label: 'Dashboard', href: '/dashboard/' },- { icon: Puzzle, label: 'Enrichers', href: '/dashboard/enrichers' },+ // { icon: Puzzle, label: 'Enrichers', href: '/dashboard/enrichers' },{ icon: Workflow, label: 'Flows', href: '/dashboard/flows' },{ icon: Shapes, label: 'Custom types', href: '/dashboard/custom-types' },{ icon: Lock, label: 'Vault', href: '/dashboard/vault' }diff --git a/flowsint-app/src/routes/_auth.dashboard.enrichers.$enricherId.tsx b/flowsint-app/src/routes/_auth.dashboard.enrichers.$enricherId.tsxindex 1b1fd210..538f7500 100644--- a/flowsint-app/src/routes/_auth.dashboard.enrichers.$enricherId.tsx+++ b/flowsint-app/src/routes/_auth.dashboard.enrichers.$enricherId.tsx@@ -1,9 +1,18 @@-import { createFileRoute } from '@tanstack/react-router'+import { createFileRoute, redirect } from '@tanstack/react-router'import Loader from '@/components/loader'import { templateService } from '@/api/template-service'import { TemplateEditor } from '@/components/templates/template-editor'+const FEATURE_FLAG = true+export const Route = createFileRoute('/_auth/dashboard/enrichers/$enricherId')({+ beforeLoad: async () => {+ if (FEATURE_FLAG) {+ throw redirect({+ to: '/'+ })+ }+ },loader: async ({ params: { enricherId } }) => {const template = await templateService.getById(enricherId)return { template }@@ -30,10 +39,6 @@ export const Route = createFileRoute('/_auth/dashboard/enrichers/$enricherId')({function TemplatePage() {const { template } = Route.useLoaderData()return (- <TemplateEditor- key={template.id}- templateId={template.id}- initialContent={template.content}- />+ <TemplateEditor key={template.id} templateId={template.id} initialContent={template.content} />)}diff --git a/flowsint-app/src/routes/_auth.dashboard.enrichers.index.tsx b/flowsint-app/src/routes/_auth.dashboard.enrichers.index.tsxindex 70f9879c..69941892 100644--- a/flowsint-app/src/routes/_auth.dashboard.enrichers.index.tsx+++ b/flowsint-app/src/routes/_auth.dashboard.enrichers.index.tsx@@ -1,4 +1,4 @@-import { createFileRoute } from '@tanstack/react-router'+import { createFileRoute, redirect } from '@tanstack/react-router'import { useQuery } from '@tanstack/react-query'import { useRef, useState } from 'react'import { Button } from '@/components/ui/button'@@ -13,8 +13,16 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'import ErrorState from '@/components/shared/error-state'import { PageLayout } from '@/components/layout/page-layout'import { templateService, type Template } from '@/api/template-service'+const FEATURE_FLAG = trueexport const Route = createFileRoute('/_auth/dashboard/enrichers/')({+ beforeLoad: async () => {+ if (FEATURE_FLAG) {+ throw redirect({+ to: '/'+ })+ }+ },component: TemplatesPage})