Skip to content

Commit

Permalink
[rollup][licensing_management][grokdebugger] Migrate deprecated `EuiP…
Browse files Browse the repository at this point in the history
…age*` components (#168300)

## Summary

EUI will shortly be removing several deprecated `EuiPage*` components,
and we're updating a few remaining Kibana usages of these deprecated
components ahead of time.

See #161872 for other similar
tasks with more information about this effort.

---------

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
cee-chen and kibanamachine authored Oct 18, 2023
1 parent 3c58d39 commit 121353c
Show file tree
Hide file tree
Showing 8 changed files with 604 additions and 605 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,7 @@ import { i18n } from '@kbn/i18n';
// eslint-disable-next-line no-restricted-imports
import isEmpty from 'lodash/isEmpty';

import {
EuiForm,
EuiButton,
EuiPage,
EuiPageBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiSpacer,
} from '@elastic/eui';
import { EuiForm, EuiButton, EuiPage, EuiPageBody, EuiPageSection, EuiSpacer } from '@elastic/eui';
import { EventInput } from '../event_input';
import { PatternInput } from '../pattern_input';
import { CustomPatternsInput } from '../custom_patterns_input';
Expand Down Expand Up @@ -126,33 +118,31 @@ export class GrokDebuggerComponent extends React.Component {
return (
<EuiPage>
<EuiPageBody>
<EuiPageContent>
<EuiPageContentBody>
<EuiForm className="grokdebugger-container" data-test-subj="grokDebuggerContainer">
<EventInput value={this.state.rawEvent} onChange={this.onRawEventChange} />
<PatternInput value={this.state.pattern} onChange={this.onPatternChange} />
<EuiSpacer />
<CustomPatternsInput
value={this.state.customPatterns}
onChange={this.onCustomPatternsChange}
<EuiPageSection grow={true} color="plain">
<EuiForm className="grokdebugger-container" data-test-subj="grokDebuggerContainer">
<EventInput value={this.state.rawEvent} onChange={this.onRawEventChange} />
<PatternInput value={this.state.pattern} onChange={this.onPatternChange} />
<EuiSpacer />
<CustomPatternsInput
value={this.state.customPatterns}
onChange={this.onCustomPatternsChange}
/>
<EuiSpacer />
<EuiButton
fill
onClick={this.onSimulateClick}
isDisabled={this.isSimulateDisabled()}
data-test-subj="btnSimulate"
>
<FormattedMessage
id="xpack.grokDebugger.simulateButtonLabel"
defaultMessage="Simulate"
/>
<EuiSpacer />
<EuiButton
fill
onClick={this.onSimulateClick}
isDisabled={this.isSimulateDisabled()}
data-test-subj="btnSimulate"
>
<FormattedMessage
id="xpack.grokDebugger.simulateButtonLabel"
defaultMessage="Simulate"
/>
</EuiButton>
<EuiSpacer />
<EventOutput value={this.state.structuredEvent} />
</EuiForm>
</EuiPageContentBody>
</EuiPageContent>
</EuiButton>
<EuiSpacer />
<EventOutput value={this.state.structuredEvent} />
</EuiForm>
</EuiPageSection>
</EuiPageBody>
</EuiPage>
);
Expand Down
87 changes: 42 additions & 45 deletions x-pack/plugins/grokdebugger/public/components/inactive_license.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import {
EuiCode,
EuiPage,
EuiPageBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageSection,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
Expand Down Expand Up @@ -43,49 +42,47 @@ export const InactiveLicenseSlate = () => {
return (
<EuiPage>
<EuiPageBody component="div">
<EuiPageContent verticalPosition="center" horizontalPosition="center">
<EuiPageContentBody>
<EuiCallOut
title={i18n.translate('xpack.grokDebugger.licenseErrorMessageTitle', {
defaultMessage: 'License error',
})}
color="danger"
iconType="warning"
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>
<EuiPageSection alignment="center" grow={true} color="plain">
<EuiCallOut
title={i18n.translate('xpack.grokDebugger.licenseErrorMessageTitle', {
defaultMessage: 'License error',
})}
color="danger"
iconType="warning"
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>
</EuiPageSection>
</EuiPageBody>
</EuiPage>
);
Expand Down
Loading

0 comments on commit 121353c

Please sign in to comment.