Skip to content

Commit

Permalink
Update Enterprise Search Overview to use new license button
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Jun 21, 2021
1 parent f25efb8 commit 3bc90b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,3 @@ export const LICENSE_CALLOUT_BODY = i18n.translate('xpack.enterpriseSearch.licen
defaultMessage:
'Enterprise authentication via SAML, document-level permission and authorization support, custom search experiences and more are available with a valid Platinum license.',
});

export const LICENSE_CALLOUT_BUTTON = i18n.translate(
'xpack.enterpriseSearch.licenseCalloutButton',
{
defaultMessage: 'Manage your license',
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { shallow } from 'enzyme';

import { EuiPanel, EuiText } from '@elastic/eui';

import { EuiButtonTo } from '../../../shared/react_router_helpers';
import { ManageLicenseButton } from '../../../shared/licensing';

import { LicenseCallout } from './';

Expand All @@ -27,9 +27,7 @@ describe('LicenseCallout', () => {

expect(wrapper.find(EuiPanel)).toHaveLength(1);
expect(wrapper.find(EuiText)).toHaveLength(2);
expect(wrapper.find(EuiButtonTo).prop('to')).toEqual(
'/app/management/stack/license_management'
);
expect(wrapper.find(ManageLicenseButton)).toHaveLength(1);
});

it('does not render for platinum', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ import { useValues } from 'kea';

import { EuiPanel, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';

import { LicensingLogic } from '../../../shared/licensing';
import { EuiButtonTo } from '../../../shared/react_router_helpers';
import { LicensingLogic, ManageLicenseButton } from '../../../shared/licensing';

import { PRODUCT_SELECTOR_CALLOUT_HEADING } from '../../constants';

import { LICENSE_CALLOUT_BODY, LICENSE_CALLOUT_BUTTON } from './constants';
import { LICENSE_CALLOUT_BODY } from './constants';

export const LicenseCallout: React.FC = () => {
const { hasPlatinumLicense, isTrial } = useValues(LicensingLogic);
Expand All @@ -34,9 +33,7 @@ export const LicenseCallout: React.FC = () => {
</EuiFlexItem>
<EuiFlexItem grow={1} />
<EuiFlexItem grow={false}>
<EuiButtonTo to="/app/management/stack/license_management" shouldNotCreateHref>
{LICENSE_CALLOUT_BUTTON}
</EuiButtonTo>
<ManageLicenseButton />
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
Expand Down

0 comments on commit 3bc90b3

Please sign in to comment.