From 285582ea40be9c5966b677772d864240b21057c1 Mon Sep 17 00:00:00 2001 From: sheyanjie-qq <249478495@qq.com> Date: Tue, 25 Jun 2024 15:10:20 +0800 Subject: [PATCH 1/3] chore(release): bump v3.5.2 --- package.json | 176 ++++++++++++++++++++++---------------------- src/plugin.json | 190 ++++++++++++++++++++++++------------------------ 2 files changed, 183 insertions(+), 183 deletions(-) diff --git a/package.json b/package.json index c70a0b5..9b7fe00 100644 --- a/package.json +++ b/package.json @@ -1,89 +1,89 @@ { - "name": "tdengine-datasource", - "version": "3.5.1", - "description": "Grafana datasource plugin for TDengine", - "scripts": { - "build": "webpack -c ./.config/webpack/webpack.config.ts --env development", - "build:prod": "webpack -c ./.config/webpack/webpack.config.ts --env production", - "build:dist": "webpack -c ./.config/webpack/webpack.config.ts --env production && mage", - "build:all": "webpack -c ./.config/webpack/webpack.config.ts --env production && mage && npx --yes @grafana/sign-plugin && scripts/package.sh", - "test": "jest --watch --onlyChanged", - "test:ci": "jest --passWithNoTests --maxWorkers 4", - "typecheck": "tsc --noEmit", - "lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "yarn lint --fix", - "e2e": "yarn cypress install && yarn grafana-e2e run", - "e2e:update": "yarn cypress install && yarn grafana-e2e run --update-screenshots", - "server": "docker-compose up --build", - "sign": "npx --yes @grafana/sign-plugin", - "package": "scripts/package.sh" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/taosdata/grafanaplugin.git" - }, - "author": "https://www.tdengine.com", - "license": "AGPL-3.0", - "bugs": { - "url": "https://github.com/taosdata/grafanaplugin/issues" - }, - "homepage": "https://tdengine.com", - "engineStrict": true, - "devDependencies": { - "@babel/core": "^7.16.7", - "@grafana/e2e": "9.2.5", - "@grafana/e2e-selectors": "9.2.5", - "@grafana/eslint-config": "^5.1.0", - "@grafana/tsconfig": "^1.2.0-rc1", - "@swc/core": "^1.2.144", - "@swc/helpers": "^0.4.12", - "@swc/jest": "^0.2.23", - "@testing-library/jest-dom": "^5.16.2", - "@testing-library/react": "^12.1.4", - "@types/glob": "^8.0.0", - "@types/jest": "^29.2.2", - "@types/lodash": "^4.14.188", - "@types/node": "^18.11.9", - "@typescript-eslint/eslint-plugin": "^5.42.1", - "@typescript-eslint/parser": "^5.42.1", - "copy-webpack-plugin": "^11.0.0", - "css-loader": "^6.7.1", - "eslint": "8.26.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-jsdoc": "^39.6.2", - "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-react": "^7.26.1", - "eslint-plugin-react-hooks": "^4.2.0", - "eslint-webpack-plugin": "^3.1.1", - "fork-ts-checker-webpack-plugin": "^7.2.0", - "glob": "^8.0.3", - "identity-obj-proxy": "3.0.0", - "jest": "^29.3.1", - "jest-environment-jsdom": "^29.3.1", - "prettier": "^2.5.0", - "replace-in-file-webpack-plugin": "^1.0.6", - "sass": "1.56.1", - "sass-loader": "13.2.0", - "style-loader": "3.3.1", - "swc-loader": "^0.2.3", - "ts-node": "^10.5.0", - "tsconfig-paths": "^4.1.0", - "typescript": "^4.4.0", - "webpack": "^5.76.0", - "webpack-cli": "^4.9.2", - "webpack-livereload-plugin": "^3.0.2" - }, - "engines": { - "node": ">=16" - }, - "resolutions": { - "rxjs": "7.5.6" - }, - "dependencies": { - "@grafana/data": "latest", - "@grafana/runtime": "latest", - "@grafana/ui": "latest", - "react": "17.0.2", - "react-dom": "17.0.2" - } -} + "name": "tdengine-datasource", + "version": "3.5.2", + "description": "Grafana datasource plugin for TDengine", + "scripts": { + "build": "webpack -c ./.config/webpack/webpack.config.ts --env development", + "build:prod": "webpack -c ./.config/webpack/webpack.config.ts --env production", + "build:dist": "webpack -c ./.config/webpack/webpack.config.ts --env production && mage", + "build:all": "webpack -c ./.config/webpack/webpack.config.ts --env production && mage && npx --yes @grafana/sign-plugin && scripts/package.sh", + "test": "jest --watch --onlyChanged", + "test:ci": "jest --passWithNoTests --maxWorkers 4", + "typecheck": "tsc --noEmit", + "lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .", + "lint:fix": "yarn lint --fix", + "e2e": "yarn cypress install && yarn grafana-e2e run", + "e2e:update": "yarn cypress install && yarn grafana-e2e run --update-screenshots", + "server": "docker-compose up --build", + "sign": "npx --yes @grafana/sign-plugin", + "package": "scripts/package.sh" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/taosdata/grafanaplugin.git" + }, + "author": "https://www.tdengine.com", + "license": "AGPL-3.0", + "bugs": { + "url": "https://github.com/taosdata/grafanaplugin/issues" + }, + "homepage": "https://tdengine.com", + "engineStrict": true, + "devDependencies": { + "@babel/core": "^7.16.7", + "@grafana/e2e": "9.2.5", + "@grafana/e2e-selectors": "9.2.5", + "@grafana/eslint-config": "^5.1.0", + "@grafana/tsconfig": "^1.2.0-rc1", + "@swc/core": "^1.2.144", + "@swc/helpers": "^0.4.12", + "@swc/jest": "^0.2.23", + "@testing-library/jest-dom": "^5.16.2", + "@testing-library/react": "^12.1.4", + "@types/glob": "^8.0.0", + "@types/jest": "^29.2.2", + "@types/lodash": "^4.14.188", + "@types/node": "^18.11.9", + "@typescript-eslint/eslint-plugin": "^5.42.1", + "@typescript-eslint/parser": "^5.42.1", + "copy-webpack-plugin": "^11.0.0", + "css-loader": "^6.7.1", + "eslint": "8.26.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-jsdoc": "^39.6.2", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-react": "^7.26.1", + "eslint-plugin-react-hooks": "^4.2.0", + "eslint-webpack-plugin": "^3.1.1", + "fork-ts-checker-webpack-plugin": "^7.2.0", + "glob": "^8.0.3", + "identity-obj-proxy": "3.0.0", + "jest": "^29.3.1", + "jest-environment-jsdom": "^29.3.1", + "prettier": "^2.5.0", + "replace-in-file-webpack-plugin": "^1.0.6", + "sass": "1.56.1", + "sass-loader": "13.2.0", + "style-loader": "3.3.1", + "swc-loader": "^0.2.3", + "ts-node": "^10.5.0", + "tsconfig-paths": "^4.1.0", + "typescript": "^4.4.0", + "webpack": "^5.76.0", + "webpack-cli": "^4.9.2", + "webpack-livereload-plugin": "^3.0.2" + }, + "engines": { + "node": ">=16" + }, + "resolutions": { + "rxjs": "7.5.6" + }, + "dependencies": { + "@grafana/data": "latest", + "@grafana/runtime": "latest", + "@grafana/ui": "latest", + "react": "17.0.2", + "react-dom": "17.0.2" + } +} \ No newline at end of file diff --git a/src/plugin.json b/src/plugin.json index c7e48a4..53b163c 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -1,105 +1,105 @@ { - "$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json", - "type": "datasource", - "name": "TDengine Datasource", - "id": "tdengine-datasource", - "metrics": true, - "backend": true, - "alerting": true, - "executable": "tdengine-datasource", - "includes": [ - { - "type": "dashboard", - "name": "TDinsightV3", - "path": "dashboards/TDinsightV3.json" - }, - { - "type": "dashboard", - "name": "TDinsightV2", - "path": "dashboards/TDinsightV2.json" - }, - { - "type": "dashboard", - "name": "TDsmeters", - "path": "dashboards/TDsmeters.json" - }, - { - "type": "dashboard", - "name": "taosX", - "path": "dashboards/taosX.json" - } - ], - "routes": [ - { - "path": "sqlutc", - "url": "{{ .SecureJsonData.url }}/rest/sqlutc", - "method": "POST", - "headers": [ + "$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json", + "type": "datasource", + "name": "TDengine Datasource", + "id": "tdengine-datasource", + "metrics": true, + "backend": true, + "alerting": true, + "executable": "tdengine-datasource", + "includes": [ { - "name": "Authorization", - "content": "Basic {{ .SecureJsonData.basicAuth }}" - } - ], - "urlParams": [ + "type": "dashboard", + "name": "TDinsightV3", + "path": "dashboards/TDinsightV3.json" + }, { - "name": "token", - "content": "{{ .SecureJsonData.token }}" - } - ] - }, - { - "path": "sql", - "url": "{{ .SecureJsonData.url }}/rest/sql", - "method": "POST", - "headers": [ + "type": "dashboard", + "name": "TDinsightV2", + "path": "dashboards/TDinsightV2.json" + }, + { + "type": "dashboard", + "name": "TDsmeters", + "path": "dashboards/TDsmeters.json" + }, { - "name": "Authorization", - "content": "Basic {{ .SecureJsonData.basicAuth }}" + "type": "dashboard", + "name": "taosX", + "path": "dashboards/taosX.json" } - ], - "urlParams": [ + ], + "routes": [ + { + "path": "sqlutc", + "url": "{{ .SecureJsonData.url }}/rest/sqlutc", + "method": "POST", + "headers": [ + { + "name": "Authorization", + "content": "Basic {{ .SecureJsonData.basicAuth }}" + } + ], + "urlParams": [ + { + "name": "token", + "content": "{{ .SecureJsonData.token }}" + } + ] + }, { - "name": "token", - "content": "{{ .SecureJsonData.token }}" + "path": "sql", + "url": "{{ .SecureJsonData.url }}/rest/sql", + "method": "POST", + "headers": [ + { + "name": "Authorization", + "content": "Basic {{ .SecureJsonData.basicAuth }}" + } + ], + "urlParams": [ + { + "name": "token", + "content": "{{ .SecureJsonData.token }}" + } + ] } - ] - } - ], - "info": { - "description": "Grafana datasource plugin for TDengine", - "author": { - "name": "TAOS Data Inc.", - "url": "https://tdengine.com" - }, - "keywords": [ - "taosdata", - "TDengine" ], - "logos": { - "small": "img/taosdata_logo.png", - "large": "img/taosdata_logo.png" + "info": { + "description": "Grafana datasource plugin for TDengine", + "author": { + "name": "TAOS Data Inc.", + "url": "https://tdengine.com" + }, + "keywords": [ + "taosdata", + "TDengine" + ], + "logos": { + "small": "img/taosdata_logo.png", + "large": "img/taosdata_logo.png" + }, + "links": [ + { + "name": "GitHub", + "url": "https://github.com/taosdata/grafanaplugin" + }, + { + "name": "AGPL-3.0", + "url": "https://github.com/taosdata/grafanaplugin/blob/master/LICENSE" + } + ], + "screenshots": [ + { + "name": "config", + "path": "img/howto-add-datasource.jpg" + } + ], + "version": "3.5.2", + "updated": "2024-06-25" }, - "links": [ - { - "name": "GitHub", - "url": "https://github.com/taosdata/grafanaplugin" - }, - { - "name": "AGPL-3.0", - "url": "https://github.com/taosdata/grafanaplugin/blob/master/LICENSE" - } - ], - "screenshots": [ - { - "name": "config", - "path": "img/howto-add-datasource.jpg" - } - ], - "version": "%VERSION%", - "updated": "%TODAY%" - }, - "dependencies": { - "grafanaDependency": ">=7.5.0", - "plugins": [] - } + "dependencies": { + "grafanaDependency": ">=7.5.0", + "plugins": [] + } } \ No newline at end of file From 90319f16e8174019bb1ab48f22c6a9d0ba1c9c8d Mon Sep 17 00:00:00 2001 From: sheyanjie-qq <249478495@qq.com> Date: Tue, 25 Jun 2024 15:11:08 +0800 Subject: [PATCH 2/3] add python release script --- scripts/release.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 scripts/release.py diff --git a/scripts/release.py b/scripts/release.py new file mode 100644 index 0000000..9f8c7a7 --- /dev/null +++ b/scripts/release.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +import os +import sys +import json +import subprocess +from datetime import datetime + +def update_nested_json(obj, key, new_value): + if key in obj: + obj[key] = new_value + for k, v in obj.items(): + if isinstance(v, dict): + update_nested_json(v, key, new_value) + +def update_json(file, key, new_value): + with open(file, 'r+') as f: + data = json.load(f) + update_nested_json(data, key, new_value) + f.seek(0) + json.dump(data, f, indent=4) + f.truncate() + +newv = sys.argv[1] +print(newv) + +ci = os.path.realpath(os.path.dirname(sys.argv[0])) + +update_json('package.json', 'version', newv) +update_json('src/plugin.json', 'version', newv) +update_json('src/plugin.json', 'updated', datetime.now().strftime('%Y-%m-%d')) + +# Uncomment the following lines if you want to use git-cliff +# subprocess.run(['wget', '-c', 'https://github.com/orhun/git-cliff/releases/download/v0.7.0/git-cliff-0.7.0-x86_64-unknown-linux-musl.tar.gz']) +# subprocess.run(['tar', 'xvf', 'git-cliff-0.7.0-x86_64-unknown-linux-musl.tar.gz']) +# subprocess.run(['install', 'git-cliff-0.7.0/git-cliff', '/usr/bin/git-cliff']) + +# subprocess.run(['git', 'cliff', '-t', f'v{newv}'], stdout=subprocess.DEVNULL) + +subprocess.run(['git', 'config', 'user.email'], check=False) or subprocess.run(['git', 'config', 'user.email', 'github-actions@github.com']) +subprocess.run(['git', 'config', 'user.name'], check=False) or subprocess.run(['git', 'config', 'user.name', 'GitHub Actions [bot]']) + +subprocess.run(['git', 'commit', '-a', '-m', f'chore(release): bump v{newv}']) +subprocess.run(['git', 'tag', f'v{newv}']) From ddcc8f91e9f6a244230bcc608b6ad2cc10393dcb Mon Sep 17 00:00:00 2001 From: sheyanjie-qq <249478495@qq.com> Date: Tue, 25 Jun 2024 15:16:57 +0800 Subject: [PATCH 3/3] chore(release): bump v3.5.2 --- package.json | 176 ++++++++++++++++++++--------------------- scripts/release.py | 16 ++-- src/plugin.json | 190 ++++++++++++++++++++++----------------------- 3 files changed, 189 insertions(+), 193 deletions(-) diff --git a/package.json b/package.json index 9b7fe00..6b7dcf4 100644 --- a/package.json +++ b/package.json @@ -1,89 +1,89 @@ { - "name": "tdengine-datasource", - "version": "3.5.2", - "description": "Grafana datasource plugin for TDengine", - "scripts": { - "build": "webpack -c ./.config/webpack/webpack.config.ts --env development", - "build:prod": "webpack -c ./.config/webpack/webpack.config.ts --env production", - "build:dist": "webpack -c ./.config/webpack/webpack.config.ts --env production && mage", - "build:all": "webpack -c ./.config/webpack/webpack.config.ts --env production && mage && npx --yes @grafana/sign-plugin && scripts/package.sh", - "test": "jest --watch --onlyChanged", - "test:ci": "jest --passWithNoTests --maxWorkers 4", - "typecheck": "tsc --noEmit", - "lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "yarn lint --fix", - "e2e": "yarn cypress install && yarn grafana-e2e run", - "e2e:update": "yarn cypress install && yarn grafana-e2e run --update-screenshots", - "server": "docker-compose up --build", - "sign": "npx --yes @grafana/sign-plugin", - "package": "scripts/package.sh" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/taosdata/grafanaplugin.git" - }, - "author": "https://www.tdengine.com", - "license": "AGPL-3.0", - "bugs": { - "url": "https://github.com/taosdata/grafanaplugin/issues" - }, - "homepage": "https://tdengine.com", - "engineStrict": true, - "devDependencies": { - "@babel/core": "^7.16.7", - "@grafana/e2e": "9.2.5", - "@grafana/e2e-selectors": "9.2.5", - "@grafana/eslint-config": "^5.1.0", - "@grafana/tsconfig": "^1.2.0-rc1", - "@swc/core": "^1.2.144", - "@swc/helpers": "^0.4.12", - "@swc/jest": "^0.2.23", - "@testing-library/jest-dom": "^5.16.2", - "@testing-library/react": "^12.1.4", - "@types/glob": "^8.0.0", - "@types/jest": "^29.2.2", - "@types/lodash": "^4.14.188", - "@types/node": "^18.11.9", - "@typescript-eslint/eslint-plugin": "^5.42.1", - "@typescript-eslint/parser": "^5.42.1", - "copy-webpack-plugin": "^11.0.0", - "css-loader": "^6.7.1", - "eslint": "8.26.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-jsdoc": "^39.6.2", - "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-react": "^7.26.1", - "eslint-plugin-react-hooks": "^4.2.0", - "eslint-webpack-plugin": "^3.1.1", - "fork-ts-checker-webpack-plugin": "^7.2.0", - "glob": "^8.0.3", - "identity-obj-proxy": "3.0.0", - "jest": "^29.3.1", - "jest-environment-jsdom": "^29.3.1", - "prettier": "^2.5.0", - "replace-in-file-webpack-plugin": "^1.0.6", - "sass": "1.56.1", - "sass-loader": "13.2.0", - "style-loader": "3.3.1", - "swc-loader": "^0.2.3", - "ts-node": "^10.5.0", - "tsconfig-paths": "^4.1.0", - "typescript": "^4.4.0", - "webpack": "^5.76.0", - "webpack-cli": "^4.9.2", - "webpack-livereload-plugin": "^3.0.2" - }, - "engines": { - "node": ">=16" - }, - "resolutions": { - "rxjs": "7.5.6" - }, - "dependencies": { - "@grafana/data": "latest", - "@grafana/runtime": "latest", - "@grafana/ui": "latest", - "react": "17.0.2", - "react-dom": "17.0.2" - } -} \ No newline at end of file + "name": "tdengine-datasource", + "version": "3.5.2", + "description": "Grafana datasource plugin for TDengine", + "scripts": { + "build": "webpack -c ./.config/webpack/webpack.config.ts --env development", + "build:prod": "webpack -c ./.config/webpack/webpack.config.ts --env production", + "build:dist": "webpack -c ./.config/webpack/webpack.config.ts --env production && mage", + "build:all": "webpack -c ./.config/webpack/webpack.config.ts --env production && mage && npx --yes @grafana/sign-plugin && scripts/package.sh", + "test": "jest --watch --onlyChanged", + "test:ci": "jest --passWithNoTests --maxWorkers 4", + "typecheck": "tsc --noEmit", + "lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .", + "lint:fix": "yarn lint --fix", + "e2e": "yarn cypress install && yarn grafana-e2e run", + "e2e:update": "yarn cypress install && yarn grafana-e2e run --update-screenshots", + "server": "docker-compose up --build", + "sign": "npx --yes @grafana/sign-plugin", + "package": "scripts/package.sh" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/taosdata/grafanaplugin.git" + }, + "author": "https://www.tdengine.com", + "license": "AGPL-3.0", + "bugs": { + "url": "https://github.com/taosdata/grafanaplugin/issues" + }, + "homepage": "https://tdengine.com", + "engineStrict": true, + "devDependencies": { + "@babel/core": "^7.16.7", + "@grafana/e2e": "9.2.5", + "@grafana/e2e-selectors": "9.2.5", + "@grafana/eslint-config": "^5.1.0", + "@grafana/tsconfig": "^1.2.0-rc1", + "@swc/core": "^1.2.144", + "@swc/helpers": "^0.4.12", + "@swc/jest": "^0.2.23", + "@testing-library/jest-dom": "^5.16.2", + "@testing-library/react": "^12.1.4", + "@types/glob": "^8.0.0", + "@types/jest": "^29.2.2", + "@types/lodash": "^4.14.188", + "@types/node": "^18.11.9", + "@typescript-eslint/eslint-plugin": "^5.42.1", + "@typescript-eslint/parser": "^5.42.1", + "copy-webpack-plugin": "^11.0.0", + "css-loader": "^6.7.1", + "eslint": "8.26.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-jsdoc": "^39.6.2", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-react": "^7.26.1", + "eslint-plugin-react-hooks": "^4.2.0", + "eslint-webpack-plugin": "^3.1.1", + "fork-ts-checker-webpack-plugin": "^7.2.0", + "glob": "^8.0.3", + "identity-obj-proxy": "3.0.0", + "jest": "^29.3.1", + "jest-environment-jsdom": "^29.3.1", + "prettier": "^2.5.0", + "replace-in-file-webpack-plugin": "^1.0.6", + "sass": "1.56.1", + "sass-loader": "13.2.0", + "style-loader": "3.3.1", + "swc-loader": "^0.2.3", + "ts-node": "^10.5.0", + "tsconfig-paths": "^4.1.0", + "typescript": "^4.4.0", + "webpack": "^5.76.0", + "webpack-cli": "^4.9.2", + "webpack-livereload-plugin": "^3.0.2" + }, + "engines": { + "node": ">=16" + }, + "resolutions": { + "rxjs": "7.5.6" + }, + "dependencies": { + "@grafana/data": "latest", + "@grafana/runtime": "latest", + "@grafana/ui": "latest", + "react": "17.0.2", + "react-dom": "17.0.2" + } +} diff --git a/scripts/release.py b/scripts/release.py index 9f8c7a7..21a50da 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -2,22 +2,18 @@ import os import sys import json +import re import subprocess from datetime import datetime -def update_nested_json(obj, key, new_value): - if key in obj: - obj[key] = new_value - for k, v in obj.items(): - if isinstance(v, dict): - update_nested_json(v, key, new_value) - def update_json(file, key, new_value): with open(file, 'r+') as f: - data = json.load(f) - update_nested_json(data, key, new_value) + content = f.read() + pattern = f'"{key}": ".*?"' + replacement = f'"{key}": "{new_value}"' + content = re.sub(pattern, replacement, content) f.seek(0) - json.dump(data, f, indent=4) + f.write(content) f.truncate() newv = sys.argv[1] diff --git a/src/plugin.json b/src/plugin.json index 53b163c..196dc25 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -1,105 +1,105 @@ { - "$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json", - "type": "datasource", - "name": "TDengine Datasource", - "id": "tdengine-datasource", - "metrics": true, - "backend": true, - "alerting": true, - "executable": "tdengine-datasource", - "includes": [ - { - "type": "dashboard", - "name": "TDinsightV3", - "path": "dashboards/TDinsightV3.json" - }, - { - "type": "dashboard", - "name": "TDinsightV2", - "path": "dashboards/TDinsightV2.json" - }, + "$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json", + "type": "datasource", + "name": "TDengine Datasource", + "id": "tdengine-datasource", + "metrics": true, + "backend": true, + "alerting": true, + "executable": "tdengine-datasource", + "includes": [ + { + "type": "dashboard", + "name": "TDinsightV3", + "path": "dashboards/TDinsightV3.json" + }, + { + "type": "dashboard", + "name": "TDinsightV2", + "path": "dashboards/TDinsightV2.json" + }, + { + "type": "dashboard", + "name": "TDsmeters", + "path": "dashboards/TDsmeters.json" + }, + { + "type": "dashboard", + "name": "taosX", + "path": "dashboards/taosX.json" + } + ], + "routes": [ + { + "path": "sqlutc", + "url": "{{ .SecureJsonData.url }}/rest/sqlutc", + "method": "POST", + "headers": [ { - "type": "dashboard", - "name": "TDsmeters", - "path": "dashboards/TDsmeters.json" - }, + "name": "Authorization", + "content": "Basic {{ .SecureJsonData.basicAuth }}" + } + ], + "urlParams": [ { - "type": "dashboard", - "name": "taosX", - "path": "dashboards/taosX.json" + "name": "token", + "content": "{{ .SecureJsonData.token }}" } - ], - "routes": [ + ] + }, + { + "path": "sql", + "url": "{{ .SecureJsonData.url }}/rest/sql", + "method": "POST", + "headers": [ { - "path": "sqlutc", - "url": "{{ .SecureJsonData.url }}/rest/sqlutc", - "method": "POST", - "headers": [ - { - "name": "Authorization", - "content": "Basic {{ .SecureJsonData.basicAuth }}" - } - ], - "urlParams": [ - { - "name": "token", - "content": "{{ .SecureJsonData.token }}" - } - ] - }, + "name": "Authorization", + "content": "Basic {{ .SecureJsonData.basicAuth }}" + } + ], + "urlParams": [ { - "path": "sql", - "url": "{{ .SecureJsonData.url }}/rest/sql", - "method": "POST", - "headers": [ - { - "name": "Authorization", - "content": "Basic {{ .SecureJsonData.basicAuth }}" - } - ], - "urlParams": [ - { - "name": "token", - "content": "{{ .SecureJsonData.token }}" - } - ] + "name": "token", + "content": "{{ .SecureJsonData.token }}" } + ] + } + ], + "info": { + "description": "Grafana datasource plugin for TDengine", + "author": { + "name": "TAOS Data Inc.", + "url": "https://tdengine.com" + }, + "keywords": [ + "taosdata", + "TDengine" ], - "info": { - "description": "Grafana datasource plugin for TDengine", - "author": { - "name": "TAOS Data Inc.", - "url": "https://tdengine.com" - }, - "keywords": [ - "taosdata", - "TDengine" - ], - "logos": { - "small": "img/taosdata_logo.png", - "large": "img/taosdata_logo.png" - }, - "links": [ - { - "name": "GitHub", - "url": "https://github.com/taosdata/grafanaplugin" - }, - { - "name": "AGPL-3.0", - "url": "https://github.com/taosdata/grafanaplugin/blob/master/LICENSE" - } - ], - "screenshots": [ - { - "name": "config", - "path": "img/howto-add-datasource.jpg" - } - ], - "version": "3.5.2", - "updated": "2024-06-25" + "logos": { + "small": "img/taosdata_logo.png", + "large": "img/taosdata_logo.png" }, - "dependencies": { - "grafanaDependency": ">=7.5.0", - "plugins": [] - } + "links": [ + { + "name": "GitHub", + "url": "https://github.com/taosdata/grafanaplugin" + }, + { + "name": "AGPL-3.0", + "url": "https://github.com/taosdata/grafanaplugin/blob/master/LICENSE" + } + ], + "screenshots": [ + { + "name": "config", + "path": "img/howto-add-datasource.jpg" + } + ], + "version": "3.5.2", + "updated": "2024-06-25" + }, + "dependencies": { + "grafanaDependency": ">=7.5.0", + "plugins": [] + } } \ No newline at end of file