Skip to content

Commit

Permalink
[errors][dev tools] implement k7Breadcrumbs (#26598)
Browse files Browse the repository at this point in the history
* [devTools] set k7Breadcrumbs

* [errors] add k7Breadcrumbs to error routes

* revert changes to error templates for style

* fix br tags
  • Loading branch information
Spencer authored Dec 4, 2018
1 parent 85a1161 commit 0bcb85f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/console/public/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ require('./src/directives/sense_welcome');

uiRoutes.when('/dev_tools/console', {
controller: 'SenseController',
template
template,
});
9 changes: 9 additions & 0 deletions src/legacy/core_plugins/kibana/public/dev_tools/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ uiRoutes
}
});

uiRoutes.defaults(/^\/dev_tools(\/|$)/, {
k7Breadcrumbs: () => [
{
text: 'Dev Tools',
href: '#/dev_tools'
}
]
});

FeatureCatalogueRegistryProvider.register(() => {
return {
id: 'console',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import './error_allow_explicit_index.less';
import template from './error_allow_explicit_index.html';

uiRoutes
.when('/error/multi.allow_explicit_index', { template });
.when('/error/multi.allow_explicit_index', {
template,
k7Breadcrumbs: () => [{ text: 'Error' }],
});

export function ErrorAllowExplicitIndexProvider(Private, Promise) {
const kbnUrl = Private(KbnUrlProvider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ import './error_auto_create_index.less';
import template from './error_auto_create_index.html';

uiRoutes
.when('/error/action.auto_create_index', { template });
.when('/error/action.auto_create_index', {
template,
k7Breadcrumbs: () => [{ text: 'Error' }],
});

export function isAutoCreateIndexError(error) {
return (
Expand Down
1 change: 1 addition & 0 deletions src/ui/public/error_url_overflow/error_url_overflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export * from './url_overflow_service';
uiRoutes
.when('/error/url-overflow', {
template,
k7Breadcrumbs: () => [{ text: 'Error' }],
controllerAs: 'controller',
controller: class OverflowController {
constructor(Private, config, $scope) {
Expand Down

0 comments on commit 0bcb85f

Please sign in to comment.