-
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.
[Logs onboarding] Add select logs step (#156182)
Closes #154941 <img width="1434" alt="image" src="https://user-images.githubusercontent.com/1313018/236182563-e3c037ec-9ffb-49bb-9c05-a42882e3e66d.png"> --------- Co-authored-by: Oliver Gupte <[email protected]>
- Loading branch information
Showing
10 changed files
with
422 additions
and
64 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
105 changes: 105 additions & 0 deletions
105
...lugins/observability_onboarding/public/components/app/custom_logs/wizard/collect_logs.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,105 @@ | ||
/* | ||
* 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, | ||
EuiButtonEmpty, | ||
EuiCallOut, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiHorizontalRule, | ||
EuiLoadingSpinner, | ||
EuiSpacer, | ||
EuiSteps, | ||
EuiText, | ||
} from '@elastic/eui'; | ||
import React from 'react'; | ||
import { useWizard } from '.'; | ||
import { useFetcher } from '../../../../hooks/use_fetcher'; | ||
import { | ||
StepPanel, | ||
StepPanelContent, | ||
StepPanelFooter, | ||
} from '../../../shared/step_panel'; | ||
|
||
export function CollectLogs() { | ||
const { goToStep, goBack } = useWizard(); | ||
|
||
const { data } = useFetcher((callApi) => { | ||
return callApi('GET /internal/observability_onboarding/get_status'); | ||
}, []); | ||
|
||
function onContinue() { | ||
goToStep('inspect'); | ||
} | ||
|
||
function onBack() { | ||
goBack(); | ||
} | ||
|
||
return ( | ||
<StepPanel title=""> | ||
<StepPanelContent> | ||
<EuiText color="subdued"> | ||
<p> | ||
It might take a few minutes for the data to get to Elasticsearch. If | ||
you're not seeing any, try generating some to verify. If | ||
you're having trouble connecting, check out the troubleshooting | ||
guide. | ||
</p> | ||
</EuiText> | ||
<EuiSpacer size="m" /> | ||
<EuiCallOut> | ||
<EuiFlexGroup justifyContent="flexStart" alignItems="center"> | ||
<EuiFlexItem grow={false}> | ||
<EuiLoadingSpinner size="m" /> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<EuiText color="subdued"> | ||
<p>Listening for incoming logs</p> | ||
</EuiText> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</EuiCallOut> | ||
<EuiSpacer size="m" /> | ||
<EuiSteps | ||
titleSize="xs" | ||
steps={[ | ||
{ title: 'Ping received', status: data?.status, children: null }, | ||
{ title: 'File found', status: 'complete', children: null }, | ||
{ | ||
title: 'Downloading Elastic Agent', | ||
status: 'loading', | ||
children: null, | ||
}, | ||
{ | ||
title: 'Starting Elastic Agent', | ||
status: 'incomplete', | ||
children: null, | ||
}, | ||
]} | ||
/> | ||
<EuiHorizontalRule margin="l" /> | ||
<EuiFlexGroup justifyContent="center" alignItems="center"> | ||
<EuiFlexItem grow={false}> | ||
<EuiButtonEmpty iconType="help">Need some help?</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</StepPanelContent> | ||
<StepPanelFooter | ||
items={[ | ||
<EuiButton color="ghost" fill onClick={onBack}> | ||
Back | ||
</EuiButton>, | ||
<EuiButton color="primary" fill onClick={onContinue}> | ||
Continue | ||
</EuiButton>, | ||
]} | ||
/> | ||
</StepPanel> | ||
); | ||
} |
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
37 changes: 0 additions & 37 deletions
37
.../plugins/observability_onboarding/public/components/app/custom_logs/wizard/page_title.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.