-
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.
[APM] APM-Fleet integration version check & upgrade message (#115297)
- Loading branch information
Showing
9 changed files
with
170 additions
and
56 deletions.
There are no files selected for viewing
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
47 changes: 47 additions & 0 deletions
47
x-pack/plugins/apm/public/components/app/Settings/schema/migrated/card_footer_content.tsx
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,47 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { EuiButton, EuiSpacer, EuiText } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import React from 'react'; | ||
import { APMLink } from '../../../../shared/Links/apm/APMLink'; | ||
import { useFleetCloudAgentPolicyHref } from '../../../../shared/Links/kibana'; | ||
|
||
export function CardFooterContent() { | ||
const fleetCloudAgentPolicyHref = useFleetCloudAgentPolicyHref(); | ||
|
||
return ( | ||
<div> | ||
<EuiButton href={fleetCloudAgentPolicyHref}> | ||
{i18n.translate( | ||
'xpack.apm.settings.schema.success.viewIntegrationInFleet.buttonText', | ||
{ defaultMessage: 'View the APM integration in Fleet' } | ||
)} | ||
</EuiButton> | ||
<EuiSpacer size="xs" /> | ||
<EuiText size="s"> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.apm.settings.schema.success.returnText" | ||
defaultMessage="or simply return to the {serviceInventoryLink}." | ||
values={{ | ||
serviceInventoryLink: ( | ||
<APMLink path="/services"> | ||
{i18n.translate( | ||
'xpack.apm.settings.schema.success.returnText.serviceInventoryLink', | ||
{ defaultMessage: 'Service inventory' } | ||
)} | ||
</APMLink> | ||
), | ||
}} | ||
/> | ||
</p> | ||
</EuiText> | ||
</div> | ||
); | ||
} |
30 changes: 30 additions & 0 deletions
30
.../plugins/apm/public/components/app/Settings/schema/migrated/successful_migration_card.tsx
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,30 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { EuiCard, EuiIcon } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import React from 'react'; | ||
import { CardFooterContent } from './card_footer_content'; | ||
|
||
export function SuccessfulMigrationCard() { | ||
return ( | ||
<EuiCard | ||
icon={<EuiIcon size="xxl" type="checkInCircleFilled" color="success" />} | ||
title={i18n.translate('xpack.apm.settings.schema.success.title', { | ||
defaultMessage: 'Elastic Agent successfully setup!', | ||
})} | ||
description={i18n.translate( | ||
'xpack.apm.settings.schema.success.description', | ||
{ | ||
defaultMessage: | ||
'Your APM integration is now setup and ready to receive data from your currently instrumented agents. Feel free to review the policies applied to your integtration.', | ||
} | ||
)} | ||
footer={<CardFooterContent />} | ||
/> | ||
); | ||
} |
51 changes: 51 additions & 0 deletions
51
x-pack/plugins/apm/public/components/app/Settings/schema/migrated/upgrade_available_card.tsx
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,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { EuiCard, EuiIcon, EuiLink } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import React from 'react'; | ||
import { useUpgradeApmPackagePolicyHref } from '../../../../shared/Links/kibana'; | ||
import { CardFooterContent } from './card_footer_content'; | ||
|
||
export function UpgradeAvailableCard({ | ||
apmPackagePolicyId, | ||
}: { | ||
apmPackagePolicyId: string | undefined; | ||
}) { | ||
const upgradeApmPackagePolicyHref = | ||
useUpgradeApmPackagePolicyHref(apmPackagePolicyId); | ||
|
||
return ( | ||
<EuiCard | ||
icon={<EuiIcon size="xxl" type="alert" color="warning" />} | ||
title={i18n.translate( | ||
'xpack.apm.settings.schema.upgradeAvailable.title', | ||
{ | ||
defaultMessage: 'APM integration upgrade available!', | ||
} | ||
)} | ||
description={ | ||
<FormattedMessage | ||
id="xpack.apm.settings.upgradeAvailable.description" | ||
defaultMessage="Even though your APM integration is setup, a new version of the APM integration is available for upgrade with your package policy. {upgradePackagePolicyLink} to get the most out of your setup." | ||
values={{ | ||
upgradePackagePolicyLink: ( | ||
<EuiLink href={upgradeApmPackagePolicyHref}> | ||
{i18n.translate( | ||
'xpack.apm.settings.schema.upgradeAvailable.upgradePackagePolicyLink', | ||
{ defaultMessage: 'Upgrade your APM integration' } | ||
)} | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
} | ||
footer={<CardFooterContent />} | ||
/> | ||
); | ||
} |
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
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