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

Add unit rule exclusions #205

Merged
merged 7 commits into from
Nov 6, 2024
Merged

Add unit rule exclusions #205

merged 7 commits into from
Nov 6, 2024

Conversation

v-zhuravlev
Copy link
Contributor

@v-zhuravlev v-zhuravlev commented Nov 5, 2024

Add options when unit rule is excluded when:

  • Value mappings are set in a panel. (no need for units!)
  • A Stat panel is configured to show non-numeric values (like label's value that contains version tag), for that 'Fields options' are configured to any value other than 'Numeric fields' (which is default).

This change also start to use grafana foundation SDK:
https://grafana.github.io/grafana-foundation-sdk/v11.3.x+cog-v0.0.x/go/Reference/

This should help with errors like this:

[panel-units-rule] 'Windows overview': Dashboard 'Windows overview', panel 'Hostname' has no or invalid units defined: ''
[panel-units-rule] 'Windows overview': Dashboard 'Windows overview', panel 'OS version' has no or invalid units defined: ''
[panel-units-rule] 'Windows overview': Dashboard 'Windows overview', panel 'OS family' has no or invalid units defined: ''

Copy link
Collaborator

@rgeyer rgeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for this improvement!

@v-zhuravlev v-zhuravlev merged commit 6ba6fe6 into main Nov 6, 2024
7 checks passed
@v-zhuravlev v-zhuravlev deleted the vzhuravlev/unit_rule branch November 6, 2024 11:46
@alex5517 alex5517 mentioned this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants