Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security_Solution][Resolver]Add beta badge to Resolver panel #71183

Merged
merged 3 commits into from
Jul 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { i18n } from '@kbn/i18n';
import { EuiBreadcrumbs, Breadcrumb, EuiCode } from '@elastic/eui';
import { EuiBreadcrumbs, Breadcrumb, EuiCode, EuiBetaBadge } from '@elastic/eui';
import styled from 'styled-components';
import React, { memo } from 'react';
import { useResolverTheme } from '../assets';
Expand All @@ -19,6 +19,10 @@ export const BoldCode = styled(EuiCode)`
}
`;

const BetaHeader = styled(`header`)`
margin-bottom: 1em;
`;

/**
* The two query parameters we read/write on to control which view the table presents:
*/
Expand All @@ -40,6 +44,13 @@ const ThemedBreadcrumbs = styled(EuiBreadcrumbs)<{ background: string; text: str
}
`;

const betaBadgeLabel = i18n.translate(
'xpack.securitySolution.enpdoint.resolver.panelutils.betaBadgeLabel',
{
defaultMessage: 'BETA',
}
);

/**
* Breadcrumb menu with adjustments per direction from UX team
*/
Expand All @@ -54,12 +65,17 @@ export const StyledBreadcrumbs = memo(function StyledBreadcrumbs({
colorMap: { resolverBreadcrumbBackground, resolverEdgeText },
} = useResolverTheme();
return (
<ThemedBreadcrumbs
background={resolverBreadcrumbBackground}
text={resolverEdgeText}
breadcrumbs={breadcrumbs}
truncate={truncate}
/>
<>
<BetaHeader>
<EuiBetaBadge label={betaBadgeLabel} />
</BetaHeader>
<ThemedBreadcrumbs
background={resolverBreadcrumbBackground}
text={resolverEdgeText}
breadcrumbs={breadcrumbs}
truncate={truncate}
/>
</>
);
});

Expand Down