Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected datasource support for all dashboards #871

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions dashboards/resources/cluster.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Cluster' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-cluster.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
(g.row('Headlines') +
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/multi-cluster.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libson
'%(dashboardNamePrefix)sCompute Resources / Multi-Cluster' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-multicluster.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
).addRow(
(g.row('Headlines') +
{
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/namespace.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Namespace (Pods)' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-namespace.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
(g.row('Headlines') +
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/node.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Node (Pods)' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-node.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/pod.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Pod' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-pod.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/workload-namespace.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Namespace (Workloads)' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-workloads-namespace.json']),
datasource_regex=$._config.datasourceFilterRegex,
datasource=$._config.datasourceName,
)
.addRow(
g.row('CPU Usage')
Expand Down
1 change: 1 addition & 0 deletions dashboards/resources/workload.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ local template = grafana.template;
'%(dashboardNamePrefix)sCompute Resources / Workload' % $._config.grafanaK8s,
uid=($._config.grafanaDashboardIDs['k8s-resources-workload.json']),
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
Loading