Skip to content

Commit

Permalink
[Security Solution] Cleanup legacy serverless navigation (elastic#175214
Browse files Browse the repository at this point in the history
)

## Summary

elastic#174944

Remove the legacy navigation components, chrome navigation tree, and
experimental feature.
This PR only removes unused code, It does not introduce any behavioral
change. The project navigation is already enabled.

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
semd and kibanamachine authored Jan 23, 2024
1 parent f3aeb96 commit 47bc2c9
Show file tree
Hide file tree
Showing 20 changed files with 56 additions and 1,098 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ export type ServerlessExperimentalFeatures = Record<
*/
export const allowedExperimentalValues = Object.freeze({
/**
* Enables the use of the of the product navigation from shared-ux package in the Security Solution app
* <Add a description of the feature here>
*
* [This is a fake feature key to showcase how to add a new serverless-specific experimental flag.
* It also prevents `allowedExperimentalValues` from being empty. It should be removed once a real feature is added.]
*/
platformNavEnabled: true,
_serverlessFeatureEnabled: false,
});

type ServerlessExperimentalConfigKeys = Array<keyof ServerlessExperimentalFeatures>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import type { CoreSetup } from '@kbn/core/public';
import type { SecuritySolutionServerlessPluginSetupDeps } from '../types';
import type { Services } from '../common/services';
import { subscribeBreadcrumbs } from './breadcrumbs';
import { getSecuritySideNavComponent } from './side_navigation';
import { initProjectNavigation } from './project_navigation';
import { initSideNavigation } from './side_navigation';
import { projectAppLinksSwitcher } from './links/app_links';
import { formatProjectDeepLinks } from './links/deep_links';
import { enableManagementCardsLanding } from './management_cards';
Expand All @@ -27,21 +26,9 @@ export const setupNavigation = (
export const startNavigation = (services: Services) => {
const { serverless, management } = services;
serverless.setProjectHome(APP_PATH);
initSideNavigation(services);

enableManagementCardsLanding(services);

if (services.experimentalFeatures.platformNavEnabled) {
initProjectNavigation(services);
} else {
// TODO: Remove this else block as platform is enabled by default
// Issue: https://github.com/elastic/kibana/issues/174944

// const projectNavigationTree = new ProjectNavigationTree(services);
// projectNavigationTree.getChromeNavigationTree$().subscribe((chromeNavigationTree) => {
// serverless.setNavigation({ navigationTree: chromeNavigationTree });
// });
serverless.setSideNavComponentDeprecated(getSecuritySideNavComponent(services));
}
management.setIsSidebarEnabled(false);

subscribeBreadcrumbs(services);
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 47bc2c9

Please sign in to comment.