From cd544bc5380e72f37ae3e810c0140aa4254cd825 Mon Sep 17 00:00:00 2001 From: adinhodovic Date: Thu, 7 Dec 2023 16:42:55 +0100 Subject: [PATCH] fix: Remove multi/all from job templates --- .lint | 2 ++ dashboards/django-overview.libsonnet | 4 ++-- dashboards/django-requests-by-view.libsonnet | 4 ++-- dashboards/django-requests-overview.libsonnet | 4 ++-- dashboards_out/django-overview.json | 5 ++--- dashboards_out/django-requests-by-view.json | 5 ++--- dashboards_out/django-requests-overview.json | 5 ++--- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.lint b/.lint index a5de72e..f562bc8 100644 --- a/.lint +++ b/.lint @@ -1,5 +1,7 @@ --- exclusions: + template-job-rule: + reason: Jobs are not set to multi in our case. template-instance-rule: reason: We don't use instances. panel-datasource-rule: diff --git a/dashboards/django-overview.libsonnet b/dashboards/django-overview.libsonnet index a73f214..53dca42 100644 --- a/dashboards/django-overview.libsonnet +++ b/dashboards/django-overview.libsonnet @@ -64,8 +64,8 @@ local tbQueryOptions = tablePanel.queryOptions; query.withDatasourceFromVariable(datasourceVariable) + query.withSort(1) + query.generalOptions.withLabel('Job') + - query.selectionOptions.withMulti(true) + - query.selectionOptions.withIncludeAll(true, '.+') + + query.selectionOptions.withMulti(false) + + query.selectionOptions.withIncludeAll(false) + query.refresh.onLoad() + query.refresh.onTime(), diff --git a/dashboards/django-requests-by-view.libsonnet b/dashboards/django-requests-by-view.libsonnet index fe2196d..283220b 100644 --- a/dashboards/django-requests-by-view.libsonnet +++ b/dashboards/django-requests-by-view.libsonnet @@ -58,8 +58,8 @@ local tsOverride = tsStandardOptions.override; query.withDatasourceFromVariable(datasourceVariable) + query.withSort(1) + query.generalOptions.withLabel('Job') + - query.selectionOptions.withMulti(true) + - query.selectionOptions.withIncludeAll(true, '.+') + + query.selectionOptions.withMulti(false) + + query.selectionOptions.withIncludeAll(false) + query.refresh.onLoad() + query.refresh.onTime(), diff --git a/dashboards/django-requests-overview.libsonnet b/dashboards/django-requests-overview.libsonnet index 6904f5a..c4e3ddc 100644 --- a/dashboards/django-requests-overview.libsonnet +++ b/dashboards/django-requests-overview.libsonnet @@ -66,8 +66,8 @@ local tbOverride = tbStandardOptions.override; query.withDatasourceFromVariable(datasourceVariable) + query.withSort(1) + query.generalOptions.withLabel('Job') + - query.selectionOptions.withMulti(true) + - query.selectionOptions.withIncludeAll(true, '.+') + + query.selectionOptions.withMulti(false) + + query.selectionOptions.withIncludeAll(false) + query.refresh.onLoad() + query.refresh.onTime(), diff --git a/dashboards_out/django-overview.json b/dashboards_out/django-overview.json index c2276b1..f303bcf 100644 --- a/dashboards_out/django-overview.json +++ b/dashboards_out/django-overview.json @@ -713,14 +713,13 @@ "type": "query" }, { - "allValue": ".+", "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "includeAll": true, + "includeAll": false, "label": "Job", - "multi": true, + "multi": false, "name": "job", "query": "label_values(django_http_responses_total_by_status_view_method_total{namespace=~\"$namespace\"}, job)", "refresh": 2, diff --git a/dashboards_out/django-requests-by-view.json b/dashboards_out/django-requests-by-view.json index 978f187..399cc31 100644 --- a/dashboards_out/django-requests-by-view.json +++ b/dashboards_out/django-requests-by-view.json @@ -617,14 +617,13 @@ "type": "query" }, { - "allValue": ".+", "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "includeAll": true, + "includeAll": false, "label": "Job", - "multi": true, + "multi": false, "name": "job", "query": "label_values(django_http_responses_total_by_status_view_method_total{namespace=~\"$namespace\"}, job)", "refresh": 2, diff --git a/dashboards_out/django-requests-overview.json b/dashboards_out/django-requests-overview.json index a30d05b..874b1b1 100644 --- a/dashboards_out/django-requests-overview.json +++ b/dashboards_out/django-requests-overview.json @@ -1052,14 +1052,13 @@ "type": "query" }, { - "allValue": ".+", "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "includeAll": true, + "includeAll": false, "label": "Job", - "multi": true, + "multi": false, "name": "job", "query": "label_values(django_http_responses_total_by_status_view_method_total{namespace=~\"$namespace\"}, job)", "refresh": 2,