Closed peishaofeng closed 2 years ago
Lot of changes. Looks nice. I will merge without checking. We should probably create a 1.5 version. Do you want to join this repository commiters. I don't have time to work on it for the moment.
We should probably create a 1.5 version.
YES, prior v6.7 might not be supported due to @grafana/data & @grafana/runtime package import, these two packages seem to emerge since v6.7
Do you want to join this repository commiters
I'd like join to make this panel better
Welcome new commiter from China :-) You should have received the invitation.
Where are you based ? I worked in china a few years ago in Kunming and Wuhan. I am now based in Brussels Belgium.
Thanks for your invitation.
I live and work in TianJin, a city very close to BeiJing, I found this bug while migrating inner-use Grafana to v8.0+, it is also my first PR accepted, be glad to co-work with you to make this plug useful to all Grafana users.
Overview
~8.2.5
What this PR does / why we need it
1. use TypeScript and @grafana/toolkit
Convert to TypeScript to add syntax checking, also replace Babel with official @grafana/toolkit build tool, so plugin can be released with bundled module.js
2. optimize src/ folder
3. compatible with Grafana v6.7+ to v8.2+
This panel display empty result in v8.0+ because Grafana introduce new DataFrame as query result format and remove TimeSeries support since v8.0, need to convert DataFrame to TimeSeries in v8.0+,
data_processor.ts
is used to perform format conversion, i copied this code snippet from official Graph panel and made minor modification.Special notes for your reviewer
1. auto-convert data format according Grafana version
for v6.0+ keep existing data format, no conversion.
for v7.0 or higher made changes below:
I have verified the same plugin package on Grafana v6.7.1, v7.4.1, v8.2.5, it works fine.
2. SDK 8.3.0 report fail
@grafana SDK 8.3.0 report error, so i use 8.2.5 instead
Does this PR introduce a user-facing change?