From e25f366fe31183772e3f216a60ed88d60b54b996 Mon Sep 17 00:00:00 2001 From: Huo Linhe Date: Tue, 19 Oct 2021 10:09:08 +0800 Subject: [PATCH] chore: fix warnings in submission --- CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++++++++ README.md | 25 ------------------------- src/plugin.json | 5 ++--- 3 files changed, 37 insertions(+), 28 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f3b9fc8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# CONTRIBUTING + +Start your Grafana plugin develop by following the [6 tips for improving your Grafana plugin before you publish](https://grafana.com/blog/2021/01/21/6-tips-for-improving-your-grafana-plugin-before-you-publish/). + + +## Development Setup + +This plugin requires node >=12.0.0 and Go >= 1.7 . + +```sh +npm install -g yarn +yarn install +yarn build +``` + +In order to use the build target provided by the plug-in SDK, you can use the [mage](https://github.com/magefile/mage) build file. After the build is complete, copy mage to $PATH. + +```sh +git clone https://github.com/magefile/mage ../mage +cd ../mage +go run bootstrap.go +``` + +Run the following to update Grafana plugin SDK for Go dependency to the latest minor version: + +```sh +go get -u github.com/grafana/grafana-plugin-sdk-go +go mod tidy +``` + +[Build backend plugin binaries](https://grafana.com/tutorials/build-a-data-source-backend-plugin/) for Linux, Windows and Darwin to dist directory: + +```sh +mage -v +``` diff --git a/README.md b/README.md index bb2e2b4..73bb55f 100644 --- a/README.md +++ b/README.md @@ -21,31 +21,6 @@ sudo service grafana-server restart sudo systemctl start grafana-server ``` -### Dev setup - -This plugin requires node >=12.0.0 and Go >= 1.7 -``` -npm install -g yarn -yarn install -yarn build -``` -In order to use the build target provided by the plug-in SDK, you can use the [mage](https://github.com/magefile/mage) build file. After the build is complete, copy mage to $PATH. -``` -git clone https://github.com/magefile/mage ../mage -cd ../mage -go run bootstrap.go -``` -Run the following to update Grafana plugin SDK for Go dependency to the latest minor version: - -``` -go get -u github.com/grafana/grafana-plugin-sdk-go -go mod tidy -``` -[Build backend plugin binaries](https://grafana.com/tutorials/build-a-data-source-backend-plugin/) for Linux, Windows and Darwin to dist directory: -``` -mage -v -``` - ### Attention Since version 3.1.0, it began to support the alert function of grafana, but currently its sql statement only supports two variables: `$from` and `$to`. When using grafana's alert function, you must use `SQL` as the `Type` option. In addition, only `ALIAS BY` and `INPUT SQL` are valid. diff --git a/src/plugin.json b/src/plugin.json index c4f5d46..f2d0e78 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -23,14 +23,13 @@ }, "links": [ { "name": "GitHub", "url": "https://github.com/taosdata/grafanaplugin" }, - { "name": "AGPL-3.0", "url": "https://github.com/taosdata/grafanaplugin/LICENSE" } + { "name": "AGPL-3.0", "url": "https://github.com/taosdata/grafanaplugin/blob/master/LICENSE" } ], "version": "3.1.0", "updated": "2021-10-18" }, "dependencies": { - "grafanaDependency": "7.0.0", - "grafanaVersion": "5.2.4" + "grafanaDependency": ">=6.2.0" } }