diff options
author | Emily | 2023-01-17 17:23:25 +0100 |
---|---|---|
committer | GitHub | 2023-01-17 10:23:25 -0600 |
commit | 7a0f2fb1dc83bb3a8ab5dc2ae3379c9672584d4d (patch) | |
tree | f3e16bab63801ded60067eda02ca2e7e996ff7a7 /contrib | |
parent | 21c91b7dff29107eeadfeec9ed6305fd43fa49b4 (diff) |
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 :)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gitea-monitoring-mixin/dashboards/overview.libsonnet | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/gitea-monitoring-mixin/dashboards/overview.libsonnet b/contrib/gitea-monitoring-mixin/dashboards/overview.libsonnet index 3e2513c4c..31b7d4f9b 100644 --- a/contrib/gitea-monitoring-mixin/dashboards/overview.libsonnet +++ b/contrib/gitea-monitoring-mixin/dashboards/overview.libsonnet @@ -29,7 +29,7 @@ local addIssueLabelsOverrides(labels) = grafanaDashboards+:: { - local giteaSelector = 'job="$job", instance="$instance"', + local giteaSelector = 'job=~"$job", instance=~"$instance"', local giteaStatsPanel = grafana.statPanel.new( 'Gitea stats', @@ -399,25 +399,31 @@ local addIssueLabelsOverrides(labels) = .addTemplate( { hide: 0, - label: null, + label: 'job', name: 'job', options: [], + datasource: '$datasource', query: 'label_values(gitea_organizations, job)', refresh: 1, regex: '', type: 'query', + multi: true, + allValue: '.+' }, ) .addTemplate( { hide: 0, - label: null, + label: 'instance', name: 'instance', options: [], + datasource: '$datasource', query: 'label_values(gitea_organizations{job="$job"}, instance)', refresh: 1, regex: '', type: 'query', + multi: true, + allValue: '.+' }, ) .addTemplate( |