Skip to content

Commit 7a0f2fb

Browse files
authored
Fixed lint warnings in Grafana raised by Mixtool (#22486)
This PR introduces a few minor changes to the gitea-monitoring-mixin, specifically linting issues raised by [Mixtool](https://github.com/monitoring-mixins/mixtool): - Query selectors using `job` and `instance` have been update to allow multi-select - Added missing attributes to `job` and `instance` template As this change is very minor I haven't created an issue, but please let me know if you'd like me to do so. According to the guidelines, it seemed to only be for larger designs :)
1 parent 21c91b7 commit 7a0f2fb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

contrib/gitea-monitoring-mixin/dashboards/overview.libsonnet

+9-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ local addIssueLabelsOverrides(labels) =
2929

3030
grafanaDashboards+:: {
3131

32-
local giteaSelector = 'job="$job", instance="$instance"',
32+
local giteaSelector = 'job=~"$job", instance=~"$instance"',
3333
local giteaStatsPanel =
3434
grafana.statPanel.new(
3535
'Gitea stats',
@@ -399,25 +399,31 @@ local addIssueLabelsOverrides(labels) =
399399
.addTemplate(
400400
{
401401
hide: 0,
402-
label: null,
402+
label: 'job',
403403
name: 'job',
404404
options: [],
405+
datasource: '$datasource',
405406
query: 'label_values(gitea_organizations, job)',
406407
refresh: 1,
407408
regex: '',
408409
type: 'query',
410+
multi: true,
411+
allValue: '.+'
409412
},
410413
)
411414
.addTemplate(
412415
{
413416
hide: 0,
414-
label: null,
417+
label: 'instance',
415418
name: 'instance',
416419
options: [],
420+
datasource: '$datasource',
417421
query: 'label_values(gitea_organizations{job="$job"}, instance)',
418422
refresh: 1,
419423
regex: '',
420424
type: 'query',
425+
multi: true,
426+
allValue: '.+'
421427
},
422428
)
423429
.addTemplate(

0 commit comments

Comments
 (0)