Skip to content

Commit

Permalink
profiling: fix setup page and instructions (#150885)
Browse files Browse the repository at this point in the history
Resolves elastic/prodfiler#2961.
We update the setup information text instructions to add data for
Universal Profiling Beta.


Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Co-authored-by: boriskirov <boris.kirov@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 15, 2023
1 parent b7c0d10 commit 560c3b9
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 560c3b9

Please sign in to comment.