Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const initSideNavigation = async (services: Services) => {
management.id = 'stack_management';
management.spaceBefore = null;
management.children = stackManagementLinks;
delete management.link;
}
})
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { i18n } from '@kbn/i18n';
import type { GroupDefinition } from '@kbn/core-chrome-browser';
import type { AppDeepLinkId, GroupDefinition, NodeDefinition } from '@kbn/core-chrome-browser';
import produce from 'immer';
import { map } from 'rxjs';
import { type Services } from '../common/services';
Expand All @@ -29,6 +29,14 @@ export const initSideNavigation = async (services: Services) => {
const footerGroup: GroupDefinition | undefined = draft.footer?.find(
({ type }) => type === 'navGroup'
) as GroupDefinition;
const management = footerGroup?.children.find((child) => child.link === 'management');
if (management) {
management.renderAs = 'panelOpener';
management.id = 'stack_management';
management.spaceBefore = null;
management.children = stackManagementLinks;
delete management.link;
}
if (footerGroup) {
footerGroup.title = PROJECT_SETTINGS_TITLE;
footerGroup.children.push({ cloudLink: 'billingAndSub', openInNewTab: true });
Expand All @@ -42,3 +50,83 @@ export const initSideNavigation = async (services: Services) => {
dataTestSubj: 'securitySolutionSideNav',
});
};

// Stack Management static node definition
const stackManagementLinks: Array<NodeDefinition<AppDeepLinkId, string, string>> = [
{
title: i18n.translate('xpack.securitySolutionServerless.navLinks.projectSettings.mngt.data', {
defaultMessage: 'Data',
}),
breadcrumbStatus: 'hidden',
children: [
{ link: 'management:index_management', breadcrumbStatus: 'hidden' },
{ link: 'management:transform', breadcrumbStatus: 'hidden' },
{ link: 'management:ingest_pipelines', breadcrumbStatus: 'hidden' },
{ link: 'management:dataViews', breadcrumbStatus: 'hidden' },
{ link: 'management:jobsListLink', breadcrumbStatus: 'hidden' },
{ link: 'management:pipelines', breadcrumbStatus: 'hidden' },
{ link: 'management:data_quality', breadcrumbStatus: 'hidden' },
{ link: 'management:data_usage', breadcrumbStatus: 'hidden' },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one does not exist. Should we clean it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that. It was added in the original PR that this work was pulled out of: #208632. I will cherry-pick.

],
},
{
title: i18n.translate('xpack.securitySolutionServerless.navLinks.projectSettings.mngt.access', {
defaultMessage: 'Access',
}),
breadcrumbStatus: 'hidden',
children: [
{ link: 'management:api_keys', breadcrumbStatus: 'hidden' },
{ link: 'management:roles', breadcrumbStatus: 'hidden' },
{
cloudLink: 'userAndRoles',
title: i18n.translate(
'xpack.securitySolutionServerless.navLinks.projectSettings.mngt.usersAndRoles',
{ defaultMessage: 'Manage organization members' }
),
},
],
},
{
title: i18n.translate(
'xpack.securitySolutionServerless.navLinks.projectSettings.mngt.alertsAndInsights',
{ defaultMessage: 'Alerts and Insights' }
),
breadcrumbStatus: 'hidden',
children: [
{ link: 'management:triggersActions', breadcrumbStatus: 'hidden' },
{ link: 'management:triggersActionsConnectors', breadcrumbStatus: 'hidden' },
{ link: 'management:maintenanceWindows', breadcrumbStatus: 'hidden' },
{ link: 'securitySolutionUI:entity_analytics-management', breadcrumbStatus: 'hidden' },
{
link: 'securitySolutionUI:entity_analytics-entity_store_management',
breadcrumbStatus: 'hidden',
},
],
},
{
title: i18n.translate(
'xpack.securitySolutionServerless.navLinks.projectSettings.mngt.content',
{ defaultMessage: 'Content' }
),
breadcrumbStatus: 'hidden',
children: [
{ link: 'management:spaces', breadcrumbStatus: 'hidden' },
{ link: 'management:objects', breadcrumbStatus: 'hidden' },
{ link: 'management:filesManagement', breadcrumbStatus: 'hidden' },
{ link: 'management:reporting', breadcrumbStatus: 'hidden' },
{ link: 'management:tags', breadcrumbStatus: 'hidden' },
{ link: 'maps' },
{ link: 'visualize' },
],
},
{
title: i18n.translate('xpack.securitySolutionServerless.navLinks.projectSettings.mngt.other', {
defaultMessage: 'Other',
}),
breadcrumbStatus: 'hidden',
children: [
{ link: 'management:settings', breadcrumbStatus: 'hidden' },
{ link: 'management:securityAiAssistantManagement', breadcrumbStatus: 'hidden' },
],
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
await svlCommonNavigation.search.hideSearch();
await headerPage.waitUntilLoadingHasFinished();

await expect(await browser.getCurrentUrl()).contain('app/security/dashboards');
expect(await browser.getCurrentUrl()).contain('app/security/dashboards');
});

it('shows cases in sidebar navigation', async () => {
Expand All @@ -74,12 +74,13 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
await testSubjects.existOrFail('cases-all-title');
});
});

it('navigates to maintenance windows', async () => {
await svlCommonPage.loginAsAdmin();
await svlSecNavigation.navigateToLandingPage();
await svlCommonNavigation.sidenav.openSection('category-management');
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management' });
await testSubjects.click('app-card-maintenanceWindows');
await svlCommonNavigation.sidenav.clickLink({ navId: 'stack_management' });
await svlCommonNavigation.sidenav.clickPanelLink('management:maintenanceWindows');
await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts([
'Stack Management',
'Maintenance Windows',
Expand Down