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
460160cf
Commit
460160cf
authored
Sep 28, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(testdata): added test case for ms resolution data
parent
22e88856
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
24 deletions
+98
-24
pkg/tsdb/testdata/scenarios.go
+2
-3
public/app/plugins/app/testdata/dashboards/graph_last_1h.json
+95
-20
public/app/plugins/app/testdata/plugin.json
+1
-1
No files found.
pkg/tsdb/testdata/scenarios.go
View file @
460160cf
...
...
@@ -28,8 +28,8 @@ func init() {
Name
:
"Random Walk"
,
Handler
:
func
(
query
*
tsdb
.
Query
,
context
*
tsdb
.
QueryContext
)
*
tsdb
.
QueryResult
{
t
imeWalkerMs
:=
context
.
TimeRange
.
MustGetFrom
()
.
Unix
()
*
1000
t
o
:=
context
.
TimeRange
.
MustGetTo
()
.
Unix
()
*
1000
t
o
:=
context
.
TimeRange
.
MustGetTo
()
.
UnixNano
()
/
int64
(
time
.
Millisecond
)
t
imeWalkerMs
:=
context
.
TimeRange
.
MustGetFrom
()
.
UnixNano
()
/
int64
(
time
.
Millisecond
)
series
:=
newSeriesForQuery
(
query
)
...
...
@@ -81,7 +81,6 @@ func init() {
return
queryRes
},
})
}
func
registerScenario
(
scenario
*
Scenario
)
{
...
...
public/app/plugins/app/testdata/dashboards/graph_last_1h.json
View file @
460160cf
{
"revision"
:
2
,
"revision"
:
3
,
"title"
:
"TestData - Graph Panel Last 1h"
,
"tags"
:
[
"grafana-test"
...
...
@@ -35,6 +35,7 @@
},
"lines"
:
true
,
"linewidth"
:
2
,
"links"
:
[],
"nullPointMode"
:
"connected"
,
"percentage"
:
false
,
"pointradius"
:
5
,
...
...
@@ -48,8 +49,8 @@
{
"refId"
:
"A"
,
"scenario"
:
"random_walk"
,
"
target"
:
"
"
,
"
scenarioId"
:
"no_data_points
"
"
scenarioId"
:
"no_data_points
"
,
"
target"
:
"
"
}
],
"thresholds"
:
[],
...
...
@@ -86,8 +87,7 @@
"min"
:
null
,
"show"
:
true
}
],
"links"
:
[]
]
},
{
"aliasColors"
:
{},
...
...
@@ -109,6 +109,7 @@
},
"lines"
:
true
,
"linewidth"
:
2
,
"links"
:
[],
"nullPointMode"
:
"connected"
,
"percentage"
:
false
,
"pointradius"
:
5
,
...
...
@@ -122,8 +123,8 @@
{
"refId"
:
"A"
,
"scenario"
:
"random_walk"
,
"
target"
:
"
"
,
"
scenarioId"
:
"datapoints_outside_range
"
"
scenarioId"
:
"datapoints_outside_range
"
,
"
target"
:
"
"
}
],
"thresholds"
:
[],
...
...
@@ -160,17 +161,89 @@
"min"
:
null
,
"show"
:
true
}
]
},
{
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"Grafana TestData"
,
"editable"
:
true
,
"error"
:
false
,
"fill"
:
1
,
"id"
:
3
,
"isNew"
:
true
,
"legend"
:
{
"avg"
:
false
,
"current"
:
false
,
"max"
:
false
,
"min"
:
false
,
"show"
:
true
,
"total"
:
false
,
"values"
:
false
},
"lines"
:
true
,
"linewidth"
:
2
,
"links"
:
[],
"nullPointMode"
:
"connected"
,
"percentage"
:
false
,
"pointradius"
:
5
,
"points"
:
false
,
"renderer"
:
"flot"
,
"seriesOverrides"
:
[],
"span"
:
4
,
"stack"
:
false
,
"steppedLine"
:
false
,
"targets"
:
[
{
"refId"
:
"A"
,
"scenario"
:
"random_walk"
,
"scenarioId"
:
"random_walk"
,
"target"
:
""
}
],
"links"
:
[]
"thresholds"
:
[],
"timeFrom"
:
null
,
"timeShift"
:
null
,
"title"
:
"Random walk series"
,
"tooltip"
:
{
"msResolution"
:
false
,
"shared"
:
true
,
"sort"
:
0
,
"value_type"
:
"cumulative"
},
"type"
:
"graph"
,
"xaxis"
:
{
"mode"
:
"time"
,
"name"
:
null
,
"show"
:
true
,
"values"
:
[]
},
"yaxes"
:
[
{
"format"
:
"short"
,
"label"
:
null
,
"logBase"
:
1
,
"max"
:
null
,
"min"
:
null
,
"show"
:
true
},
{
"format"
:
"short"
,
"label"
:
null
,
"logBase"
:
1
,
"max"
:
null
,
"min"
:
null
,
"show"
:
true
}
]
}
],
"title"
:
"New row"
},
{
"title"
:
"New row"
,
"height"
:
"250px"
,
"editable"
:
true
,
"collapse"
:
false
,
"editable"
:
true
,
"height"
:
"250px"
,
"panels"
:
[
{
"aliasColors"
:
{},
...
...
@@ -179,7 +252,7 @@
"editable"
:
true
,
"error"
:
false
,
"fill"
:
1
,
"id"
:
3
,
"id"
:
4
,
"isNew"
:
true
,
"legend"
:
{
"avg"
:
false
,
...
...
@@ -192,6 +265,7 @@
},
"lines"
:
true
,
"linewidth"
:
2
,
"links"
:
[],
"nullPointMode"
:
"connected"
,
"percentage"
:
false
,
"pointradius"
:
5
,
...
...
@@ -205,14 +279,14 @@
{
"refId"
:
"A"
,
"scenario"
:
"random_walk"
,
"
target"
:
"
"
,
"
scenarioId"
:
"random_walk
"
"
scenarioId"
:
"random_walk
"
,
"
target"
:
"
"
}
],
"thresholds"
:
[],
"timeFrom"
:
null
,
"timeFrom"
:
"5d"
,
"timeShift"
:
null
,
"title"
:
"
Random walk series
"
,
"title"
:
"
Millisecond res x-axis and tooltip
"
,
"tooltip"
:
{
"msResolution"
:
false
,
"shared"
:
true
,
...
...
@@ -243,14 +317,14 @@
"min"
:
null
,
"show"
:
true
}
],
"links"
:
[]
]
}
]
],
"title"
:
"New row"
}
],
"time"
:
{
"from"
:
"now-
6
h"
,
"from"
:
"now-
1
h"
,
"to"
:
"now"
},
"timepicker"
:
{
...
...
@@ -284,6 +358,7 @@
"annotations"
:
{
"list"
:
[]
},
"refresh"
:
false
,
"schemaVersion"
:
13
,
"version"
:
4
,
"links"
:
[],
...
...
public/app/plugins/app/testdata/plugin.json
View file @
460160cf
...
...
@@ -9,7 +9,7 @@
"name"
:
"Grafana Project"
,
"url"
:
"http://grafana.org"
},
"version"
:
"1.0.
5
"
,
"version"
:
"1.0.
6
"
,
"updated"
:
"2016-09-26"
},
...
...
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