-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Implement k7 breadcrumbs for ML routes (#26774)
* [ML] Implement k7 breadcrumbs for ML routes * [ML] Remove duplicate nouns from jobs and settings breadcrumbs
- Loading branch information
1 parent
d9a30e1
commit 9240b8d
Showing
26 changed files
with
331 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
|
||
export const ML_BREADCRUMB = Object.freeze({ | ||
text: 'Machine Learning', | ||
href: '#/' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
|
||
import { ML_BREADCRUMB } from '../breadcrumbs'; | ||
|
||
|
||
export function getDataVisualizerBreadcrumbs() { | ||
// Whilst top level nav menu with tabs remains, | ||
// use root ML breadcrumb. | ||
return [ | ||
ML_BREADCRUMB | ||
]; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
|
||
import { ML_BREADCRUMB } from '../breadcrumbs'; | ||
|
||
|
||
export function getAnomalyExplorerBreadcrumbs() { | ||
// Whilst top level nav menu with tabs remains, | ||
// use root ML breadcrumb. | ||
return [ | ||
ML_BREADCRUMB | ||
]; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
x-pack/plugins/ml/public/file_datavisualizer/breadcrumbs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
|
||
import { ML_BREADCRUMB } from '../breadcrumbs'; | ||
|
||
|
||
export function getFileDataVisualizerBreadcrumbs() { | ||
// Whilst top level nav menu with tabs remains, | ||
// use root ML breadcrumb. | ||
return [ | ||
ML_BREADCRUMB | ||
]; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
|
||
import { ML_BREADCRUMB } from '../breadcrumbs'; | ||
|
||
|
||
export function getJobManagementBreadcrumbs() { | ||
// Whilst top level nav menu with tabs remains, | ||
// use root ML breadcrumb. | ||
return [ | ||
ML_BREADCRUMB | ||
]; | ||
} | ||
|
||
export function getCreateJobBreadcrumbs() { | ||
return [ | ||
ML_BREADCRUMB, | ||
{ | ||
text: 'Create job', | ||
href: '#/jobs/new_job' | ||
} | ||
]; | ||
} | ||
|
||
export function getCreateSingleMetricJobBreadcrumbs() { | ||
return [ | ||
...getCreateJobBreadcrumbs(), | ||
{ | ||
text: 'Single metric', | ||
href: '' | ||
} | ||
]; | ||
} | ||
|
||
export function getCreateMultiMetricJobBreadcrumbs() { | ||
return [ | ||
...getCreateJobBreadcrumbs(), | ||
{ | ||
text: 'Multi metric', | ||
href: '' | ||
} | ||
]; | ||
} | ||
|
||
export function getCreatePopulationJobBreadcrumbs() { | ||
return [ | ||
...getCreateJobBreadcrumbs(), | ||
{ | ||
text: 'Population', | ||
href: '' | ||
} | ||
]; | ||
} | ||
|
||
export function getAdvancedJobConfigurationBreadcrumbs() { | ||
return [ | ||
...getCreateJobBreadcrumbs(), | ||
{ | ||
text: 'Advanced configuration', | ||
href: '' | ||
} | ||
]; | ||
} | ||
|
||
export function getCreateRecognizerJobBreadcrumbs($routeParams) { | ||
return [ | ||
...getCreateJobBreadcrumbs(), | ||
{ | ||
text: $routeParams.id, | ||
href: '' | ||
} | ||
]; | ||
} | ||
|
||
export function getDataVisualizerIndexOrSearchBreadcrumbs() { | ||
return [ | ||
ML_BREADCRUMB, | ||
{ | ||
text: 'Select index or search', | ||
href: '' | ||
} | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.