mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 15:45:43 -06:00
docs: doc updates
This commit is contained in:
parent
24a0eb909c
commit
8ff7e1d05d
@ -13,6 +13,7 @@ Here you can find links to older versions of the documentation that might be bet
|
||||
of Grafana.
|
||||
|
||||
- [Latest](http://docs.grafana.org)
|
||||
- [Version 4.5](http://docs.grafana.org/v4.5)
|
||||
- [Version 4.4](http://docs.grafana.org/v4.4)
|
||||
- [Version 4.3](http://docs.grafana.org/v4.3)
|
||||
- [Version 4.2](http://docs.grafana.org/v4.2)
|
||||
|
@ -10,26 +10,42 @@ weight = 1
|
||||
|
||||
# Developer Guide
|
||||
|
||||
From grafana 3.0 it's very easy to develop your own plugins and share them with other grafana users.
|
||||
|
||||
There are two blog posts about authoring a plugin that might also be of interest to any plugin authors, [Timing is Everything. Writing the Clock Panel Plugin for Grafana 3.0- part 1](https://grafana.com/blog/2016/04/08/timing-is-everything.-writing-the-clock-panel-plugin-for-grafana-3.0/) and [Timing is Everything. Editor Mode in Grafana 3.0 for the Clock Panel Plugin](https://grafana.com/blog/2016/04/15/timing-is-everything.-editor-mode-in-grafana-3.0-for-the-clock-panel-plugin/).
|
||||
You can extend Grafana by writing your own plugins and then share then with other users in [our plugin repository](https://grafana.com/plugins).
|
||||
|
||||
## Short version
|
||||
|
||||
1. [Setup grafana](http://docs.grafana.org/project/building_from_source/)
|
||||
2. Clone an example plugin into ```/var/lib/grafana/plugins``` or `data/plugins` (relative to grafana git repo if you're running development version from source dir)
|
||||
3. Code away!
|
||||
3. You one of our example plugins as starting point
|
||||
|
||||
Example plugins
|
||||
|
||||
- [Typescript data source example](https://github.com/grafana/typescript-template-datasource)
|
||||
- [Simple json data source](https://github.com/grafana/simple-json-datasource)
|
||||
- [Clock panel](https://github.com/grafana/clock-panel)
|
||||
- [Pie chart panel](https://github.com/grafana/piechart-panel)
|
||||
|
||||
There are two blog posts about authoring a plugin that might also be of interest to any plugin authors.
|
||||
|
||||
- [Timing is Everything. Writing the Clock Panel Plugin for Grafana](https://grafana.com/blog/2016/04/08/timing-is-everything.-writing-the-clock-panel-plugin-for-grafana-3.0/)
|
||||
- [Timing is Everything. Editor Mode in Grafana for the Clock Panel Plugin](https://grafana.com/blog/2016/04/15/timing-is-everything.-editor-mode-in-grafana-3.0-for-the-clock-panel-plugin/).
|
||||
|
||||
## What languages?
|
||||
|
||||
Since everything turns into javascript it's up to you to choose which language you want. That said it's probably a good idea to choose es6 or typescript since we use es6 classes in Grafana. So it's easier to get inspiration from the Grafana repo is you choose one of those languages.
|
||||
Since everything turns into javascript it's up to you to choose which language you want. That said it's probably a good idea to choose es6 or typescript since
|
||||
we use es6 classes in Grafana. So it's easier to get inspiration from the Grafana repo is you choose one of those languages.
|
||||
|
||||
## Buildscript
|
||||
|
||||
You can use any build system you like that support systemjs. All the built content should end up in a folder named ```dist``` and committed to the repository.By committing the dist folder the person who installs your plugin does not have to run any buildscript.
|
||||
|
||||
You can use any build system you like that support systemjs. All the built content should end up in a folder named ```dist``` and committed to the repository.
|
||||
By committing the dist folder the person who installs your plugin does not have to run any buildscript.
|
||||
All our example plugins have build scripted configured.
|
||||
|
||||
## Keep your plugin up to date
|
||||
|
||||
New versions of Grafana can sometimes cause plugins to break. Checkout our [PLUGIN_DEV.md](https://github.com/grafana/grafana/blob/master/PLUGIN_DEV.md) doc for changes in
|
||||
Grafana that can impact your plugin.
|
||||
|
||||
## Metadata
|
||||
|
||||
See the [coding styleguide]({{< relref "code-styleguide.md" >}}) for details on the metadata.
|
||||
|
@ -21,14 +21,14 @@ Grafana v4.6+ comes with a native annotation store and the ability to add annota
|
||||
|
||||
## Adding annotations
|
||||
|
||||
By holding down CTRL/CMD + mouse click. Add tags to the annotation will make it searchable from other dashboards.
|
||||
By holding down **CTRL** or **CMD** + Click. Add tags to the annotation will make it searchable from other dashboards.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/annotations/annotation-still.png"
|
||||
max-width="600px" animated-gif="/img/docs/annotations/annotation.gif" >}}
|
||||
|
||||
### Adding regions events
|
||||
|
||||
You can also hold down CTRL/CMD and select region to create a region annotation.
|
||||
You can also hold down **CTRL** or **CMD** and select region to create a region annotation.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/annotations/region-annotation-still.png"
|
||||
max-width="600px" animated-gif="/img/docs/annotations/region-annotation.gif" >}}
|
||||
|
Loading…
Reference in New Issue
Block a user