[Logs onboarding] Remove inspect button at the end of the flow (#166423)

Closes https://github.com/elastic/kibana/issues/166256.

### Before

![image](1f73cbb5-3acc-471d-9281-8c62d0ef0abb)

### After
<img width="1191" alt="image"
src="ab769f98-fe4f-407c-b21a-13b21c91f300">

### How to test
1. Go to [logs
onboarding](https://yngrdyn-deploy-kiban-pr166423.kb.us-west2.gcp.elastic-cloud.com/app/observabilityOnboarding)
landing page
2. Select `Stream log files` type of onboarding
3. Fill out the required fields
4. Go to next step
5. Verify that `Inspect` button is no longer next to `Explore logs`
button
This commit is contained in:
Yngrid Coello 2023-09-14 12:46:59 +02:00 committed by GitHub
parent d7451f6215
commit 688980ce34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 32 additions and 56 deletions

View file

@ -26,7 +26,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { RouteComponentProps, RouteProps } from 'react-router-dom';
import { ConfigSchema } from '..';
import { customLogsRoutes } from '../components/app/custom_logs/wizard';
import { customLogsRoutes } from '../components/app/custom_logs';
import { systemLogsRoutes } from '../components/app/system_logs';
import { ObservabilityOnboardingHeaderActionMenu } from '../components/app/header_action_menu';
import {

View file

@ -18,7 +18,7 @@ import { IHttpFetchError, ResponseErrorBody } from '@kbn/core-http-browser';
import { i18n } from '@kbn/i18n';
import { FETCH_STATUS } from '@kbn/observability-shared-plugin/public';
import React from 'react';
import { APIReturnType } from '../../../../services/rest/create_call_api';
import { APIReturnType } from '../../../services/rest/create_call_api';
type ApiKeyPayload =
APIReturnType<'POST /internal/observability_onboarding/logs/flow'>;

View file

@ -35,12 +35,12 @@ import {
} from '@kbn/custom-integrations';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { useWizard } from '.';
import { OptionalFormRow } from '../../../shared/optional_form_row';
import { OptionalFormRow } from '../../shared/optional_form_row';
import {
StepPanel,
StepPanelContent,
StepPanelFooter,
} from '../../../shared/step_panel';
} from '../../shared/step_panel';
import { BackButton } from './back_button';
import { getFilename } from './get_filename';

View file

@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
import {
createWizardContext,
Step,
} from '../../../../context/create_wizard_context';
} from '../../../context/create_wizard_context';
import { ConfigureLogs } from './configure_logs';
import { Inspect } from './inspect';
import { InstallElasticAgent } from './install_elastic_agent';

View file

@ -11,7 +11,7 @@ import {
StepPanel,
StepPanelContent,
StepPanelFooter,
} from '../../../shared/step_panel';
} from '../../shared/step_panel';
import { useWizard } from '.';
import { BackButton } from './back_button';

View file

@ -7,10 +7,7 @@
import {
EuiButton,
EuiButtonEmpty,
EuiCallOut,
EuiFlexGroup,
EuiFlexItem,
EuiHorizontalRule,
EuiSpacer,
EuiText,
@ -18,28 +15,28 @@ import {
import { i18n } from '@kbn/i18n';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { default as React, useCallback, useEffect, useState } from 'react';
import { ObservabilityOnboardingPluginSetupDeps } from '../../../../plugin';
import { ObservabilityOnboardingPluginSetupDeps } from '../../../plugin';
import { useWizard } from '.';
import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher';
import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher';
import {
ElasticAgentPlatform,
getElasticAgentSetupCommand,
} from '../../../shared/get_elastic_agent_setup_command';
} from '../../shared/get_elastic_agent_setup_command';
import {
InstallElasticAgentSteps,
ProgressStepId,
EuiStepStatus,
} from '../../../shared/install_elastic_agent_steps';
} from '../../shared/install_elastic_agent_steps';
import {
StepPanel,
StepPanelContent,
StepPanelFooter,
} from '../../../shared/step_panel';
} from '../../shared/step_panel';
import { ApiKeyBanner } from './api_key_banner';
import { BackButton } from './back_button';
import { getDiscoverNavigationParams } from '../../utils';
import { WindowsInstallStep } from '../../../shared/windows_install_step';
import { TroubleshootingLink } from '../../../shared/troubleshooting_link';
import { getDiscoverNavigationParams } from '../utils';
import { WindowsInstallStep } from '../../shared/windows_install_step';
import { TroubleshootingLink } from '../../shared/troubleshooting_link';
export function InstallElasticAgent() {
const {
@ -47,14 +44,11 @@ export function InstallElasticAgent() {
discover: { locator },
},
} = useKibana<ObservabilityOnboardingPluginSetupDeps>();
const { goBack, goToStep, getState, setState } = useWizard();
const { goBack, getState, setState } = useWizard();
const wizardState = getState();
const [elasticAgentPlatform, setElasticAgentPlatform] =
useState<ElasticAgentPlatform>('linux-tar');
function onInspect() {
goToStep('inspect');
}
async function onContinue() {
await locator?.navigate(
getDiscoverNavigationParams([wizardState.datasetName])
@ -235,33 +229,18 @@ export function InstallElasticAgent() {
<StepPanelFooter
items={[
<BackButton onBack={goBack} />,
<EuiFlexGroup justifyContent="flexEnd" alignItems="center">
<EuiFlexItem grow={false}>
<EuiButtonEmpty
data-test-subj="observabilityOnboardingInstallElasticAgentInspectButton"
onClick={onInspect}
>
{i18n.translate(
'xpack.observability_onboarding.steps.inspect',
{ defaultMessage: 'Inspect' }
)}
</EuiButtonEmpty>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
data-test-subj="obltOnboardingExploreLogs"
color="success"
fill
iconType="magnifyWithPlus"
onClick={onContinue}
>
{i18n.translate(
'xpack.observability_onboarding.steps.exploreLogs',
{ defaultMessage: 'Explore logs' }
)}
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>,
<EuiButton
data-test-subj="obltOnboardingExploreLogs"
color="success"
fill
iconType="magnifyWithPlus"
onClick={onContinue}
>
{i18n.translate(
'xpack.observability_onboarding.steps.exploreLogs',
{ defaultMessage: 'Explore logs' }
)}
</EuiButton>,
]}
/>
}

View file

@ -25,9 +25,9 @@ import {
StepPanel,
StepPanelContent,
StepPanelFooter,
} from '../../../shared/step_panel';
} from '../../shared/step_panel';
import { useWizard } from '.';
import { useKibanaNavigation } from '../../../../hooks/use_kibana_navigation';
import { useKibanaNavigation } from '../../../hooks/use_kibana_navigation';
export function SelectLogs() {
const { navigateToKibanaUrl, navigateToAppUrl } = useKibanaNavigation();

View file

@ -35,7 +35,7 @@ import {
StepPanelContent,
StepPanelFooter,
} from '../../shared/step_panel';
import { ApiKeyBanner } from '../custom_logs/wizard/api_key_banner';
import { ApiKeyBanner } from '../custom_logs/api_key_banner';
import { getDiscoverNavigationParams } from '../utils';
import { WindowsInstallStep } from '../../shared/windows_install_step';
import { SystemIntegrationBanner } from './system_integration_banner';

View file

@ -8,7 +8,7 @@
import * as t from 'io-ts';
import React from 'react';
import { Redirect } from 'react-router-dom';
import { customLogsRoutes } from '../components/app/custom_logs/wizard';
import { customLogsRoutes } from '../components/app/custom_logs';
import { systemLogsRoutes } from '../components/app/system_logs';
import { Home } from '../components/app/home';

View file

@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public';
import React, { ComponentType, useRef, useState } from 'react';
import { breadcrumbsApp } from '../../application/app';
import { Provider as WizardProvider } from '../../components/app/custom_logs/wizard';
import { Provider as WizardProvider } from '../../components/app/custom_logs';
import {
FilmstripFrame,
FilmstripTransition,

View file

@ -27097,7 +27097,6 @@
"xpack.observability_onboarding.selectLogs.useOwnShipper.description": "Utilisez votre propre agent de transfert pour collecter des données de logs en générant une clé dAPI.",
"xpack.observability_onboarding.steps.back": "Retour",
"xpack.observability_onboarding.steps.exploreLogs": "Explorer les logs",
"xpack.observability_onboarding.steps.inspect": "Inspecter",
"xpack.observability_onboarding.title.collectCustomLogs": "Collectez des logs personnalisés",
"xpack.observability.apmEnableContinuousRollupsDescription": "{betaLabel} Lorsque les cumuls continus sont activés, l'interface utilisateur sélectionne des indicateurs ayant la résolution appropriée. Sur des plages temporelles plus larges, des indicateurs de résolution inférieure sont utilisés, ce qui améliore les temps de chargement.",
"xpack.observability.apmEnableServiceMetricsDescription": "{betaLabel} Permet l'utilisation d'indicateurs de transaction de service. Il s'agit d'indicateurs à faible cardinalité qui peuvent être utilisés par certaines vues, comme l'inventaire de service, pour accélérer le chargement.",

View file

@ -27097,7 +27097,6 @@
"xpack.observability_onboarding.selectLogs.useOwnShipper.description": "APIキーを生成し、ログデータを収集するために独自のシッパーを使用します。",
"xpack.observability_onboarding.steps.back": "戻る",
"xpack.observability_onboarding.steps.exploreLogs": "ログを探索",
"xpack.observability_onboarding.steps.inspect": "検査",
"xpack.observability_onboarding.title.collectCustomLogs": "カスタムログを収集",
"xpack.observability.apmEnableContinuousRollupsDescription": "{betaLabel}連続ロールアップが有効な場合、UIは適切な解像度でメトリックを選択します。より大きな時間範囲では、より低い解像度の測定基準が使用され、読み込み時間が改善されます。",
"xpack.observability.apmEnableServiceMetricsDescription": "{betaLabel}サービストランザクションメトリックの使用を有効にします。これは、サービスインベントリなどの特定のビューで使用できる低カーディナリティのメトリックで、読み込み時間を短縮します。",

View file

@ -27095,7 +27095,6 @@
"xpack.observability_onboarding.selectLogs.useOwnShipper.description": "通过生成 API 密钥使用您自己的采集器来收集日志数据。",
"xpack.observability_onboarding.steps.back": "返回",
"xpack.observability_onboarding.steps.exploreLogs": "浏览日志",
"xpack.observability_onboarding.steps.inspect": "检查",
"xpack.observability_onboarding.title.collectCustomLogs": "收集定制日志",
"xpack.observability.apmEnableContinuousRollupsDescription": "{betaLabel} 启用连续汇总/打包时UI 将以适当分辨率选择指标。在更大时间范围内,将使用分辨率较低的指标,这会缩短加载时间。",
"xpack.observability.apmEnableServiceMetricsDescription": "{betaLabel} 启用服务事务指标,这种是低基数指标,可供某些视图(如服务库存)使用来加快加载速度。",