Skip to content

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: ''

@v-zhuravlev v-zhuravlev requested a review from K-Phoen November 5, 2024 15:18
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