Skip to content

Commit

Permalink
move experimental flag conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
semd committed Oct 24, 2024
1 parent 46804a0 commit c31885d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
import type { Logger } from '@kbn/core/server';
import { registerSiemRuleMigrationsRoutes } from './rules/api';
import type { SecuritySolutionPluginRouter } from '../../types';
import type { ConfigType } from '../../config';

export const registerSiemMigrationsRoutes = (
router: SecuritySolutionPluginRouter,
config: ConfigType,
logger: Logger
) => {
registerSiemRuleMigrationsRoutes(router, logger);
if (config.experimentalFeatures.siemMigrationsEnabled) {
registerSiemRuleMigrationsRoutes(router, logger);
}
};
7 changes: 2 additions & 5 deletions x-pack/plugins/security_solution/server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,15 @@ export const initRoutes = (
registerDashboardsRoutes(router, logger);
registerTagsRoutes(router, logger);

const { previewTelemetryUrlEnabled, siemMigrationsEnabled } = config.experimentalFeatures;
const { previewTelemetryUrlEnabled } = config.experimentalFeatures;

if (previewTelemetryUrlEnabled) {
// telemetry preview endpoint for e2e integration tests only at the moment.
telemetryDetectionRulesPreviewRoute(router, logger, previewTelemetryReceiver, telemetrySender);
}

registerEntityAnalyticsRoutes({ router, config, getStartServices, logger });

if (siemMigrationsEnabled) {
registerSiemMigrationsRoutes(router, logger);
}
registerSiemMigrationsRoutes(router, config, logger);

// Security Integrations
getFleetManagedIndexTemplatesRoute(router);
Expand Down

0 comments on commit c31885d

Please sign in to comment.