Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
4530925b
Unverified
Commit
4530925b
authored
Jun 29, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: update scripted dashboard for v5
parent
cdaeb157
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
26 deletions
+20
-26
docs/sources/reference/scripting.md
+20
-26
No files found.
docs/sources/reference/scripting.md
View file @
4530925b
...
...
@@ -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
;
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment