-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
125 additions
and
38 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
x-pack/plugins/grokdebugger/public/components/inactive_license.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { | ||
EuiCallOut, | ||
EuiText, | ||
EuiLink, | ||
EuiCode, | ||
EuiPage, | ||
EuiPageBody, | ||
EuiPageContent, | ||
EuiPageContentBody, | ||
} from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
|
||
export const InactiveLicenseSlate = () => { | ||
const registerLicenseLinkLabel = i18n.translate('xpack.grokDebugger.registerLicenseLinkLabel', { | ||
defaultMessage: 'register a license', | ||
}); | ||
|
||
const trialLicense = i18n.translate('xpack.grokdDebugger.trialLicenseTitle', { | ||
defaultMessage: 'Trial', | ||
}); | ||
|
||
const basicLicense = i18n.translate('xpack.grokDebugger.basicLicenseTitle', { | ||
defaultMessage: 'Basic', | ||
}); | ||
|
||
const goldLicense = i18n.translate('xpack.grokDebugger.goldLicenseTitle', { | ||
defaultMessage: 'Gold', | ||
}); | ||
|
||
const platinumLicense = i18n.translate('xpack.grokDebugger.platinumLicenseTitle', { | ||
defaultMessage: 'Platinum', | ||
}); | ||
|
||
return ( | ||
<EuiPage> | ||
<EuiPageBody component="div"> | ||
<EuiPageContent verticalPosition="center" horizontalPosition="center"> | ||
<EuiPageContentBody> | ||
<EuiCallOut | ||
title={i18n.translate('xpack.grokDebugger.licenseErrorMessageTitle', { | ||
defaultMessage: 'License error', | ||
})} | ||
color="danger" | ||
iconType="alert" | ||
style={{ padding: '16px' }} | ||
> | ||
<EuiText size="s"> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.grokDebugger.licenseErrorMessageDescription" | ||
defaultMessage="The Grok Debugger requires an active license ({licenseTypeList} or {platinumLicenseType}), but none were found in your cluster." | ||
values={{ | ||
licenseTypeList: ( | ||
<> | ||
<EuiCode>{trialLicense}</EuiCode>, <EuiCode>{basicLicense}</EuiCode>,{' '} | ||
<EuiCode>{goldLicense}</EuiCode> | ||
</> | ||
), | ||
platinumLicenseType: <EuiCode>{platinumLicense}</EuiCode>, | ||
}} | ||
/> | ||
</p> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.grokDebugger.registerLicenseDescription" | ||
defaultMessage="Please {registerLicenseLink} to continue using the Grok Debugger" | ||
values={{ | ||
registerLicenseLink: ( | ||
<EuiLink href="https://www.elastic.co/subscriptions" rel="noopener"> | ||
{registerLicenseLinkLabel} | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
</p> | ||
</EuiText> | ||
</EuiCallOut> | ||
</EuiPageContentBody> | ||
</EuiPageContent> | ||
</EuiPageBody> | ||
</EuiPage> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters