-
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.
[Infra UI] Update Processes tooltips (#166251)
Closes [#165822](#165822) ## Summary This PR moves the explanation tooltip to the top processes title and changes the explanation text: ![image](https://github.com/elastic/kibana/assets/14139027/86e65860-f215-44f5-aa25-032b0e456853) ## Testing 1. Go to hosts view, open the hosts flyout and go to the processes tab - the new tooltip should be visible (using the Top processes icon to open it) 2. Go to the asset details page and do the same steps: https://github.com/elastic/kibana/assets/14139027/e7a1019b-5ea1-42c0-bcb8-5bca39d3141b
- Loading branch information
1 parent
09e8e9a
commit 21d3fc4
Showing
3 changed files
with
99 additions
and
110 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
78 changes: 78 additions & 0 deletions
78
x-pack/plugins/infra/public/components/asset_details/components/top_processes_tooltip.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,78 @@ | ||
/* | ||
* 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 React from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { EuiText, EuiLink } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import { Popover } from '../tabs/common/popover'; | ||
|
||
const DOCUMENTATION_LINK = | ||
'https://www.elastic.co/guide/en/observability/current/view-infrastructure-metrics.html'; | ||
const SYSTEM_INTEGRATION_DOCS_LINK = 'https://docs.elastic.co/en/integrations/system'; | ||
|
||
export const TopProcessesTooltip = React.memo(() => { | ||
return ( | ||
<Popover | ||
aria-label={i18n.translate('xpack.infra.metrics.nodeDetails.processesHeader.tooltipLabel', { | ||
defaultMessage: 'More info', | ||
})} | ||
iconSize="m" | ||
icon="iInCircle" | ||
data-test-subj="infraAssetDetailsProcessesPopoverButton" | ||
> | ||
<EuiText size="xs" style={{ width: 300 }}> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.processes.tooltip.topProcesses" | ||
defaultMessage="The processes listed are based on an aggregation of the top CPU and the top memory consuming processes. It does not show all processes." | ||
/> | ||
</p> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.processes.tooltip.label" | ||
defaultMessage="The number of top processes is configurable in the {systemIntegration}." | ||
values={{ | ||
systemIntegration: ( | ||
<EuiLink | ||
data-test-subj="infraAssetDetailsTooltipSystemIntegrationDocumentationLink" | ||
href={SYSTEM_INTEGRATION_DOCS_LINK} | ||
target="_blank" | ||
> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.processes.tooltip.systemIntegrationDocumentationLink" | ||
defaultMessage="System Integration" | ||
/> | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
</p> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.processes.tooltip.documentationLabel" | ||
defaultMessage="Please see the following {documentation} for more details on processes." | ||
values={{ | ||
documentation: ( | ||
<EuiLink | ||
data-test-subj="infraAssetDetailsTooltipDocumentationLink" | ||
href={DOCUMENTATION_LINK} | ||
target="_blank" | ||
> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.processes.tooltip.documentationLink" | ||
defaultMessage="documentation" | ||
/> | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
</p> | ||
</EuiText> | ||
</Popover> | ||
); | ||
}); |
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