Skip to content

Commit

Permalink
[SecuritySolution] Hide data quality dashboard link from serverless s…
Browse files Browse the repository at this point in the history
…ide nav (elastic#169937)

## Summary


Issue: Data Quality dashboard not working on serverless
elastic#166271

In this PR:

### Serverless - No Data Quality Dashboard link on the dashboard landing
page or the side nav.
<img width="2554" alt="Screenshot 2023-10-26 at 14 18 00"
src="https://github.com/elastic/kibana/assets/6295984/a796987c-6260-40db-aae8-4a8c4701789d">

### ESS - Data Quality Dashboard links available on the landing page and
the side nav.
<img width="2559" alt="Screenshot 2023-10-26 at 14 12 01"
src="https://github.com/elastic/kibana/assets/6295984/272cd910-7871-4826-8320-92181f78f565">
<img width="2541" alt="Screenshot 2023-10-26 at 14 34 48"
src="https://github.com/elastic/kibana/assets/6295984/eee5c966-4f6b-4974-b1ac-c94245d0341c">
  • Loading branch information
angorayc authored Oct 26, 2023
1 parent 6a6df9d commit 437aaca
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
LinkItem,
} from '@kbn/security-solution-plugin/public/common/links/types';
import { SecurityPageName } from '@kbn/security-solution-navigation';
import { cloneDeep, remove } from 'lodash';
import { cloneDeep, find, remove } from 'lodash';
import { createInvestigationsLinkFromTimeline } from './sections/investigations_links';
import { mlAppLink } from './sections/ml_links';
import { createAssetsLinkFromManage } from './sections/assets_links';
Expand All @@ -29,6 +29,12 @@ export const projectAppLinksSwitcher: AppLinksSwitcher = (appLinks) => {
projectAppLinks.push(createInvestigationsLinkFromTimeline(timelineLinkItem));
}

// Remove data quality dashboard link
const dashboardLinkItem = find(projectAppLinks, { id: SecurityPageName.dashboards });
if (dashboardLinkItem && dashboardLinkItem.links) {
remove(dashboardLinkItem.links, { id: SecurityPageName.dataQuality });
}

// Remove manage link
const [manageLinkItem] = remove(projectAppLinks, { id: SecurityPageName.administration });

Expand Down

0 comments on commit 437aaca

Please sign in to comment.