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) (opensearch-project#399)

Signed-off-by: Jovan Cvetkovic <[email protected]>
(cherry picked from commit a137a80)

Co-authored-by: Jovan Cvetkovic <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
2 people authored and AWSHurneyt committed Feb 22, 2023
1 parent 9a34029 commit c96c8b8
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 c96c8b8

Please sign in to comment.