diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index 6907815f5317d..e7b92c5f5f756 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -22,7 +22,6 @@ import type { import { DEFAULT_APP_CATEGORIES, AppNavLinkStatus } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import type { TimelineState } from '@kbn/timelines-plugin/public'; -import type { ThreatIntelligence } from './threat_intelligence'; import type { PluginSetup, PluginStart, @@ -332,11 +331,8 @@ export class Plugin implements IPlugin { const subPlugins = await this.subPlugins(); - - const startPlugins: StartedSubPlugins = { + return { overview: subPlugins.overview.start(), alerts: subPlugins.alerts.start(storage), cases: subPlugins.cases.start(), @@ -365,15 +360,8 @@ export class Plugin implements IPlugin ( - - - -); +const ThreatIntelligenceRoutes = () => { + const enabled = useIsExperimentalFeatureEnabled('threatIntelligenceEnabled'); + if (!enabled) { + return ; + } + + return ( + + + + ); +}; export const routes: SecuritySubPluginRoutes = [ { path: THREAT_INTELLIGENCE_PATH, - render: ThreatIntelligenceRoutes, + component: ThreatIntelligenceRoutes, }, ]; diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index 470adff13e934..1104ff630b61a 100644 --- a/x-pack/plugins/security_solution/public/types.ts +++ b/x-pack/plugins/security_solution/public/types.ts @@ -130,7 +130,7 @@ export interface SubPlugins { management: Management; landingPages: LandingPages; cloudSecurityPosture: CloudSecurityPosture; - threatIntelligence?: ThreatIntelligence; // the Threat Intelligence plugin is temporarily hidden behind a feature flag + threatIntelligence: ThreatIntelligence; } // TODO: find a better way to defined these types @@ -148,5 +148,5 @@ export interface StartedSubPlugins { management: ReturnType; landingPages: ReturnType; cloudSecurityPosture: ReturnType; - threatIntelligence?: ReturnType; + threatIntelligence: ReturnType; }