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
aa5fb20c
Unverified
Commit
aa5fb20c
authored
Jun 16, 2020
by
Torkel Ödegaard
Committed by
GitHub
Jun 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Variables: Adding dashboard to test updating variables from data link (#25192)
parent
4aff2d74
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
164 additions
and
42 deletions
+164
-42
devenv/dev-dashboards/feature-templating/testdata-nested-variables.json
+162
-40
packages/grafana-data/src/field/fieldOverrides.ts
+1
-1
packages/grafana-data/src/types/dataLink.ts
+1
-1
No files found.
devenv/dev-dashboards/feature-templating/testdata-nested-variables.json
View file @
aa5fb20c
...
...
@@ -15,12 +15,18 @@
"editable"
:
true
,
"gnetId"
:
null
,
"graphTooltip"
:
0
,
"id"
:
13844
,
"iteration"
:
1566896059256
,
"iteration"
:
1590677937026
,
"links"
:
[],
"panels"
:
[
{
"content"
:
"## Data center = $datacenter
\n\n
### server = $server
\n\n
#### pod = $pod"
,
"datasource"
:
null
,
"fieldConfig"
:
{
"defaults"
:
{
"custom"
:
{}
},
"overrides"
:
[]
},
"gridPos"
:
{
"h"
:
9
,
"w"
:
12
,
...
...
@@ -29,7 +35,6 @@
},
"id"
:
4
,
"mode"
:
"markdown"
,
"options"
:
{},
"targets"
:
[
{
"refId"
:
"A"
,
...
...
@@ -47,6 +52,12 @@
"colorValue"
:
false
,
"colors"
:
[
"#299c46"
,
"rgba(237, 129, 40, 0.89)"
,
"#d44a3a"
],
"datasource"
:
"gdev-testdata"
,
"fieldConfig"
:
{
"defaults"
:
{
"custom"
:
{}
},
"overrides"
:
[]
},
"format"
:
"none"
,
"gauge"
:
{
"maxValue"
:
100
,
...
...
@@ -75,7 +86,6 @@
"maxDataPoints"
:
100
,
"nullPointMode"
:
"connected"
,
"nullText"
:
null
,
"options"
:
{},
"postfix"
:
""
,
"postfixFontSize"
:
"50%"
,
"prefix"
:
""
,
...
...
@@ -119,18 +129,13 @@
},
{
"cacheTimeout"
:
null
,
"gridPos"
:
{
"h"
:
9
,
"w"
:
4
,
"x"
:
16
,
"y"
:
0
},
"id"
:
8
,
"links"
:
[],
"options"
:
{
"fieldOptions"
:
{
"calcs"
:
[
"mean"
],
"datasource"
:
null
,
"fieldConfig"
:
{
"defaults"
:
{
"color"
:
{
"mode"
:
"thresholds"
},
"custom"
:
{},
"links"
:
[
{
"targetBlank"
:
true
,
...
...
@@ -142,7 +147,9 @@
"max"
:
100
,
"min"
:
0
,
"nullValueMode"
:
"connected"
,
"thresholds"
:
[
"thresholds"
:
{
"mode"
:
"absolute"
,
"steps"
:
[
{
"color"
:
"green"
,
"value"
:
null
...
...
@@ -151,17 +158,30 @@
"color"
:
"red"
,
"value"
:
80
}
],
]
},
"unit"
:
"none"
},
"override"
:
{},
"values"
:
false
"overrides"
:
[]
},
"gridPos"
:
{
"h"
:
9
,
"w"
:
4
,
"x"
:
16
,
"y"
:
0
},
"id"
:
8
,
"links"
:
[],
"options"
:
{
"orientation"
:
"horizontal"
,
"reduceOptions"
:
{
"calcs"
:
[
"mean"
],
"values"
:
false
},
"showThresholdLabels"
:
false
,
"showThresholdMarkers"
:
true
},
"pluginVersion"
:
"
6.4
.0-pre"
,
"pluginVersion"
:
"
7.1
.0-pre"
,
"targets"
:
[
{
"refId"
:
"A"
,
...
...
@@ -175,19 +195,13 @@
},
{
"cacheTimeout"
:
null
,
"gridPos"
:
{
"h"
:
9
,
"w"
:
4
,
"x"
:
20
,
"y"
:
0
},
"id"
:
9
,
"links"
:
[],
"options"
:
{
"displayMode"
:
"basic"
,
"fieldOptions"
:
{
"calcs"
:
[
"mean"
],
"datasource"
:
null
,
"fieldConfig"
:
{
"defaults"
:
{
"color"
:
{
"mode"
:
"thresholds"
},
"custom"
:
{},
"links"
:
[
{
"targetBlank"
:
true
,
...
...
@@ -199,7 +213,9 @@
"max"
:
100
,
"min"
:
0
,
"nullValueMode"
:
"connected"
,
"thresholds"
:
[
"thresholds"
:
{
"mode"
:
"absolute"
,
"steps"
:
[
{
"color"
:
"green"
,
"value"
:
null
...
...
@@ -208,15 +224,30 @@
"color"
:
"red"
,
"value"
:
80
}
],
]
},
"unit"
:
"none"
},
"override"
:
{},
"overrides"
:
[]
},
"gridPos"
:
{
"h"
:
9
,
"w"
:
4
,
"x"
:
20
,
"y"
:
0
},
"id"
:
9
,
"links"
:
[],
"options"
:
{
"displayMode"
:
"basic"
,
"orientation"
:
"vertical"
,
"reduceOptions"
:
{
"calcs"
:
[
"mean"
],
"values"
:
false
},
"
orientation"
:
"vertical"
"
showUnfilled"
:
true
},
"pluginVersion"
:
"
6.4
.0-pre"
,
"pluginVersion"
:
"
7.1
.0-pre"
,
"targets"
:
[
{
"refId"
:
"A"
,
...
...
@@ -229,19 +260,107 @@
"type"
:
"bargauge"
},
{
"datasource"
:
"CsvData"
,
"fieldConfig"
:
{
"defaults"
:
{
"custom"
:
{
"align"
:
null
},
"mappings"
:
[],
"thresholds"
:
{
"mode"
:
"absolute"
,
"steps"
:
[
{
"color"
:
"green"
,
"value"
:
null
},
{
"color"
:
"red"
,
"value"
:
80
}
]
}
},
"overrides"
:
[
{
"matcher"
:
{
"id"
:
"byName"
,
"options"
:
"server"
},
"properties"
:
[
{
"id"
:
"links"
,
"value"
:
[
{
"title"
:
"filter"
,
"url"
:
"http://localhost:3000/d/-Y-tnEDWk/templating-nested-template-variables?var-datacenter=${__data.fields[datacenter]}&var-server=${__value.raw}"
}
]
}
]
}
]
},
"gridPos"
:
{
"h"
:
6
,
"w"
:
24
,
"x"
:
0
,
"y"
:
9
},
"id"
:
11
,
"options"
:
{
"showHeader"
:
true
},
"pluginVersion"
:
"7.1.0-pre"
,
"targets"
:
[
{
"data"
:
[
{
"fields"
:
[
{
"config"
:
{},
"name"
:
"datacenter"
,
"type"
:
"string"
,
"values"
:
[
"A"
,
"B"
,
"C"
]
},
{
"config"
:
{},
"name"
:
"server"
,
"type"
:
"string"
,
"values"
:
[
"AA"
,
"BB"
,
"CC"
]
}
]
}
],
"refId"
:
"A"
}
],
"timeFrom"
:
null
,
"timeShift"
:
null
,
"title"
:
"Data links that filter update variables on current dashboard"
,
"type"
:
"table"
},
{
"aliasColors"
:
{},
"bars"
:
false
,
"dashLength"
:
10
,
"dashes"
:
false
,
"datasource"
:
"gdev-testdata"
,
"fieldConfig"
:
{
"defaults"
:
{
"custom"
:
{}
},
"overrides"
:
[]
},
"fill"
:
1
,
"fillGradient"
:
0
,
"gridPos"
:
{
"h"
:
13
,
"w"
:
24
,
"x"
:
0
,
"y"
:
9
"y"
:
15
},
"hiddenSeries"
:
false
,
"id"
:
2
,
"legend"
:
{
"avg"
:
false
,
...
...
@@ -316,7 +435,7 @@
}
],
"refresh"
:
false
,
"schemaVersion"
:
19
,
"schemaVersion"
:
25
,
"style"
:
"dark"
,
"tags"
:
[
"gdev"
,
"templating"
],
"templating"
:
{
...
...
@@ -324,6 +443,7 @@
{
"allValue"
:
null
,
"current"
:
{
"selected"
:
true
,
"text"
:
"A"
,
"value"
:
[
"A"
]
},
...
...
@@ -349,6 +469,7 @@
{
"allValue"
:
null
,
"current"
:
{
"selected"
:
true
,
"text"
:
"AA"
,
"value"
:
[
"AA"
]
},
...
...
@@ -374,6 +495,7 @@
{
"allValue"
:
null
,
"current"
:
{
"selected"
:
true
,
"text"
:
"All"
,
"value"
:
[
"$__all"
]
},
...
...
@@ -403,7 +525,7 @@
"to"
:
"now"
},
"timepicker"
:
{
"refresh_intervals"
:
[
"
5s"
,
"
10s"
,
"30s"
,
"1m"
,
"5m"
,
"15m"
,
"30m"
,
"1h"
,
"2h"
,
"1d"
]
"refresh_intervals"
:
[
"10s"
,
"30s"
,
"1m"
,
"5m"
,
"15m"
,
"30m"
,
"1h"
,
"2h"
,
"1d"
]
},
"timezone"
:
""
,
"title"
:
"Templating - Nested Template Variables"
,
...
...
packages/grafana-data/src/field/fieldOverrides.ts
View file @
aa5fb20c
...
...
@@ -367,7 +367,7 @@ export const getLinksSupplier = (
const
info
:
LinkModel
<
Field
>
=
{
href
:
locationUtil
.
assureBaseUrl
(
href
.
replace
(
/
\n
/g
,
''
)),
title
:
link
.
title
||
''
,
target
:
link
.
targetBlank
?
'_blank'
:
'_self'
,
target
:
link
.
targetBlank
?
'_blank'
:
undefined
,
origin
:
field
,
};
...
...
packages/grafana-data/src/types/dataLink.ts
View file @
aa5fb20c
...
...
@@ -34,7 +34,7 @@ export interface DataLink {
};
}
export
type
LinkTarget
=
'_blank'
|
'_self'
;
export
type
LinkTarget
=
'_blank'
|
'_self'
|
undefined
;
/**
* Processed Link Model. The values are ready to use
...
...
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