Skip to content

Commit

Permalink
Fixed default datasourceName selection
Browse files Browse the repository at this point in the history
  • Loading branch information
azun committed Sep 22, 2023
1 parent baffdc1 commit 6b2e6b0
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 19 deletions.
3 changes: 2 additions & 1 deletion dashboards/apiserver.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ local singlestat = grafana.singlestat;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/controller-manager.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ local singlestat = grafana.singlestat;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/kubelet.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ local statPanel = grafana.statPanel;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/cluster-total.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ local annotation = grafana.annotation;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/namespace-by-pod.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ local singlestat = grafana.singlestat;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/namespace-by-workload.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ local annotation = grafana.annotation;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/pod-total.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ local singlestat = grafana.singlestat;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/network-usage/workload-total.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ local annotation = grafana.annotation;
.addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/persistentvolumesusage.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ local gauge = promgrafonnet.gauge;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/proxy.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ local singlestat = grafana.singlestat;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
2 changes: 1 addition & 1 deletion dashboards/resources/cluster.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ local template = grafana.template;
g.dashboard(
'%(dashboardNamePrefix)sCompute Resources / Cluster' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-cluster.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource_regex=$._config.datasourceFilterRegex, datasource=$._config.datasourceName,
)
.addRow(
(g.row('Headlines') +
Expand Down
2 changes: 1 addition & 1 deletion dashboards/resources/multi-cluster.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libson
g.dashboard(
'%(dashboardNamePrefix)sCompute Resources / Multi-Cluster' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-multicluster.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource_regex=$._config.datasourceFilterRegex, datasource=$._config.datasourceName,
).addRow(
(g.row('Headlines') +
{
Expand Down
2 changes: 1 addition & 1 deletion dashboards/resources/namespace.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ local template = grafana.template;
g.dashboard(
'%(dashboardNamePrefix)sCompute Resources / Namespace (Pods)' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-namespace.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource_regex=$._config.datasourceFilterRegex, datasource=$._config.datasourceName,
)
.addRow(
(g.row('Headlines') +
Expand Down
2 changes: 1 addition & 1 deletion dashboards/resources/node.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ local template = grafana.template;
g.dashboard(
'%(dashboardNamePrefix)sCompute Resources / Node (Pods)' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-node.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource_regex=$._config.datasourceFilterRegex, datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
2 changes: 1 addition & 1 deletion dashboards/resources/pod.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ local template = grafana.template;
g.dashboard(
'%(dashboardNamePrefix)sCompute Resources / Pod' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-pod.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource_regex=$._config.datasourceFilterRegex, datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
2 changes: 1 addition & 1 deletion dashboards/resources/workload-namespace.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ local template = grafana.template;
g.dashboard(
'%(dashboardNamePrefix)sCompute Resources / Namespace (Workloads)' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-workloads-namespace.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource_regex=$._config.datasourceFilterRegex, datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
2 changes: 1 addition & 1 deletion dashboards/resources/workload.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ local template = grafana.template;
g.dashboard(
'%(dashboardNamePrefix)sCompute Resources / Workload' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-workload.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource_regex=$._config.datasourceFilterRegex, datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
3 changes: 2 additions & 1 deletion dashboards/scheduler.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ local singlestat = grafana.singlestat;
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down
3 changes: 2 additions & 1 deletion dashboards/windows.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libson
).addTemplate(
{
current: {
text: 'default',
selected: true,
text: $._config.datasourceName,
value: $._config.datasourceName,
},
hide: 0,
Expand Down

0 comments on commit 6b2e6b0

Please sign in to comment.