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

documentation on how to create new Add Data tutorials. #16257

Merged
merged 7 commits into from
Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ recommended for the development of all Kibana plugins.
- [API](style_guides/api_style_guide.md)
- [Architecture](style_guides/architecture_style_guide.md)
- [Accessibility](style_guides/accessibility_guide.md)
- [Add Data tutorial](style_guides/add_data_tutorial_guide.md)

## Filenames

Expand Down
27 changes: 27 additions & 0 deletions style_guides/add_data_tutorial_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Add Data guide
`Add Data` in the Kibana Home application contains a collection of tutorials for setting up data flows in the Elastic stack.

Each tutorial contains 3 sets of instructions
1. `On Premise` Instructions for setting up a data flow when both Kibana and Elastic Search are running on premise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Elastic Search/Elasticsearch/

2. `On Premise Elastic Cloud` Instructions for setting up a data flow when Kibana is running on premise but
Elastic Search is running on cloud.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Elastic Search/Elasticsearch/

3. `Elastic Cloud` Instructions for setting up a data flow when both Kibana and Elastic Search are running on cloud.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Elastic Search/Elasticsearch/


## Creating a new tutorial
1. Create a new folder in the [tutorials directory](https://github.com/elastic/kibana/tree/master/src/core_plugins/kibana/server/tutorials).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: s/directory/folder/ for consistency

2. In the new folder, create a file called `index.js` that exports a function.
The function must return a Javascript object that conforms to the [tutorial schema](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/common/tutorials/tutorial_schema.js).
3. Register the tutorial in [register.js](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/server/tutorials/register.js) by calling `server.registerTutorial(myFuncImportedFromIndexJs)`.
4. Add image assets to the [tutorial_resources directory](https://github.com/elastic/kibana/tree/master/src/core_plugins/kibana/public/home/tutorial_resources).
5. Create a PR and go through the review process to get the changes approved.

### Variables
String values can contain variables that get substituted when rendered. Variables are specified by `{}`.
For example: `{config.docs.version}` would get rendered as `6.2` when running the tutorial in Kibana 6.2.

[Provided variables](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/public/home/components/tutorial/replace_template_strings.js#L23)

### Markdown
String values can contain limited markdown syntax.

[Enabled markdown grammers](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/public/home/components/tutorial/content.js#L8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling: should be "grammar".