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
6c6fa760
Unverified
Commit
6c6fa760
authored
Mar 17, 2020
by
Torkel Ödegaard
Committed by
GitHub
Mar 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TestData: New dashboard that tests variables that update on time range change (#22829)
parent
22fc1e91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
199 additions
and
0 deletions
+199
-0
devenv/dev-dashboards/feature-templating/testdata-variables-that-update-on-time-change.json
+195
-0
public/app/plugins/datasource/testdata/metricTree.ts
+4
-0
No files found.
devenv/dev-dashboards/feature-templating/testdata-variables-that-update-on-time-change.json
0 → 100644
View file @
6c6fa760
{
"annotations"
:
{
"list"
:
[
{
"builtIn"
:
1
,
"datasource"
:
"-- Grafana --"
,
"enable"
:
true
,
"hide"
:
true
,
"iconColor"
:
"rgba(0, 211, 255, 1)"
,
"name"
:
"Annotations & Alerts"
,
"type"
:
"dashboard"
}
]
},
"editable"
:
true
,
"gnetId"
:
null
,
"graphTooltip"
:
0
,
"iteration"
:
1584435937931
,
"links"
:
[],
"panels"
:
[
{
"aliasColors"
:
{},
"bars"
:
false
,
"dashLength"
:
10
,
"dashes"
:
false
,
"datasource"
:
null
,
"fill"
:
1
,
"fillGradient"
:
0
,
"gridPos"
:
{
"h"
:
14
,
"w"
:
19
,
"x"
:
0
,
"y"
:
0
},
"hiddenSeries"
:
false
,
"id"
:
2
,
"legend"
:
{
"alignAsTable"
:
true
,
"avg"
:
false
,
"current"
:
false
,
"max"
:
false
,
"min"
:
true
,
"rightSide"
:
true
,
"show"
:
true
,
"total"
:
false
,
"values"
:
true
},
"lines"
:
true
,
"linewidth"
:
1
,
"nullPointMode"
:
"null"
,
"options"
:
{
"dataLinks"
:
[]
},
"percentage"
:
false
,
"pointradius"
:
2
,
"points"
:
false
,
"renderer"
:
"flot"
,
"seriesOverrides"
:
[],
"spaceLength"
:
10
,
"stack"
:
false
,
"steppedLine"
:
false
,
"targets"
:
[
{
"alias"
:
"updatesOnTime: $updatesOnTime"
,
"refId"
:
"A"
,
"scenarioId"
:
"random_walk"
},
{
"alias"
:
"dependsOnFirst: $dependsOnFirst"
,
"refId"
:
"B"
,
"scenarioId"
:
"random_walk"
}
],
"thresholds"
:
[],
"timeFrom"
:
null
,
"timeRegions"
:
[],
"timeShift"
:
null
,
"title"
:
"Panel Title"
,
"tooltip"
:
{
"shared"
:
true
,
"sort"
:
0
,
"value_type"
:
"individual"
},
"type"
:
"graph"
,
"xaxis"
:
{
"buckets"
:
null
,
"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
}
],
"yaxis"
:
{
"align"
:
false
,
"alignLevel"
:
null
}
}
],
"schemaVersion"
:
22
,
"style"
:
"dark"
,
"tags"
:
[
"gdev"
,
"templating"
],
"templating"
:
{
"list"
:
[
{
"allValue"
:
null
,
"current"
:
{
"text"
:
"value.1584434137814"
,
"value"
:
"value.1584434137814"
},
"datasource"
:
"gdev-testdata"
,
"definition"
:
"value.$__from"
,
"hide"
:
0
,
"includeAll"
:
false
,
"index"
:
-1
,
"label"
:
null
,
"multi"
:
false
,
"name"
:
"updatesOnTime"
,
"options"
:
[],
"query"
:
"value.$__from"
,
"refresh"
:
2
,
"regex"
:
""
,
"skipUrlSync"
:
false
,
"sort"
:
0
,
"tagValuesQuery"
:
""
,
"tags"
:
[],
"tagsQuery"
:
""
,
"type"
:
"query"
,
"useTags"
:
false
},
{
"allValue"
:
null
,
"current"
:
{
"text"
:
"value.value.1584434072074"
,
"value"
:
"value.value.1584434072074"
},
"datasource"
:
"gdev-testdata"
,
"definition"
:
"value.$updatesOnTime"
,
"hide"
:
0
,
"includeAll"
:
false
,
"index"
:
-1
,
"label"
:
null
,
"multi"
:
false
,
"name"
:
"dependsOnFirst"
,
"options"
:
[
{
"selected"
:
true
,
"text"
:
"value.value.1584434072074"
,
"value"
:
"value.value.1584434072074"
}
],
"query"
:
"value.$updatesOnTime"
,
"refresh"
:
0
,
"regex"
:
""
,
"skipUrlSync"
:
false
,
"sort"
:
0
,
"tagValuesQuery"
:
""
,
"tags"
:
[],
"tagsQuery"
:
""
,
"type"
:
"query"
,
"useTags"
:
false
}
]
},
"time"
:
{
"from"
:
"now-30m"
,
"to"
:
"now"
},
"timepicker"
:
{
"refresh_intervals"
:
[
"5s"
,
"10s"
,
"30s"
,
"1m"
,
"5m"
,
"15m"
,
"30m"
,
"1h"
,
"2h"
,
"1d"
]
},
"timezone"
:
""
,
"title"
:
"Templating - Variables That Refresh On Time Change"
,
"uid"
:
"HeUnbEuZk"
,
"variables"
:
{
"list"
:
[]
},
"version"
:
13
}
public/app/plugins/datasource/testdata/metricTree.ts
View file @
6c6fa760
...
@@ -70,6 +70,10 @@ function queryTree(children: TreeNode[], query: string[], queryIndex: number): T
...
@@ -70,6 +70,10 @@ function queryTree(children: TreeNode[], query: string[], queryIndex: number): T
}
}
export
function
queryMetricTree
(
query
:
string
):
TreeNode
[]
{
export
function
queryMetricTree
(
query
:
string
):
TreeNode
[]
{
if
(
query
.
indexOf
(
'value'
)
===
0
)
{
return
[{
name
:
query
,
children
:
[]
}];
}
const
children
=
buildMetricTree
(
''
,
0
);
const
children
=
buildMetricTree
(
''
,
0
);
return
queryTree
(
children
,
query
.
split
(
'.'
),
0
);
return
queryTree
(
children
,
query
.
split
(
'.'
),
0
);
}
}
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