mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
Improvements to our developer guide (#67764)
* contributing guide -> asciidoc * Update docs/developer/contributing/index.asciidoc Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com> * Update docs/developer/best-practices/stability.asciidoc Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com> * Update docs/developer/contributing/index.asciidoc Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com> * address code review comments * Update docs/developer/contributing/development-documentation.asciidoc Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com> * review comment updates * fix bad ref Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>
This commit is contained in:
parent
ddd3a9defd
commit
0a516cfbb9
46 changed files with 1629 additions and 1285 deletions
38
docs/developer/architecture/add-data-tutorials.asciidoc
Normal file
38
docs/developer/architecture/add-data-tutorials.asciidoc
Normal file
|
@ -0,0 +1,38 @@
|
|||
[[add-data-tutorials]]
|
||||
=== Add data tutorials
|
||||
|
||||
`Add Data` in the {kib} Home application contains tutorials for setting up data flows in the Elastic stack.
|
||||
|
||||
Each tutorial contains three sets of instructions:
|
||||
|
||||
* `On Premise.` Set up a data flow when both {kib} and Elasticsearch are running on premise.
|
||||
* `On Premise Elastic Cloud.` Set up a data flow when {kib} is running on premise and Elasticsearch is running on Elastic Cloud.
|
||||
* `Elastic Cloud.` Set up a data flow when both {kib} and Elasticsearch are running on Elastic Cloud.
|
||||
|
||||
[float]
|
||||
==== Creating a new tutorial
|
||||
1. Create a new directory in the link:https://github.com/elastic/kibana/tree/master/src/plugins/home/server/tutorials[tutorials directory].
|
||||
2. In the new directory, create a file called `index.ts` that exports a function.
|
||||
The function must return a function object that conforms to the `TutorialSchema` interface link:{kib-repo}tree/{branch}/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts[tutorial schema].
|
||||
3. Register the tutorial in link:{kib-repo}tree/{branch}/src/plugins/home/server/tutorials/register.ts[register.ts] by adding it to the `builtInTutorials`.
|
||||
// TODO update path once assets are migrated
|
||||
4. Add image assets to the link:{kib-repo}tree/{branch}/src/legacy/core_plugins/kibana/public/home/tutorial_resources[tutorial_resources directory].
|
||||
5. Run {kib} locally to preview the tutorial.
|
||||
6. Create a PR and go through the review process to get the changes approved.
|
||||
|
||||
If you are creating a new plugin and the tutorial is only related to that plugin, you can also place the `TutorialSchema` object into your plugin folder. Add `home` to the `requiredPlugins` list in your `kibana.json` file.
|
||||
Then register the tutorial object by calling `home.tutorials.registerTutorial(tutorialObject)` in the `setup` lifecycle of your server plugin.
|
||||
|
||||
[float]
|
||||
===== Variables
|
||||
String values can contain variables that are substituted when rendered. Variables are specified by `{}`.
|
||||
For example: `{config.docs.version}` is rendered as `6.2` when running the tutorial in {kib} 6.2.
|
||||
|
||||
link:{kib-repo}tree/{branch}/src/legacy/core_plugins/kibana/public/home/np_ready/components/tutorial/replace_template_strings.js#L23[Provided variables]
|
||||
|
||||
[float]
|
||||
===== Markdown
|
||||
String values can contain limited Markdown syntax.
|
||||
|
||||
link:{kib-repo}tree/{branch}/src/legacy/core_plugins/kibana/public/home/components/tutorial/content.js#L8[Enabled Markdown grammars]
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue