Commit 4530925b by Marcus Efraimsson

docs: update scripted dashboard for v5

parent cdaeb157
......@@ -21,7 +21,6 @@ If you open scripted.js you can see how it reads url parameters from ARGS variab
## Example
```javascript
var rows = 1;
var seriesName = 'argName';
if(!_.isUndefined(ARGS.rows)) {
......@@ -32,31 +31,26 @@ if(!_.isUndefined(ARGS.name)) {
seriesName = ARGS.name;
}
for (var i = 0; i < rows; i++) {
dashboard.rows.push({
title: 'Scripted Graph ' + i,
height: '300px',
panels: [
{
title: 'Events',
type: 'graph',
span: 12,
fill: 1,
linewidth: 2,
targets: [
{
'target': "randomWalk('" + seriesName + "')"
},
{
'target': "randomWalk('random walk2')"
}
],
}
]
});
}
dashboard.panels.push({
title: 'Events',
type: 'graph',
fill: 1,
linewidth: 2,
gridPos: {
h: 10,
w: 24,
x: 0,
y: 10,
},
targets: [
{
'target': "randomWalk('" + seriesName + "')"
},
{
'target': "randomWalk('random walk2')"
}
]
});
return dashboard;
```
......
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