Commit 9fb4f619 by Torkel Ödegaard

Merge branch 'master' into develop

parents 8bb9d92a 7bfd8e2a
...@@ -13,6 +13,7 @@ Here you can find links to older versions of the documentation that might be bet ...@@ -13,6 +13,7 @@ Here you can find links to older versions of the documentation that might be bet
of Grafana. of Grafana.
- [Latest](http://docs.grafana.org) - [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.4](http://docs.grafana.org/v4.4)
- [Version 4.3](http://docs.grafana.org/v4.3) - [Version 4.3](http://docs.grafana.org/v4.3)
- [Version 4.2](http://docs.grafana.org/v4.2) - [Version 4.2](http://docs.grafana.org/v4.2)
......
...@@ -57,8 +57,7 @@ baseurl=https://packagecloud.io/grafana/stable/el/6/$basearch ...@@ -57,8 +57,7 @@ baseurl=https://packagecloud.io/grafana/stable/el/6/$basearch
repo_gpgcheck=1 repo_gpgcheck=1
enabled=1 enabled=1
gpgcheck=1 gpgcheck=1
gpgkey=https://packagecloud.io/gpg.key gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
sslverify=1 sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt sslcacert=/etc/pki/tls/certs/ca-bundle.crt
``` ```
......
...@@ -10,26 +10,42 @@ weight = 1 ...@@ -10,26 +10,42 @@ weight = 1
# Developer Guide # Developer Guide
From grafana 3.0 it's very easy to develop your own plugins and share them with other grafana users. You can extend Grafana by writing your own plugins and then share then with other users in [our plugin repository](https://grafana.com/plugins).
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/).
## Short version ## Short version
1. [Setup grafana](http://docs.grafana.org/project/building_from_source/) 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) 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? ## 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 ## 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. 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 ## Metadata
See the [coding styleguide]({{< relref "code-styleguide.md" >}}) for details on the 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 ...@@ -21,14 +21,14 @@ Grafana v4.6+ comes with a native annotation store and the ability to add annota
## Adding annotations ## 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" {{< docs-imagebox img="/img/docs/annotations/annotation-still.png"
max-width="600px" animated-gif="/img/docs/annotations/annotation.gif" >}} max-width="600px" animated-gif="/img/docs/annotations/annotation.gif" >}}
### Adding regions events ### 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" {{< docs-imagebox img="/img/docs/annotations/region-annotation-still.png"
max-width="600px" animated-gif="/img/docs/annotations/region-annotation.gif" >}} max-width="600px" animated-gif="/img/docs/annotations/region-annotation.gif" >}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment