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

New Doc: Adding a suggestion supplier to a plugin #816

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

briangann
Copy link
Contributor

What this PR does / why we need it:

Adds docs for creating a suggestion supplier for a plugin

Which issue(s) this PR fixes:

Fixes # grafana/grafana#84419

@briangann briangann added type/docs Changes only affect the documentation no-changelog Don't include in changelog and version calculations labels Mar 14, 2024
@briangann briangann requested a review from a team as a code owner March 14, 2024 03:12
@briangann briangann requested review from jackw and removed request for a team March 14, 2024 03:12
Copy link

github-actions bot commented Mar 14, 2024

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs.

@academo academo changed the title add docs New Doc: Adding a suggestion supplier to a plugin Mar 14, 2024
Copy link
Contributor

@josmperez josmperez left a comment

Choose a reason for hiding this comment

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

I've made some editorial commits and suggestions, but no blocking issues. LGTM.


You can add a suggestion supplier to examine query data coming from a panel and suggest usage of the plugin for the type of data detected. This guide provides instructions for doing so along with links to relevant examples.

A single stat panel would be ranked "high" for a single series, and "low" for multiple series (or even none).
Copy link
Contributor

Choose a reason for hiding this comment

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

This sentence seems disconnected from what came before. Can you clarify?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add text here, i left out context


:::note

When creating a suggestion supplier be certain the plugin can actually render something for the data being provided.
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if you don't?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Grafana will either display a blank panel and/or an error message will be displayed. It's best to offer the plugin only to query data that matches well-known criteria that the author can validate.


## Additional resources

Reference these suggestion suppliers to get ideas for further customization:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a sentence or part of a sentence to note what's distinctive about the suggestion suppliers in each of these plugins?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do!

@briangann
Copy link
Contributor Author

updated with more details, hopefully this reads a little better

@briangann briangann merged commit de33fbe into main Mar 20, 2024
12 checks passed
@briangann briangann deleted the briangann/20240313_add_suggestion_supplier branch March 20, 2024 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Don't include in changelog and version calculations type/docs Changes only affect the documentation
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants