Docs updates

This commit is contained in:
Torkel Ödegaard 2015-04-13 14:12:03 +02:00
parent 0b1c1bb8b4
commit e9c7264fd9
2 changed files with 6 additions and 4 deletions

View File

@ -8,8 +8,9 @@ page_keywords: grafana, scripted, guide, documentation
If you have lots of metric names that change (new servers etc) in a defined pattern it is irritating to constantly have to create new dashboards.
With scripted dashboards you can dynamically create your dashboards using javascript. In the folder grafana install folder _app/dashboards/_ there is a file named _scripted.js_. This file contains an example of a scripted dashboard. You can access it by using the url:
> http://grafana_url/#/dashboard/script/scripted.js?rows=3&name=myName
With scripted dashboards you can dynamically create your dashboards using javascript. In the folder grafana install folder
under `public/dashboards/` there is a file named `scripted.js`. This file contains an example of a scripted dashboard. You can access it by using the url:
`http://grafana_url/dashboard/script/scripted.js?rows=3&name=myName`
If you open scripted.js you can see how it reads url paramters from ARGS variable and then adds rows and panels.
@ -58,4 +59,4 @@ return dashboard;
## More examples
You can find more examples in `app/dashboards/` directory of your grafana installation.
You can find more examples in `public/dashboards/` directory of your grafana installation.

View File

@ -40,5 +40,6 @@ Example:
```html
<iframe src="http://snapshot.raintank.io/dashboard/solo/snapshot/UtvRYDv650fHOV2jV5QlAQhLnNOhB5ZN?panelId=4&fullscreen&from=1427385145990&to=1427388745990" width="650" height="300" frameborder="0"></iframe>
```
Below there should be an interactive Grafana graph embedded in an iframe:
<iframe src="http://snapshot.raintank.io/dashboard/solo/snapshot/UtvRYDv650fHOV2jV5QlAQhLnNOhB5ZN?panelId=4&fullscreen&from=1427385145990&to=1427388745990" width="650" height="300" frameborder="0"></iframe>
<iframe src="http://snapshot.raintank.io/dashboard/solo/snapshot/IQ7iZF00sHalq0Ffjv6OyclJSA1YHYV1?panelId=4&fullscreen" width="650" height="300" frameborder="0"></iframe>