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 @@ -42,7 +42,21 @@ export function CollectLogs() {
}

return (
<StepPanel title="">
<StepPanel
title=""
panelFooter={
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
Back
</EuiButton>,
<EuiButton color="primary" fill onClick={onContinue}>
Continue
</EuiButton>,
]}
/>
}
>
<StepPanelContent>
<EuiText color="subdued">
<p>
Expand Down Expand Up @@ -90,16 +104,6 @@ export function CollectLogs() {
</EuiFlexItem>
</EuiFlexGroup>
</StepPanelContent>
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
Back
</EuiButton>,
<EuiButton color="primary" fill onClick={onContinue}>
Continue
</EuiButton>,
]}
/>
</StepPanel>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,26 @@ export function ConfigureLogs() {
}

return (
<StepPanel title="Choose what logs to collect">
<StepPanel
title="Choose what logs to collect"
panelFooter={
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
Back
</EuiButton>,
<EuiButton
color="primary"
fill
onClick={onContinue}
isDisabled={!(logsType && uploadType)}
>
Continue
</EuiButton>,
]}
/>
}
>
<StepPanelContent>
<LogsTypeSection
title="System logs"
Expand Down Expand Up @@ -152,21 +171,6 @@ export function ConfigureLogs() {
</EuiFlexGroup>
</LogsTypeSection>
</StepPanelContent>
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
Back
</EuiButton>,
<EuiButton
color="primary"
fill
onClick={onContinue}
isDisabled={!(logsType && uploadType)}
>
Continue
</EuiButton>,
]}
/>
</StepPanel>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,21 @@ export function CollectLogs() {
}

return (
<StepPanel title="">
<StepPanel
title=""
panelFooter={
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
Back
</EuiButton>,
<EuiButton color="primary" fill onClick={onContinue}>
Continue
</EuiButton>,
]}
/>
}
>
<StepPanelContent>
<EuiText color="subdued">
<p>
Expand Down Expand Up @@ -90,16 +104,6 @@ export function CollectLogs() {
</EuiFlexItem>
</EuiFlexGroup>
</StepPanelContent>
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
Back
</EuiButton>,
<EuiButton color="primary" fill onClick={onContinue}>
Continue
</EuiButton>,
]}
/>
</StepPanel>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@ import { useWizard } from '.';
export function Inspect() {
const { goBack, getState, getPath, getUsage } = useWizard();
return (
<StepPanel title="Inspect wizard">
<StepPanel
title="Inspect wizard"
panelFooter={
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={goBack}>
Back
</EuiButton>,
]}
/>
}
>
<StepPanelContent>
<EuiTitle size="s">
<h3>State</h3>
Expand All @@ -34,13 +45,6 @@ export function Inspect() {
</EuiTitle>
<pre>{JSON.stringify(getUsage(), null, 4)}</pre>
</StepPanelContent>
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={goBack}>
Back
</EuiButton>,
]}
/>
</StepPanel>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,21 @@ export function InstallElasticAgent() {
}

return (
<StepPanel title="Install the Elastic Agent">
<StepPanel
title="Install the Elastic Agent"
panelFooter={
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
Back
</EuiButton>,
<EuiButton color="primary" fill onClick={onContinue}>
Continue
</EuiButton>,
]}
/>
}
>
<StepPanelContent>
<EuiText color="subdued">
<p>
Expand Down Expand Up @@ -130,16 +144,6 @@ export function InstallElasticAgent() {
</EuiFlexGroup>
</LogsTypeSection>
</StepPanelContent>
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
Back
</EuiButton>,
<EuiButton color="primary" fill onClick={onContinue}>
Continue
</EuiButton>,
]}
/>
</StepPanel>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,26 @@ export function NameLogs() {
}

return (
<StepPanel title="Give your logs a name">
<StepPanel
title="Give your logs a name"
panelFooter={
<StepPanelFooter
items={[
<EuiButtonEmpty href="/app/observability/overview">
Skip for now
</EuiButtonEmpty>,
<EuiButton
color="primary"
fill
onClick={onContinue}
isDisabled={!datasetName}
>
Save and Continue
</EuiButton>,
]}
/>
}
>
<StepPanelContent>
<EuiText color="subdued">
<p>Pick a name for your logs, this will become your dataset name.</p>
Expand All @@ -52,21 +71,6 @@ export function NameLogs() {
</EuiFormRow>
</EuiForm>
</StepPanelContent>
<StepPanelFooter
items={[
<EuiButtonEmpty href="/app/observability/overview">
Skip for now
</EuiButtonEmpty>,
<EuiButton
color="primary"
fill
onClick={onContinue}
isDisabled={!datasetName}
>
Save and Continue
</EuiButton>,
]}
/>
</StepPanel>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ export function SelectLogs() {
defaultMessage: 'What logs do you want to collect?',
}
)}
panelFooter={
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
{i18n.translate('xpack.observability_onboarding.steps.back', {
defaultMessage: 'Back',
})}
</EuiButton>,
<></>,
]}
/>
}
>
<StepPanelContent>
<EuiFlexGroup>
Expand Down Expand Up @@ -187,16 +199,6 @@ export function SelectLogs() {
</EuiLink>
</LogsTypeSection>
</StepPanelContent>
<StepPanelFooter
items={[
<EuiButton color="ghost" fill onClick={onBack}>
{i18n.translate('xpack.observability_onboarding.steps.back', {
defaultMessage: 'Back',
})}
</EuiButton>,
<></>,
]}
/>
</StepPanel>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,35 @@ import {
EuiFlexItem,
EuiPanel,
EuiPanelProps,
EuiSpacer,
EuiTitle,
} from '@elastic/eui';

interface StepPanelProps {
title: string;
panelProps?: EuiPanelProps;
panelFooter?: ReactNode;
children?: ReactNode;
}

export function StepPanel(props: StepPanelProps) {
const { title, children } = props;
const { title, children, panelFooter } = props;
const panelProps = props.panelProps ?? null;
return (
<EuiPanel {...panelProps}>
<EuiFlexGroup direction="column">
<EuiFlexItem>
<EuiTitle size="m">
<h2>{title}</h2>
</EuiTitle>
</EuiFlexItem>
{children}
</EuiFlexGroup>
</EuiPanel>
<>
<EuiPanel {...panelProps}>
<EuiFlexGroup direction="column">
<EuiFlexItem>
<EuiTitle size="m">
<h2>{title}</h2>
</EuiTitle>
</EuiFlexItem>
{children}
</EuiFlexGroup>
</EuiPanel>
<EuiSpacer size="l" />
{panelFooter}
</>
);
}

Expand Down