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

[SIEM] Add button with link to license management in ML popup #47841

Merged
merged 7 commits into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from 5 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

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

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export const UPGRADE_TITLE = i18n.translate('xpack.siem.components.mlPopup.upgra
});

export const UPGRADE_BUTTON = i18n.translate('xpack.siem.components.mlPopup.upgradeButtonLabel', {
defaultMessage: 'Subscription options',
defaultMessage: 'Subscription plans',
});

export const LICENSE_BUTTON = i18n.translate('xpack.siem.components.mlPopup.licenseButtonLabel', {
defaultMessage: 'Manage license',
});

export const FILTER_PLACEHOLDER = i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@
*/

import React from 'react';
import chrome from 'ui/chrome';

import styled from 'styled-components';
import { EuiButton, EuiPopoverTitle, EuiSpacer, EuiText, EuiLink } from '@elastic/eui';
import {
EuiButton,
EuiPopoverTitle,
EuiSpacer,
EuiText,
EuiLink,
EuiFlexGroup,
EuiFlexItem,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import * as i18n from './translations';

Expand Down Expand Up @@ -38,14 +47,27 @@ export const UpgradeContents = React.memo(() => {
/>
</EuiText>
<EuiSpacer />
<EuiButton
href="https://www.elastic.co/subscriptions"
iconType="popout"
iconSide="right"
target="_blank"
>
{i18n.UPGRADE_BUTTON}
</EuiButton>
<EuiFlexGroup gutterSize="s" wrap={true}>
<EuiFlexItem grow={false}>
<EuiButton
href="https://www.elastic.co/subscriptions"
iconType="popout"
iconSide="right"
target="_blank"
>
{i18n.UPGRADE_BUTTON}
</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
href={`${chrome.getBasePath()}/app/kibana#/management/elasticsearch/license_management`}
iconType="gear"
target="_blank"
>
{i18n.LICENSE_BUTTON}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</PopoverContentsDiv>
);
});
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
SIEM_license_button_ML_popup{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this snagged the build with the following error:

[21:11:34] Compatibility check with x-pack/plugins/translations/translations/zh-CN.json [failed]
[21:11:34] → Unexpected token S in JSON at position 0
[21:11:34] Compatibility Checks [failed]
[21:11:34] → Unexpected token S in JSON at position 0
ERROR Unhandled exception!
ERROR SyntaxError: Unexpected token S in JSON at position 0
          at JSON.parse (<anonymous>)
          at parse (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/src/dev/i18n/integrate_locale_files.ts:183:34)

"formats": {
"number": {
"currency": {
Expand Down