grafana / grafana-infinity-datasource

CSV, JSON, GraphQL, XML and HTML datasource for grafana.
https://grafana.com/docs/plugins/yesoreyeram-infinity-datasource
Apache License 2.0
732 stars 91 forks source link

[Bug] Pagination Error #705

Open em1064 opened 10 months ago

em1064 commented 10 months ago

Describe the bug

Pagination works fine as long as the pages queried have data.

As soon as the page has no data, then this error will occur. image

error getting data frame. unable to merge fields due to different fields
(Trace ID: 763b0b20f3281df1fac45df608e94594)

Version Details:

Additional context

image

Other related Nice to haves

LudwigJan commented 10 months ago

I am facing the same error:

Grafana version : 10.2.0-60982 Plugin version : 2.1.0

yesoreyeram commented 7 months ago

I am able to reproduce the behaviour when no results available in one of the pages. We can fix this in future iterations.

BTW, there is no plans to increase the max pages for the original reasons. ( you can somehow trigger 1000 pages. but we don't want to make it very obvious )

justmedude commented 5 months ago

Having a similar issue. I'm not a golang person (yet), but I'm thinking that this could be handled in: https://github.com/yesoreyeram/grafana-plugins/blob/main/lib/go/transformations/merge.go

Maybe somewhere after line 26:

if len(outFrame.fields) == 0 {
  continue
}