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

Create-Plugin: Implement DataSourceWithBackend for datasource plugins with backend #134

Merged
merged 2 commits into from
Nov 4, 2022

Conversation

xnyo
Copy link
Member

@xnyo xnyo commented Nov 3, 2022

What this PR does / why we need it:

Changes datasource.ts (only when backend is opted-in) with an implementation of DataSourceWithBackend.

This ensures the query and testDatasource methods are called from the backend.

The call to the backend is handled by DataSourceWithBackend already and does not require any special overriding.

Which issue(s) this PR fixes:

Fixes #25

Special notes for your reviewer:

…ckend

This ensures the plugin calls the backend handlers for the "query" and "testDatasource" methods.
@xnyo xnyo added enhancement New feature or request create-plugin related to the create-plugin tool minor Increment the minor version when merged labels Nov 3, 2022
@xnyo xnyo self-assigned this Nov 3, 2022
Copy link
Collaborator

@mckn mckn left a comment

Choose a reason for hiding this comment

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

Great work on this!!

@xnyo xnyo merged commit f8ba6ec into main Nov 4, 2022
@xnyo xnyo deleted the giuseppe/25-datasource-with-backend-template branch November 4, 2022 10:17
@grafanabot
Copy link
Contributor

🚀 PR was released in @grafana/create-plugin@0.5.0 🚀

@grafanabot grafanabot added the released This issue/pull request has been released. label Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-plugin related to the create-plugin tool enhancement New feature or request minor Increment the minor version when merged released This issue/pull request has been released.
Projects
Development

Successfully merging this pull request may close these issues.

Datasource should implement DataSourceWithBackend when backend is opted-in
3 participants