Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Getting Started] Update content on interstitial page #78881

Merged
merged 1 commit into from
Sep 30, 2020
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 @@ -30,8 +30,8 @@ import {
EuiButton,
EuiButtonEmpty,
} from '@elastic/eui';

import { FormattedMessage } from '@kbn/i18n/react';
import { getServices } from '../../kibana_services';

interface Props {
urlBasePath: string;
Expand All @@ -40,22 +40,29 @@ interface Props {
}

export function SampleDataCard({ urlBasePath, onDecline, onConfirm }: Props) {
const IS_DARK_THEME = getServices().uiSettings.get('theme:darkMode');
const cardGraphicFile = !IS_DARK_THEME
? 'illustration_integrations_lightmode.png'
: 'illustration_integrations_darkmode.png';
const cardGraphicURL = `${urlBasePath}/plugins/home/assets/common/${cardGraphicFile}`;

return (
<EuiCard
image={`${urlBasePath}/plugins/home/assets/illustration_elastic_heart.png`}
image={cardGraphicURL}
textAlign="left"
title={<FormattedMessage id="home.letsStartTitle" defaultMessage="Let's get started" />}
title={
<FormattedMessage id="home.letsStartTitle" defaultMessage="Start by adding your data" />
}
description={
<FormattedMessage
id="home.letsStartDescription"
defaultMessage="We noticed that you don't have any data in your cluster.
You can try our sample data and dashboards or jump in with your own data."
defaultMessage="Add data to your cluster from any source, then analyze and visualize it in real time. Use our solutions to add search anywhere, observe your ecosystem, and protect against security threats."
/>
}
footer={
<footer>
<EuiButton fill className="homWelcome__footerAction" onClick={onConfirm}>
<FormattedMessage id="home.tryButtonLabel" defaultMessage="Try our sample data" />
<FormattedMessage id="home.tryButtonLabel" defaultMessage="Add data" />
</EuiButton>
<EuiButtonEmpty
className="homWelcome__footerAction"
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/home/public/application/components/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export class Welcome extends React.Component<Props> {
}
};

private redirecToSampleData() {
const path = this.services.addBasePath('#/tutorial_directory/sampleData');
private redirecToAddData() {
const path = this.services.addBasePath('#/tutorial_directory');
window.location.href = path;
}

Expand All @@ -70,7 +70,7 @@ export class Welcome extends React.Component<Props> {

private onSampleDataConfirm = () => {
this.services.trackUiMetric(METRIC_TYPE.CLICK, 'sampleDataConfirm');
this.redirecToSampleData();
this.redirecToAddData();
};

componentDidMount() {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.