GoshPosh / grafana-meta-queries

Grafana plugin for calculating time period metrics like week over week, month over month and year over year etc.
Apache License 2.0
284 stars 71 forks source link

Correctly set plugin name and id #73

Closed danez closed 2 years ago

danez commented 5 years ago

Problem

Currently the name of the datasource is not shown in the interface of grafana. Screenshot 2019-09-18 at 13 51 29

Solution

Correctly set the name and the id on the plugin in the constructor. This is the same as if using the new ES2015+/TS plugin api and extending DataSourceAPI (https://github.com/grafana/grafana/blob/v6.3.5/packages/grafana-ui/src/types/datasource.ts#L143)

After the change it looks like this: Screenshot 2019-09-18 at 13 52 01

I also called build and it generated dist, I hope it is okay to do that, otherwise I remove them again.

I'm not 100% certain, but I think this changed in 6.3 of grafana.

Gauravshah commented 5 years ago

thanks for adding this @danez Can you help check if this is backward compatible with 6.x or 5.x ?

danez commented 5 years ago

Ok will check

danez commented 5 years ago

I tested with grafana 4.0.0 and 5.0.0 and in both cases it works as expected and it seems the instanceSettings did already exists in these versions. 5 4

I will create another PR with the docker setup to easily test different versions.

ShilpaSivanesan commented 2 years ago

Fixed with 8.x.x grafana version