Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
*/

import React from 'react';
import { EuiCallOut, EuiText, EuiSpacer, EuiButton } from '@elastic/eui';
import { EuiCallOut, EuiText, EuiSpacer, EuiButton, EuiLink } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';

import type { InstalledIntegrationPolicy } from './use_get_agent_incoming_data';
Expand All @@ -17,13 +18,15 @@ interface Props {
installedPolicy?: InstalledIntegrationPolicy;
agentDataConfirmed: boolean;
setAgentDataConfirmed: (v: boolean) => void;
troubleshootLink: string;
}

export const ConfirmIncomingData: React.FunctionComponent<Props> = ({
agentIds,
installedPolicy,
agentDataConfirmed,
setAgentDataConfirmed,
troubleshootLink,
}) => {
const { incomingData, isLoading } = usePollingIncomingData(agentIds);

Expand All @@ -37,11 +40,21 @@ export const ConfirmIncomingData: React.FunctionComponent<Props> = ({
}
if (!agentDataConfirmed) {
return (
<EuiText size="s">
{i18n.translate('xpack.fleet.confirmIncomingData.loading', {
defaultMessage:
'It may take a few minutes for data to arrive in Elasticsearch. If the system is not generating data, it may help to generate some to ensure data is being collected correctly. If you’re having trouble, see our troubleshooting guide. You may close this dialog and check later by viewing our integration assets.',
})}
<EuiText>
<FormattedMessage
id="xpack.fleet.confirmIncomingData.loading"
defaultMessage="It may take a few minutes for data to arrive in Elasticsearch. If the system is not generating data, it may help to generate some to ensure data is being collected correctly. If you’re having trouble, see our {link}. You may close this dialog and check later by viewing your integration assets."
values={{
link: (
<EuiLink target="_blank" external href={troubleshootLink}>
<FormattedMessage
id="xpack.fleet.enrollmentInstructions.troubleshootingLink"
defaultMessage="troubleshooting guide"
/>
</EuiLink>
),
}}
/>
</EuiText>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export const ManagedSteps: React.FunctionComponent<InstructionProps> = ({
agentDataConfirmed,
setAgentDataConfirmed,
installedPolicy: installedPackagePolicy,
troubleshootLink: link,
})
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ export const IncomingDataConfirmationStep = ({
installedPolicy,
agentDataConfirmed,
setAgentDataConfirmed,
troubleshootLink,
}: {
agentIds: string[];
installedPolicy?: InstalledIntegrationPolicy;
agentDataConfirmed: boolean;
setAgentDataConfirmed: (v: boolean) => void;
troubleshootLink: string;
}): EuiContainedStepProps => {
return {
title: !agentDataConfirmed
Expand All @@ -41,6 +43,7 @@ export const IncomingDataConfirmationStep = ({
installedPolicy={installedPolicy}
agentDataConfirmed={agentDataConfirmed}
setAgentDataConfirmed={setAgentDataConfirmed}
troubleshootLink={troubleshootLink}
/>
) : null,
status: agentIds.length > 0 ? (!agentDataConfirmed ? 'loading' : 'complete') : 'disabled',
Expand Down