+
+
+
+ Great tutorial
+
+
+
+
+
+
+
+
+`;
+
+exports[`props isBeta 1`] = `
+
+
+
+
+
+
+
+ Great tutorial
+
+
+
+
+
+
+
@@ -109,16 +203,32 @@ exports[`props previewUrl 1`] = `
component="div"
grow={true}
>
-
-
- Great tutorial
-
-
-
+
+
+
+
+ Great tutorial
+
+
+
+
@@ -153,16 +263,32 @@ exports[`render 1`] = `
component="div"
grow={true}
>
-
-
- Great tutorial
-
-
-
+
+
+
+
+ Great tutorial
+
+
+
+
diff --git a/src/core_plugins/kibana/public/home/components/tutorial/__snapshots__/tutorial.test.js.snap b/src/core_plugins/kibana/public/home/components/tutorial/__snapshots__/tutorial.test.js.snap
index f415e0d6c3d31..80d6494c65309 100644
--- a/src/core_plugins/kibana/public/home/components/tutorial/__snapshots__/tutorial.test.js.snap
+++ b/src/core_plugins/kibana/public/home/components/tutorial/__snapshots__/tutorial.test.js.snap
@@ -26,6 +26,7 @@ exports[`isCloudEnabled is false should not render instruction toggle when ON_PR
);
}
+ let betaBadge;
+ if (isBeta) {
+ betaBadge = (
+
+
+
+ );
+ }
return (
-
-
+
+
+
{icon}
- {title}
-
-
-
+
+
+
+
+ {title}
+
+
+
+ {betaBadge}
+
+
{exportedFields}
+
+
{img}
@@ -96,4 +115,9 @@ Introduction.propTypes = {
previewUrl: PropTypes.string,
exportedFieldsUrl: PropTypes.string,
iconType: PropTypes.string,
+ isBeta: PropTypes.bool,
+};
+
+Introduction.defaultProps = {
+ isBeta: false
};
diff --git a/src/core_plugins/kibana/public/home/components/tutorial/introduction.test.js b/src/core_plugins/kibana/public/home/components/tutorial/introduction.test.js
index d72f9379f589f..b90a020275225 100644
--- a/src/core_plugins/kibana/public/home/components/tutorial/introduction.test.js
+++ b/src/core_plugins/kibana/public/home/components/tutorial/introduction.test.js
@@ -57,4 +57,13 @@ describe('props', () => {
/>);
expect(component).toMatchSnapshot(); // eslint-disable-line
});
+
+ test('isBeta', () => {
+ const component = shallow();
+ expect(component).toMatchSnapshot(); // eslint-disable-line
+ });
});
diff --git a/src/core_plugins/kibana/public/home/components/tutorial/tutorial.js b/src/core_plugins/kibana/public/home/components/tutorial/tutorial.js
index 1a737762a7eef..6f64536e61b2a 100644
--- a/src/core_plugins/kibana/public/home/components/tutorial/tutorial.js
+++ b/src/core_plugins/kibana/public/home/components/tutorial/tutorial.js
@@ -295,6 +295,7 @@ export class Tutorial extends React.Component {
previewUrl={previewUrl}
exportedFieldsUrl={exportedFieldsUrl}
iconType={this.state.tutorial.euiIconType}
+ isBeta={this.state.tutorial.isBeta}
/>
diff --git a/src/core_plugins/kibana/public/home/components/tutorial_directory.js b/src/core_plugins/kibana/public/home/components/tutorial_directory.js
index 70efecff875be..b2af4f70fe07d 100644
--- a/src/core_plugins/kibana/public/home/components/tutorial_directory.js
+++ b/src/core_plugins/kibana/public/home/components/tutorial_directory.js
@@ -96,6 +96,7 @@ export class TutorialDirectory extends React.Component {
description: tutorialConfig.shortDescription,
url: this.props.addBasePath(`#/home/tutorial/${tutorialConfig.id}`),
elasticCloud: tutorialConfig.elasticCloud,
+ isBeta: tutorialConfig.isBeta,
};
});
@@ -179,6 +180,7 @@ export class TutorialDirectory extends React.Component {
wrapInPanel
url={tutorial.url}
onClick={tutorial.onClick}
+ isBeta={tutorial.isBeta}
/>
);