Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c7ec189
Merge pull request #1 from elastic/master
Nox911 Sep 24, 2018
fa01b88
Merge pull request #2 from elastic/master
Nox911 Sep 27, 2018
70f6c7e
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Sep 27, 2018
68587a0
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Sep 28, 2018
42aa7d3
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 2, 2018
efeaefe
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 2, 2018
8a054ed
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 8, 2018
b0d1660
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 16, 2018
62b6ad1
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 17, 2018
acbad4b
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 18, 2018
a850650
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 22, 2018
0a200ce
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 25, 2018
b2a8244
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 29, 2018
b4b979e
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 30, 2018
d349a4f
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Oct 31, 2018
ae285b9
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 2, 2018
3051641
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 5, 2018
6231971
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 8, 2018
f86a3d4
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 9, 2018
cf813c7
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 13, 2018
1aba03f
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 14, 2018
491009b
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 15, 2018
e243126
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 22, 2018
e74bd61
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 22, 2018
8bc5ffa
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 23, 2018
5787937
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 23, 2018
f17fa1e
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 24, 2018
c63b0a6
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 26, 2018
ed62b5b
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 26, 2018
df4fab4
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 26, 2018
46d284a
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 27, 2018
d1fd49e
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 29, 2018
ec1ad76
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 29, 2018
6ebd934
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Nov 30, 2018
332d867
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 3, 2018
4a99411
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 3, 2018
4cdec42
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 4, 2018
5d44df7
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 4, 2018
c6e63aa
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 4, 2018
8182d1f
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 4, 2018
aefb90f
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 5, 2018
e4e7120
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 6, 2018
a9a6043
Merge branch 'master' of https://github.com/elastic/kibana
Dec 7, 2018
9d247e6
Merge branch 'master' of https://github.com/elastic/kibana
Dec 10, 2018
bd707af
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 11, 2018
61d5119
Add missing labels translations
Nox911 Dec 11, 2018
40530d3
Update snapshot
Nox911 Dec 11, 2018
71fb60d
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 12, 2018
4d95475
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 13, 2018
39cbaaa
Fix issues
Nox911 Dec 13, 2018
62e824d
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 13, 2018
4463796
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 14, 2018
af38a6e
Merge branch 'master' into feature/translate-home-and-dashboard
Nox911 Dec 14, 2018
876e358
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 14, 2018
231a859
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 14, 2018
30281a2
Merge branch 'master' into feature/translate-home-and-dashboard
Nox911 Dec 14, 2018
2af5dc9
Merge branch 'master' of https://github.com/elastic/kibana
Nox911 Dec 14, 2018
b3de4be
Merge branch 'master' into feature/translate-home-and-dashboard
Nox911 Dec 14, 2018
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 @@ -548,7 +548,11 @@ exports[`after fetch renders warning when listingLimit is exceeded 1`] = `
/>
</EuiLink>,
"listingLimitText": <strong>
listingLimit
<FormattedMessage
defaultMessage="listingLimit"
id="kbn.dashboard.listing.listingLimitExceededListingLimitTitle"
values={Object {}}
/>
</strong>,
"listingLimitValue": 1,
"totalDashboards": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ class DashboardListingUi extends React.Component {
listingLimitValue: this.props.listingLimit,
listingLimitText: (
<strong>
listingLimit
<FormattedMessage
id="kbn.dashboard.listing.listingLimitExceededListingLimitTitle"
defaultMessage="listingLimit"
/>
</strong>
),
advancedSettingsLink: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ exports[`isCloudEnabled is false should not render instruction toggle when ON_PR
/>
</React.Fragment>
<div>
<Introduction
<InjectIntl(IntroductionUI)
description="tutorial used to drive jest tests"
isBeta={false}
title="jest test tutorial"
/>
<EuiSpacer
Expand Down Expand Up @@ -117,10 +116,9 @@ exports[`isCloudEnabled is false should render ON_PREM instructions with instruc
/>
</React.Fragment>
<div>
<Introduction
<InjectIntl(IntroductionUI)
description="tutorial used to drive jest tests"
iconType="logoApache"
isBeta={false}
title="jest test tutorial"
/>
<EuiSpacer
Expand Down Expand Up @@ -210,10 +208,9 @@ exports[`should not render breadcrumbs when K7 1`] = `
restrictWidth={false}
>
<div>
<Introduction
<InjectIntl(IntroductionUI)
description="tutorial used to drive jest tests"
iconType="logoApache"
isBeta={false}
title="jest test tutorial"
/>
<EuiSpacer
Expand Down Expand Up @@ -293,10 +290,9 @@ exports[`should render ELASTIC_CLOUD instructions when isCloudEnabled is true 1`
/>
</React.Fragment>
<div>
<Introduction
<InjectIntl(IntroductionUI)
description="tutorial used to drive jest tests"
iconType="logoApache"
isBeta={false}
title="jest test tutorial"
/>
<EuiSpacer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ class InstructionSetUi extends React.Component {
case StatusCheckStates.ERROR:
return 'danger';
default:
throw new Error(`Unexpected status check state ${statusCheckState}`);
throw new Error(this.props.intl.formatMessage({
id: 'kbn.home.tutorial.unexpectedStatusCheckStateErrorDescription',
defaultMessage: 'Unexpected status check state {statusCheckState}'
}, {
statusCheckState
}));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import {
EuiBetaBadge,
} from '@elastic/eui';

import { FormattedMessage } from '@kbn/i18n/react';
import { FormattedMessage, injectI18n } from '@kbn/i18n/react';

export function Introduction({ description, previewUrl, title, exportedFieldsUrl, iconType, isBeta }) {
function IntroductionUI({ description, previewUrl, title, exportedFieldsUrl, iconType, isBeta, intl }) {
let img;
if (previewUrl) {
img = (
Expand All @@ -42,7 +42,10 @@ export function Introduction({ description, previewUrl, title, exportedFieldsUrl
hasShadow
allowFullScreen
fullScreenIconColor="dark"
alt="screenshot of primary dashboard."
alt={intl.formatMessage({
id: 'kbn.home.tutorial.introduction.imageAltDescription',
defaultMessage: 'screenshot of primary dashboard.'
})}
url={previewUrl}
/>
);
Expand Down Expand Up @@ -75,7 +78,12 @@ export function Introduction({ description, previewUrl, title, exportedFieldsUrl
let betaBadge;
if (isBeta) {
betaBadge = (
<EuiBetaBadge label="Beta" />
<EuiBetaBadge
label={intl.formatMessage({
id: 'kbn.home.tutorial.introduction.betaLabel',
defaultMessage: 'Beta'
})}
/>
);
}
return (
Expand Down Expand Up @@ -109,7 +117,7 @@ export function Introduction({ description, previewUrl, title, exportedFieldsUrl
);
}

Introduction.propTypes = {
IntroductionUI.propTypes = {
description: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
previewUrl: PropTypes.string,
Expand All @@ -118,6 +126,8 @@ Introduction.propTypes = {
isBeta: PropTypes.bool,
};

Introduction.defaultProps = {
IntroductionUI.defaultProps = {
isBeta: false
};

export const Introduction = injectI18n(IntroductionUI);
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/

import React from 'react';
import { shallow } from 'enzyme';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';

import { Introduction } from './introduction';

test('render', () => {
const component = shallow(<Introduction
const component = shallowWithIntl(<Introduction.WrappedComponent
description="this is a great tutorial about..."
title="Great tutorial"
/>);
Expand All @@ -32,7 +32,7 @@ test('render', () => {

describe('props', () => {
test('iconType', () => {
const component = shallow(<Introduction
const component = shallowWithIntl(<Introduction.WrappedComponent
description="this is a great tutorial about..."
title="Great tutorial"
iconType="logoElastic"
Expand All @@ -41,7 +41,7 @@ describe('props', () => {
});

test('exportedFieldsUrl', () => {
const component = shallow(<Introduction
const component = shallowWithIntl(<Introduction.WrappedComponent
description="this is a great tutorial about..."
title="Great tutorial"
exportedFieldsUrl="exported_fields_url"
Expand All @@ -50,7 +50,7 @@ describe('props', () => {
});

test('previewUrl', () => {
const component = shallow(<Introduction
const component = shallowWithIntl(<Introduction.WrappedComponent
description="this is a great tutorial about..."
title="Great tutorial"
previewUrl="preview_image_url"
Expand All @@ -59,7 +59,7 @@ describe('props', () => {
});

test('isBeta', () => {
const component = shallow(<Introduction
const component = shallowWithIntl(<Introduction.WrappedComponent
description="this is a great tutorial about..."
title="Great tutorial"
isBeta={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ class TutorialUi extends React.Component {
case INSTRUCTIONS_TYPE.ON_PREM_ELASTIC_CLOUD:
return this.state.tutorial.onPremElasticCloud;
default:
throw new Error(`Unhandled instruction type ${this.state.visibleInstructions}`);
throw new Error(this.props.intl.formatMessage({
id: 'kbn.home.tutorial.unhandledInstructionTypeErrorDescription',
defaultMessage: 'Unhandled instruction type {visibleInstructions}'
}, {
visibleInstructions: this.state.visibleInstructions
}));
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class TutorialDirectoryUi extends React.Component {
<EuiTitle size="l">
<h1>
<FormattedMessage
id="kbn.home.tutorial.addDataTitle"
id="kbn.home.tutorial.addDataToKibanaTitle"
defaultMessage="Add Data to Kibana"
/>
</h1>
Expand Down