-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This addresses the UI code required for #154929. The API work can be accomplished separately. The existing APIs (for custom logs) are used in their place for this PR. ![Screenshot 2023-07-27 at 13 03 50](https://github.com/elastic/kibana/assets/1967266/f27a2063-822a-4169-bd98-f22985661349) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
df2c012
commit a3281ad
Showing
6 changed files
with
453 additions
and
1 deletion.
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
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
52 changes: 52 additions & 0 deletions
52
x-pack/plugins/observability_onboarding/public/components/app/system_logs/index.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,52 @@ | ||
/* | ||
* 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 { i18n } from '@kbn/i18n'; | ||
import { | ||
createWizardContext, | ||
Step, | ||
} from '../../../context/create_wizard_context'; | ||
import { InstallElasticAgent } from './install_elastic_agent'; | ||
|
||
interface WizardState { | ||
elasticAgentPlatform: 'linux-tar' | 'macos' | 'windows'; | ||
autoDownloadConfig: boolean; | ||
apiKeyEncoded: string; | ||
onboardingId: string; | ||
} | ||
|
||
const initialState: WizardState = { | ||
elasticAgentPlatform: 'linux-tar', | ||
autoDownloadConfig: false, | ||
apiKeyEncoded: '', | ||
onboardingId: '', | ||
}; | ||
|
||
export type SystemLogsSteps = 'installElasticAgent'; | ||
|
||
const steps: Record<SystemLogsSteps, Step> = { | ||
installElasticAgent: { | ||
component: InstallElasticAgent, | ||
title: i18n.translate( | ||
'xpack.observability_onboarding.systemLogs.installShipper.title', | ||
{ defaultMessage: 'Install shipper to collect system logs' } | ||
), | ||
}, | ||
}; | ||
|
||
const { | ||
Provider, | ||
useWizard, | ||
routes: systemLogsRoutes, | ||
} = createWizardContext({ | ||
initialState, | ||
initialStep: 'installElasticAgent', | ||
steps, | ||
basePath: '/systemLogs', | ||
}); | ||
|
||
export { Provider, useWizard, systemLogsRoutes }; |
Oops, something went wrong.