Skip to content

Commit

Permalink
[FEATURE] Add "Create detector" item to the breadcrumbs opensearch-pr…
Browse files Browse the repository at this point in the history
…oject#394 (opensearch-project#396)

Signed-off-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
jovancvetkovic3006 authored Jan 31, 2023
1 parent c8a9410 commit a137a80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/pages/CreateDetector/containers/CreateDetector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ export default class CreateDetector extends Component<CreateDetectorProps, Creat
}

componentDidMount(): void {
this.context.chrome.setBreadcrumbs([BREADCRUMBS.SECURITY_ANALYTICS, BREADCRUMBS.DETECTORS]);
this.context.chrome.setBreadcrumbs([
BREADCRUMBS.SECURITY_ANALYTICS,
BREADCRUMBS.DETECTORS,
BREADCRUMBS.DETECTORS_CREATE,
]);
this.setupRulesState();
this.getPlugins();
}
Expand Down
1 change: 1 addition & 0 deletions public/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const BREADCRUMBS = Object.freeze({
OVERVIEW: { text: 'Overview', href: `#${ROUTES.OVERVIEW}` },
FINDINGS: { text: 'Findings', href: `#${ROUTES.FINDINGS}` },
DETECTORS: { text: 'Detectors', href: `#${ROUTES.DETECTORS}` },
DETECTORS_CREATE: { text: 'Create detector', href: `#${ROUTES.DETECTORS_CREATE}` },
DETECTORS_DETAILS: (name: string, detectorId: string) => ({
text: `${name}`,
href: `#${ROUTES.DETECTOR_DETAILS}/${detectorId}`,
Expand Down

0 comments on commit a137a80

Please sign in to comment.