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 2 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="managementApp"
target="_blank"
>
{i18n.LICENSE_BUTTON}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</PopoverContentsDiv>
);
});
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -11157,4 +11157,4 @@
"xpack.fileUpload.fileParser.errorReadingFile": "ファイルの読み込み中にエラーが発生しました",
"xpack.fileUpload.fileParser.noFileProvided": "エラー、ファイルが提供されていません"
}
}
}
Copy link
Member

@spong spong Oct 10, 2019

Choose a reason for hiding this comment

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

Suggested change
}
}

I think these are unintentional -- does regenerating them return the newline?

2 changes: 1 addition & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -11323,4 +11323,4 @@
"xpack.fileUpload.fileParser.errorReadingFile": "读取文件时出错",
"xpack.fileUpload.fileParser.noFileProvided": "错误,未提供任何文件"
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

I think these are unintentional -- does regenerating them return the newline?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @spong
I regenerated them, but they didn't change. Is it a concern or can I merge?

Copy link
Member

Choose a reason for hiding this comment

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

Interesting. Judging by the history it looks like it's bounced back and forth between having a terminating new line and not. Generally speaking you want the terminating new line, so I would just revert these two files since that's the only changes.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}
}

Can try accepting this suggestion from within Github as well too 🙂