Skip to content

Commit

Permalink
[Serverless] Update left nav, disable ML alerts (#162728)
Browse files Browse the repository at this point in the history
## Summary

This updates the left nav of Serverless Search to match the latest
designs, and disables ML alerting rules.

---------

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
sphilipse and kibanamachine authored Jul 31, 2023
1 parent 96de148 commit 7b2a00a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 27 deletions.
11 changes: 2 additions & 9 deletions x-pack/plugins/serverless_search/public/layout/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
DefaultNavigation,
NavigationKibanaProvider,
type NavigationTreeDefinition,
getPresets,
} from '@kbn/shared-ux-chrome-navigation';
import React from 'react';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -40,7 +39,7 @@ const navigationTree: NavigationTreeDefinition = {
title: i18n.translate('xpack.serverlessSearch.nav.devTools', {
defaultMessage: 'Dev Tools',
}),
children: getPresets('devtools').children[0].children,
children: [{ link: 'dev_tools:console' }, { link: 'dev_tools:searchprofiler' }],
},
{
id: 'explore',
Expand Down Expand Up @@ -83,16 +82,14 @@ const navigationTree: NavigationTreeDefinition = {
children: [
{
title: i18n.translate('xpack.serverlessSearch.nav.content.indices', {
defaultMessage: 'Indices',
defaultMessage: 'Index Management',
}),
// TODO: this will be updated to a new Indices page
link: 'management:index_management',
},
{
title: i18n.translate('xpack.serverlessSearch.nav.content.pipelines', {
defaultMessage: 'Pipelines',
}),
// TODO: this will be updated to a new Pipelines page
link: 'management:ingest_pipelines',
},
{
Expand All @@ -117,10 +114,6 @@ const navigationTree: NavigationTreeDefinition = {
},
],
},
{
type: 'navGroup',
...getPresets('ml'),
},
],
footer: [
{
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/serverless_search/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class ServerlessSearchPlugin
registerIndicesRoutes(dependencies);
});

pluginsSetup.ml.setFeaturesEnabled({ ad: false, dfa: false, nlp: true });
pluginsSetup.ml.setFeaturesEnabled({ ad: false, dfa: false, nlp: false });
return {};
}

Expand Down
22 changes: 5 additions & 17 deletions x-pack/test_serverless/functional/test_suites/search/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({
deepLinkId: 'serverlessElasticsearch',
});
await svlCommonNavigation.sidenav.expectSectionClosed('rootNav:ml');

// TODO: test something search project specific instead of generic discover
// navigate to discover
Expand All @@ -48,14 +47,12 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
await expect(await browser.getCurrentUrl()).contain('/app/discover');

// navigate to a different section
await svlCommonNavigation.sidenav.openSection('rootNav:ml');
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'ml:notifications' });
await svlCommonNavigation.sidenav.expectLinkActive({ deepLinkId: 'ml:notifications' });
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({ text: `Machine Learning` });
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({
deepLinkId: 'ml:notifications',
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:index_management' });
await svlCommonNavigation.sidenav.expectLinkActive({
deepLinkId: 'management:index_management',
});
await testSubjects.existOrFail(`mlPageNotifications`);
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({ text: `Index Management` });
await testSubjects.existOrFail(`indicesTab`);

// navigate back to serverless search overview
await svlCommonNavigation.breadcrumbs.clickHome();
Expand All @@ -64,19 +61,10 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
});
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({ text: `Getting started` });
await testSubjects.existOrFail(`svlSearchOverviewPage`);
await svlCommonNavigation.sidenav.expectSectionOpen(`rootNav:ml`); // remains open

await expectNoPageReload();
});

it('active sidenav section is auto opened on load', async () => {
await svlCommonNavigation.sidenav.openSection('rootNav:ml');
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'ml:notifications' });
await browser.refresh();
await testSubjects.existOrFail(`mlPageNotifications`);
await svlCommonNavigation.sidenav.expectSectionOpen('rootNav:ml');
});

it('navigate using search', async () => {
await svlCommonNavigation.search.showSearch();
// TODO: test something search project specific instead of generic discover
Expand Down

0 comments on commit 7b2a00a

Please sign in to comment.