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

Examples: Add log data source #200

Merged
merged 11 commits into from
Oct 26, 2023
Merged

Examples: Add log data source #200

merged 11 commits into from
Oct 26, 2023

Conversation

ivanahuckova
Copy link
Member

@ivanahuckova ivanahuckova commented Sep 12, 2023

Based on conversation with @xnyo I am creating a PR that adds a new datasource example with datasource that implements logging features. The datasource just mocks receiving of logs trough mockDataRequest.ts. Let me know if there is anything I need to change/update. 🙂

@xnyo xnyo self-assigned this Sep 13, 2023
@xnyo xnyo self-requested a review September 13, 2023 12:19
@ivanahuckova
Copy link
Member Author

Just wanted to check on this - if you've had time to review/have any feedback 🙂

Copy link
Member

@xnyo xnyo left a comment

Choose a reason for hiding this comment

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

Awesome work!! Sorry if this took so long 😞

I took it up for a spin and it works really well 👏 👏

Looks great so far! I only have a few comments:

It would also be great to see how it would look like combined with a backend component, rather than frontend-only, but that's something that we look into later on.

examples/datasource-logs/src/components/ConfigEditor.tsx Outdated Show resolved Hide resolved
examples/datasource-logs/src/datasource.ts Outdated Show resolved Hide resolved
examples/datasource-logs/src/datasource.ts Show resolved Hide resolved
examples/datasource-logs/src/datasource.ts Show resolved Hide resolved
examples/datasource-logs/src/types.ts Outdated Show resolved Hide resolved
examples/datasource-logs/src/types.ts Outdated Show resolved Hide resolved
@ivanahuckova
Copy link
Member Author

@xnyo the integration test is failing on Build plugin with canary_version @grafana dependencies but not sure how to debug that. Do you have any thoughts?
image

@ivanahuckova
Copy link
Member Author

Okay, I was able to figure it out. Seems like @swc/core version was an issue and this https://stackoverflow.com/questions/76884057/grafana-build-a-panel-plugin-from-template-error helped me to resolve it. Interestingly, all other examples in this repo use the same 1.3.75 version, so it seems like it is a known issue. Have you considered changing dependency to version in template to 1.3.75 as it works, compared to other versions.

Copy link
Member

@xnyo xnyo left a comment

Choose a reason for hiding this comment

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

LGTM!

@xnyo
Copy link
Member

xnyo commented Oct 26, 2023

Okay, I was able to figure it out. Seems like @swc/core version was an issue and this https://stackoverflow.com/questions/76884057/grafana-build-a-panel-plugin-from-template-error helped me to resolve it. Interestingly, all other examples in this repo use the same 1.3.75 version, so it seems like it is a known issue. Have you considered changing dependency to version in template to 1.3.75 as it works, compared to other versions.

It looks like this has been bumped to ^1.3.90 in the latest template: https://github.com/grafana/plugin-tools/blob/18adb4b38dc283c7a7d10c8355580cbdad96e72e/packages/create-plugin/templates/common/_package.json#L26

@ivanahuckova ivanahuckova merged commit a73e780 into main Oct 26, 2023
24 checks passed
@ivanahuckova ivanahuckova deleted the ivana/logs-ds-example branch October 26, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants