chore!: rename datasource
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
This commit is contained in:
parent
00743a0ac6
commit
a13ad275ee
|
@ -33,5 +33,6 @@ e2e-results/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
yeya24-chaosmesh-datasource
|
chaosmeshorg-datasource
|
||||||
*.zip
|
*.zip
|
||||||
|
*.zip.md5
|
||||||
|
|
|
@ -13,7 +13,7 @@ Grafana data source plugin for Chaos Mesh.
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
grafana-cli plugins install yeya24-chaosmesh-datasource
|
grafana-cli plugins install chaosmeshorg-datasource
|
||||||
```
|
```
|
||||||
|
|
||||||
For more installation options, refer: <https://grafana.com/docs/grafana/latest/plugins/installation>.
|
For more installation options, refer: <https://grafana.com/docs/grafana/latest/plugins/installation>.
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
VERSION=$1
|
||||||
|
|
||||||
|
rm -rf dist
|
||||||
|
rm -rf chaosmeshorg-datasource
|
||||||
|
|
||||||
|
echo "Bundled Version: $VERSION"
|
||||||
|
echo "Start to build..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
yarn build
|
||||||
|
# yarn sign
|
||||||
|
|
||||||
|
echo "Bundling..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
cp -r dist chaosmeshorg-datasource
|
||||||
|
zip -r chaosmeshorg-datasource-$VERSION.zip chaosmeshorg-datasource -x "*.DS_Store*"
|
||||||
|
md5sum chaosmeshorg-datasource-2.1.0.zip > chaosmeshorg-datasource-2.1.0.zip.md5
|
12
package.json
12
package.json
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "chaosmesh-datasource",
|
"name": "chaosmeshorg-datasource",
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"description": "Chaos Mesh (A Chaos Engineering Platform for Kubernetes) Datasource",
|
"description": "Chaos Mesh (A Chaos Engineering Platform for Kubernetes) Datasource",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -16,16 +16,16 @@
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grafana/data": "latest",
|
"@grafana/data": "latest",
|
||||||
"@grafana/runtime": "^8.1.2",
|
"@grafana/runtime": "^8.2.2",
|
||||||
"@grafana/toolkit": "latest",
|
"@grafana/toolkit": "latest",
|
||||||
"@grafana/ui": "7.0.0",
|
"@grafana/ui": "7.0.0",
|
||||||
"@testing-library/jest-dom": "5.4.0",
|
"@testing-library/jest-dom": "5.4.0",
|
||||||
"@testing-library/react": "^10.0.2",
|
"@testing-library/react": "^10.0.2",
|
||||||
"@types/lodash": "latest",
|
"@types/lodash": "^4.14.176",
|
||||||
"husky": "^7.0.2",
|
"husky": "^7.0.4",
|
||||||
"import-sort-style-eslint": "^6.0.0",
|
"import-sort-style-eslint": "^6.0.0",
|
||||||
"lint-staged": "^11.1.2",
|
"lint-staged": "^11.2.4",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.4.1",
|
||||||
"prettier-plugin-import-sort": "^0.0.7"
|
"prettier-plugin-import-sort": "^0.0.7"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
|
|
|
@ -27,13 +27,13 @@ export class DataSource extends DataSourceApi<EventsQuery, ChaosMeshDataSourceOp
|
||||||
this.url = instanceSettings.url!;
|
this.url = instanceSettings.url!;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async fetch<T>(url: string, query?: EventsQuery): Promise<T> {
|
private async fetch<T>(url: string, query?: Partial<EventsQuery>): Promise<T> {
|
||||||
const data = await getBackendSrv().get(this.url + url, query);
|
const data = await getBackendSrv().get(this.url + url, query);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async fetchEvents(query: EventsQuery) {
|
private async fetchEvents(query: Partial<EventsQuery>) {
|
||||||
return await this.fetch<Event[]>('/api/events', query);
|
return await this.fetch<Event[]>('/api/events', query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json",
|
"$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json",
|
||||||
"type": "datasource",
|
"type": "datasource",
|
||||||
"name": "Chaos Mesh",
|
"name": "Chaos Mesh",
|
||||||
"id": "yeya24-chaosmesh-datasource",
|
"id": "chaosmeshorg-datasource",
|
||||||
"category": "cloud",
|
"category": "cloud",
|
||||||
"annotations": true,
|
"annotations": true,
|
||||||
"metrics": true,
|
"metrics": true,
|
||||||
|
|
Loading…
Reference in New Issue