Skip to content

Commit

Permalink
[8.7] profiling: fix setup page and instructions (#150885) (#151266)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.7`:
- [profiling: fix setup page and instructions
(#150885)](#150885)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Francesco
Gualazzi","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-02-15T10:50:29Z","message":"profiling:
fix setup page and instructions (#150885)\n\nResolves
https://github.com/elastic/prodfiler/issues/2961.\r\nWe update the setup
information text instructions to add data for\r\nUniversal Profiling
Beta.\r\n\r\n\r\nSigned-off-by: inge4pres
<[email protected]>\r\nCo-authored-by: boriskirov
<[email protected]>\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"560c3b96f81ce2167a3d104bf97e4fe5a1e7fb76","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","8.7
candidate","ci:build-cloud-image","ci:cloud-deploy","ci:cloud-redeploy","v8.7.0","v8.8.0"],"number":150885,"url":"https://github.com/elastic/kibana/pull/150885","mergeCommit":{"message":"profiling:
fix setup page and instructions (#150885)\n\nResolves
https://github.com/elastic/prodfiler/issues/2961.\r\nWe update the setup
information text instructions to add data for\r\nUniversal Profiling
Beta.\r\n\r\n\r\nSigned-off-by: inge4pres
<[email protected]>\r\nCo-authored-by: boriskirov
<[email protected]>\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"560c3b96f81ce2167a3d104bf97e4fe5a1e7fb76"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150885","number":150885,"mergeCommit":{"message":"profiling:
fix setup page and instructions (#150885)\n\nResolves
https://github.com/elastic/prodfiler/issues/2961.\r\nWe update the setup
information text instructions to add data for\r\nUniversal Profiling
Beta.\r\n\r\n\r\nSigned-off-by: inge4pres
<[email protected]>\r\nCo-authored-by: boriskirov
<[email protected]>\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"560c3b96f81ce2167a3d104bf97e4fe5a1e7fb76"}}]}]
BACKPORT-->

Co-authored-by: Francesco Gualazzi <[email protected]>
  • Loading branch information
kibanamachine and inge4pres authored Feb 15, 2023
1 parent 09c3bd1 commit c88403c
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 12 deletions.
70 changes: 64 additions & 6 deletions x-pack/plugins/profiling/public/components/check_setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiText } from '@elastic/eui';
import {
EuiButton,
EuiCallOut,
EuiFlexGrid,
EuiFlexGroup,
EuiFlexItem,
EuiLink,
EuiLoadingSpinner,
EuiText,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React, { useState } from 'react';
import { AsyncStatus, useAsync } from '../hooks/use_async';
Expand Down Expand Up @@ -49,6 +58,13 @@ export function CheckSetup({ children }: { children: React.ReactElement }) {
<EuiFlexItem grow={false}>
<EuiLoadingSpinner size="xxl" />
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiText>
{i18n.translate('xpack.profiling.noDataConfig.loading.loaderText', {
defaultMessage: 'Loading data sources',
})}
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
</ProfilingAppPageTemplate>
);
Expand Down Expand Up @@ -81,12 +97,54 @@ export function CheckSetup({ children }: { children: React.ReactElement }) {
action: {
elasticAgent: {
description: (
<EuiText>
{i18n.translate('xpack.profiling.noDataConfig.action.title', {
defaultMessage: `Universal Profiling provides fleet-wide, whole-system, continuous profiling with zero instrumentation.
<EuiFlexGrid gutterSize="s">
<EuiText>
{i18n.translate('xpack.profiling.noDataConfig.action.title', {
defaultMessage: `Universal Profiling provides fleet-wide, whole-system, continuous profiling with zero instrumentation.
Understand what lines of code are consuming compute resources, at all times, and across your entire infrastructure.`,
})}
</EuiText>
})}
</EuiText>
<EuiCallOut
size="s"
color="warning"
title={i18n.translate(
'xpack.profiling.noDataConfig.action.permissionsWarning',
{
defaultMessage:
'To setup Universal Profiling, you must be logged in as a superuser.',
}
)}
/>
<EuiText size={'xs'}>
<ul>
<li>
{i18n.translate('xpack.profiling.noDataConfig.action.dataRetention', {
defaultMessage: `Normal data storage costs apply for profiling data stored in Elasticsearch.
To control data retention. `,
})}
<EuiLink target="_blank" href={docsLink}>
{i18n.translate('xpack.profiling.noDataConfig.readMore.linkLabel', {
defaultMessage: 'Read more',
})}
</EuiLink>
</li>
<li>
{i18n.translate('xpack.profiling.noDataConfig.action.legalBetaTerms', {
defaultMessage: `By using this feature, you acknowledge that you have read and agree to `,
})}
<EuiLink
target="_blank"
href={`https://www.elastic.co/agreements/beta-release-terms`}
>
{i18n.translate('xpack.profiling.noDataConfig.betaTerms.linkLabel', {
defaultMessage: 'Elastic Beta Release Terms',
})}
</EuiLink>
</li>
</ul>
</EuiText>
<EuiText size={'xs'} />
</EuiFlexGrid>
),
onClick: (event: React.MouseEvent<HTMLElement, MouseEvent>) => {
event.preventDefault();
Expand Down
11 changes: 6 additions & 5 deletions x-pack/plugins/profiling/public/components/no_data_page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ docker.elastic.co/observability/profiling-agent:stable /root/pf-host-agent \\
}),
content: (
<EuiCodeBlock paddingSize="s" isCopyable>
wget -O- https://releases.prodfiler.com/stable/pf-host-agent_linux_amd64.tgz | tar xz
wget -O pf-host-agent.tgz &quot;https://ela.st/pf-host-agent-amd64&quot; && tar xzf
pf-host-agent.tgz
</EuiCodeBlock>
),
},
Expand Down Expand Up @@ -162,8 +163,8 @@ docker.elastic.co/observability/profiling-agent:stable /root/pf-host-agent \\
'Open the URL below and download the right DEB package for your CPU architecture:',
}),
content: (
<EuiLink target="_blank" href={`https://releases.prodfiler.com/stable/index.html`}>
https://releases.prodfiler.com/stable/index.html
<EuiLink target="_blank" href={`https://ela.st/pf-host-agent-linux`}>
https://ela.st/pf-host-agent-linux
</EuiLink>
),
},
Expand Down Expand Up @@ -212,8 +213,8 @@ docker.elastic.co/observability/profiling-agent:stable /root/pf-host-agent \\
'Open the URL below and download the right RPM package for your CPU architecture:',
}),
content: (
<EuiLink target="_blank" href={`https://releases.prodfiler.com/stable/index.html`}>
https://releases.prodfiler.com/stable/index.html
<EuiLink target="_blank" href={`https://ela.st/pf-host-agent-linux`}>
https://ela.st/pf-host-agent-linux
</EuiLink>
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function ProfilingHeaderActionMenu() {
<EuiHeaderLink href={router.link('/add-data-instructions')} color="primary">
<EuiFlexGroup direction="row" gutterSize="s" alignItems="center">
<EuiFlexItem grow={false}>
<EuiIcon type="listAdd" />
<EuiIcon type="indexOpen" />
</EuiFlexItem>
<EuiFlexItem grow={false}>
{i18n.translate('xpack.profiling.headerActionMenu.addData', {
Expand Down

0 comments on commit c88403c

Please sign in to comment.