Skip to content

Commit d5acce1

Browse files
authored
Update two odd 'datasource' to upper-case to match all other dashboards (#145)
1 parent 47153b6 commit d5acce1

7 files changed

Lines changed: 28 additions & 27 deletions

File tree

assets/k8s-netperf/panels.libsonnet

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
2020
base(title, targets, gridPos):
2121
table.new(title)
2222
+ table.datasource.withType('elasticsearch')
23-
+ table.datasource.withUid('$datasource')
23+
+ table.datasource.withUid('$Datasource')
2424
+ table.panelOptions.withRepeat('profile')
2525
+ table.panelOptions.withRepeatDirection('h')
2626
+ table.standardOptions.color.withMode('thresholds')
@@ -314,7 +314,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
314314
barGauge.new(title)
315315
+ barGauge.queryOptions.withTargets(targets)
316316
+ barGauge.datasource.withType('elasticsearch')
317-
+ barGauge.datasource.withUid('$datasource')
317+
+ barGauge.datasource.withUid('$Datasource')
318318
+ barGauge.options.reduceOptions.withValues(false)
319319
+ barGauge.options.reduceOptions.withCalcs(['lastNotNull'])
320320
+ barGauge.options.reduceOptions.withFields('')
@@ -348,7 +348,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
348348
+ timeSeries.panelOptions.withRepeat('messageSize')
349349
+ timeSeries.panelOptions.withRepeatDirection('h')
350350
+ timeSeries.datasource.withType('elasticsearch')
351-
+ timeSeries.datasource.withUid('$datasource')
351+
+ timeSeries.datasource.withUid('$Datasource')
352352
+ timeSeries.gridPos.withX(gridPos.x)
353353
+ timeSeries.gridPos.withY(gridPos.y)
354354
+ timeSeries.gridPos.withH(gridPos.h)

assets/k8s-netperf/variables.libsonnet

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
22
local var = g.dashboard.variable;
33

44
{
5-
datasource:
6-
var.datasource.new('datasource', 'elasticsearch')
5+
Datasource:
6+
var.datasource.new('Datasource', 'elasticsearch')
77
+ var.datasource.withRegex('/(.*netperf.*)/')
8-
+ var.query.generalOptions.withLabel('datasource')
8+
+ var.query.generalOptions.withLabel('Datasource')
99
+ var.query.selectionOptions.withMulti(false)
1010
+ var.query.withRefresh(1)
1111
+ var.query.selectionOptions.withIncludeAll(false),
1212

1313
platform:
1414
var.query.new('platform', '{"find": "terms", "field": "metadata.platform.keyword"}')
15-
+ var.query.withDatasourceFromVariable(self.datasource)
15+
+ var.query.withDatasourceFromVariable(self.Datasource)
1616
+ var.query.withRefresh(2)
1717
+ var.query.selectionOptions.withMulti(true)
1818
+ var.query.selectionOptions.withIncludeAll(true)
1919
+ var.query.generalOptions.withLabel('Platform'),
2020

2121
workers:
2222
var.query.new('workerNodesType', '{"find": "terms", "field": "metadata.workerNodesType.keyword", "query": "metadata.platform.keyword: $platform"}')
23-
+ var.query.withDatasourceFromVariable(self.datasource)
23+
+ var.query.withDatasourceFromVariable(self.Datasource)
2424
+ var.query.withRefresh(2)
2525
+ var.query.selectionOptions.withMulti(false)
2626
+ var.query.selectionOptions.withIncludeAll(true)
2727
+ var.query.generalOptions.withLabel('workers'),
2828

2929
uuid:
3030
var.query.new('uuid', '{"find": "terms", "field": "uuid.keyword", "query":"metadata.platform.keyword: $platform AND metadata.workerNodesType.keyword: $workerNodesType"}')
31-
+ var.query.withDatasourceFromVariable(self.datasource)
31+
+ var.query.withDatasourceFromVariable(self.Datasource)
3232
+ var.query.withRefresh(2)
3333
+ var.query.selectionOptions.withMulti(true)
3434
+ var.query.selectionOptions.withIncludeAll(true)
@@ -48,15 +48,15 @@ local var = g.dashboard.variable;
4848

4949
streams:
5050
var.query.new('parallelism', '{"find": "terms", "field": "parallelism", "query":"uuid: $uuid"}')
51-
+ var.query.withDatasourceFromVariable(self.datasource)
51+
+ var.query.withDatasourceFromVariable(self.Datasource)
5252
+ var.query.withRefresh(2)
5353
+ var.query.selectionOptions.withMulti(true)
5454
+ var.query.selectionOptions.withIncludeAll(true)
5555
+ var.query.generalOptions.withLabel('streams'),
5656

5757
throughput_profile:
5858
var.query.new('throughput_profile', '{"find": "terms", "field": "profile.keyword", "query":"uuid:$uuid"}')
59-
+ var.query.withDatasourceFromVariable(self.datasource)
59+
+ var.query.withDatasourceFromVariable(self.Datasource)
6060
+ var.query.withRegex('.*STREAM.*')
6161
+ var.query.withRefresh(2)
6262
+ var.query.selectionOptions.withMulti(true)
@@ -65,7 +65,7 @@ local var = g.dashboard.variable;
6565

6666
latency_profile:
6767
var.query.new('latency_profile', '{"find": "terms", "field": "profile.keyword", "query":"uuid:$uuid"}')
68-
+ var.query.withDatasourceFromVariable(self.datasource)
68+
+ var.query.withDatasourceFromVariable(self.Datasource)
6969
+ var.query.withRegex('.*RR.*')
7070
+ var.query.withRefresh(2)
7171
+ var.query.selectionOptions.withMulti(true)
@@ -74,15 +74,15 @@ local var = g.dashboard.variable;
7474

7575
messageSize:
7676
var.query.new('messageSize', '{"find": "terms", "field": "messageSize","query":"uuid:$uuid"}')
77-
+ var.query.withDatasourceFromVariable(self.datasource)
77+
+ var.query.withDatasourceFromVariable(self.Datasource)
7878
+ var.query.withRefresh(2)
7979
+ var.query.selectionOptions.withMulti(true)
8080
+ var.query.selectionOptions.withIncludeAll(true)
8181
+ var.query.generalOptions.withLabel('messageSize'),
8282

8383
driver:
8484
var.query.new('driver', '{"find": "terms", "field": "driver.keyword","query":"uuid:$uuid"}')
85-
+ var.query.withDatasourceFromVariable(self.datasource)
85+
+ var.query.withDatasourceFromVariable(self.Datasource)
8686
+ var.query.withRefresh(1)
8787
+ var.query.selectionOptions.withMulti(false)
8888
+ var.query.selectionOptions.withIncludeAll(false)

assets/ocp-performance/panels.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
1212
generic(title, unit, targets, gridPos):
1313
timeSeries.new(title)
1414
+ timeSeries.queryOptions.withTargets(targets)
15-
+ timeSeries.datasource.withUid('$datasource')
15+
+ timeSeries.datasource.withUid('$Datasource')
1616
+ timeSeries.standardOptions.withUnit(unit)
1717
+ timeSeries.gridPos.withX(gridPos.x)
1818
+ timeSeries.gridPos.withY(gridPos.y)
@@ -64,7 +64,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
6464

6565
base(title, targets, gridPos):
6666
stat.new(title)
67-
+ stat.datasource.withUid('$datasource')
67+
+ stat.datasource.withUid('$Datasource')
6868
+ stat.queryOptions.withTargets(targets)
6969
+ stat.gridPos.withX(gridPos.x)
7070
+ stat.gridPos.withY(gridPos.y)

assets/ocp-performance/queries.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
44
local generateTimeSeriesQuery(query, legend) = [
55
local prometheusQuery = g.query.prometheus;
66
prometheusQuery.new(
7-
'$' + variables.datasource.name,
7+
'$' + variables.Datasource.name,
88
query
99
)
1010
+ prometheusQuery.withFormat('time_series')

assets/ocp-performance/variables.libsonnet

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
22
local var = g.dashboard.variable;
33

44
{
5-
datasource:
6-
var.datasource.new('datasource', 'prometheus'),
5+
Datasource:
6+
var.datasource.new('Datasource', 'prometheus')
7+
+ var.query.generalOptions.withLabel('Datasource'),
78

89
master_node:
910
var.query.new('_master_node')
10-
+ var.query.withDatasourceFromVariable(self.datasource)
11+
+ var.query.withDatasourceFromVariable(self.Datasource)
1112
+ var.query.queryTypes.withLabelValues(
1213
'node',
1314
'kube_node_role{role="master"}',
@@ -19,7 +20,7 @@ local var = g.dashboard.variable;
1920

2021
worker_node:
2122
var.query.new('_worker_node')
22-
+ var.query.withDatasourceFromVariable(self.datasource)
23+
+ var.query.withDatasourceFromVariable(self.Datasource)
2324
+ var.query.queryTypes.withLabelValues(
2425
'node',
2526
'kube_node_role{role=~"worker"}',
@@ -31,7 +32,7 @@ local var = g.dashboard.variable;
3132

3233
infra_node:
3334
var.query.new('_infra_node')
34-
+ var.query.withDatasourceFromVariable(self.datasource)
35+
+ var.query.withDatasourceFromVariable(self.Datasource)
3536
+ var.query.queryTypes.withLabelValues(
3637
'node',
3738
'kube_node_role{role="infra"}',
@@ -43,7 +44,7 @@ local var = g.dashboard.variable;
4344

4445
namespace:
4546
var.query.new('namespace')
46-
+ var.query.withDatasourceFromVariable(self.datasource)
47+
+ var.query.withDatasourceFromVariable(self.Datasource)
4748
+ var.query.queryTypes.withLabelValues(
4849
'namespace',
4950
'kube_pod_info{namespace!="(cluster-density.*|node-density-.*)"}',
@@ -56,7 +57,7 @@ local var = g.dashboard.variable;
5657

5758
block_device:
5859
var.query.new('block_device')
59-
+ var.query.withDatasourceFromVariable(self.datasource)
60+
+ var.query.withDatasourceFromVariable(self.Datasource)
6061
+ var.query.queryTypes.withLabelValues(
6162
'device',
6263
'node_disk_written_bytes_total',
@@ -69,7 +70,7 @@ local var = g.dashboard.variable;
6970

7071
net_device:
7172
var.query.new('net_device')
72-
+ var.query.withDatasourceFromVariable(self.datasource)
73+
+ var.query.withDatasourceFromVariable(self.Datasource)
7374
+ var.query.queryTypes.withLabelValues(
7475
'device',
7576
'node_network_receive_bytes_total',

templates/CPT/k8s-netperf.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ g.dashboard.new('k8s-netperf')
1313
+ g.dashboard.withEditable(true)
1414
+ g.dashboard.graphTooltip.withSharedCrosshair()
1515
+ g.dashboard.withVariables([
16-
variables.datasource,
16+
variables.Datasource,
1717
variables.platform,
1818
variables.workers,
1919
variables.uuid,

templates/General/ocp-performance.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ g.dashboard.new('Openshift Performance')
1616
+ g.dashboard.withEditable(true)
1717
+ g.dashboard.graphTooltip.withSharedCrosshair()
1818
+ g.dashboard.withVariables([
19-
variables.datasource,
19+
variables.Datasource,
2020
variables.master_node,
2121
variables.worker_node,
2222
variables.infra_node,

0 commit comments

Comments
 (0)