Skip to content

Commit

Permalink
[Uptime] Refactor header (#58836)
Browse files Browse the repository at this point in the history
Cleanup implementation of the header to let pages embed the header rather than the weird sort of control the header works with today. Also uses kibana context in a way that makes more sense, and provide a path forward for #53550 since that will need to add a new header type (and some buttons next to the picker).

Fixes #58835
  • Loading branch information
andrewvc authored Mar 3, 2020
1 parent 3887055 commit 1995a05
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 1,216 deletions.
19 changes: 0 additions & 19 deletions x-pack/legacy/plugins/uptime/public/breadcrumbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,3 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { i18n } from '@kbn/i18n';
import { ChromeBreadcrumb } from 'src/core/public';

const makeOverviewBreadcrumb = (search?: string): ChromeBreadcrumb => ({
text: i18n.translate('xpack.uptime.breadcrumbs.overviewBreadcrumbText', {
defaultMessage: 'Uptime',
}),
href: `#/${search ? search : ''}`,
});

export const getOverviewPageBreadcrumbs = (search?: string): ChromeBreadcrumb[] => [
makeOverviewBreadcrumb(search),
];

export const getMonitorPageBreadcrumb = (name: string, search?: string): ChromeBreadcrumb[] => [
makeOverviewBreadcrumb(search),
{ text: name },
];

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1995a05

Please sign in to comment.