grafana / plugin-tools

Create Grafana plugins with ease.
https://grafana.com/developers/plugin-tools/
Apache License 2.0
58 stars 32 forks source link

ref: set testdata-db DS for panel plugin #1282

Closed s4kh closed 2 weeks ago

s4kh commented 3 weeks ago

What this PR does / why we need it:

Configures TestData DB for provisioned panel dashboard .

Which issue(s) this PR fixes:

Fixes https://github.com/grafana/plugin-tools/issues/1112 Fixes https://github.com/grafana/grafana-community-team/issues/243

Screenshot from 2024-10-31 10-22-01

github-actions[bot] commented 3 weeks ago

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

✨ This PR can be merged but will not trigger a new release. To trigger a new release add the release label before merging. NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.

s4kh commented 3 weeks ago

@jackw For the dashboard, we also have https://github.com/grafana/plugin-tools/pull/1282/files#diff-f5a693e0319d1b6e0c9ae180ebcb1aa6241150e9a48377120ec138f303ea91b2R81 config for same panel but scenarioId:no_data_points. Should we change this as well?

s4kh commented 3 weeks ago

@tolzhabayev @jackw One thing I noticed is if I change the scenario to something else and comeback again at Raw Frame the data is lost, refreshing the page populates the data. It seems the expected behaviour.

It doesn't (maybe should not) add a different scenario within the query, is only replaced - using index with the changed scenario. Change - https://github.com/grafana/grafana/blob/main/public/app/features/query/components/QueryEditorRows.tsx#L50 Change scenario - https://github.com/grafana/grafana/blob/main/public/app/plugins/datasource/grafana-testdata-datasource/QueryEditor.tsx#L87

grafana-plugins-platform-bot[bot] commented 2 weeks ago

:rocket: PR was released in @grafana/create-plugin@5.9.0, @grafana/plugin-e2e@1.12.0, website@3.5.0 :rocket: