Build plugin with grafana toolkit (#1539)

* Use grafana toolkit template for building plugin

* Fix linter and type errors

* Update styles building

* Fix sass deprecation warning

* Remove empty js files produced by webpack building sass

* Fix signing script

* Replace classnames with cx

* Fix data source config page

* Use custom webpack config instead of overriding original one

* Use gpx_ prefix for plugin executable

* Remove unused configs

* Roll back react hooks dependencies usage

* Move plugin-specific ts config to root config file

* Temporary do not use rst2html for function description tooltip

* Remove unused code

* remove unused dependencies

* update react table dependency

* Migrate tests to typescript

* remove unused dependencies

* Remove old webpack configs

* Add sign target to makefile

* Add magefile

* Update CI test job

* Update go packages

* Update build instructions

* Downgrade go version to 1.18

* Fix go version in ci

* Fix metric picker

* Add comment to webpack config

* remove angular mocks

* update bra config

* Rename datasource-zabbix to datasource (fix mage build)

* Add instructions for building backend with mage

* Fix webpack targets

* Fix ci backend tests

* Add initial e2e tests

* Fix e2e ci tests

* Update docker compose for cypress tests

* build grafana docker image

* Fix docker stop task

* CI: add Grafana compatibility check
This commit is contained in:
Alexander Zobnin
2022-12-09 14:14:34 +03:00
committed by GitHub
parent 26ed740945
commit e3e896742b
136 changed files with 5765 additions and 4636 deletions

View File

@@ -5,15 +5,19 @@
"description": "Zabbix plugin for Grafana",
"homepage": "http://grafana-zabbix.org",
"scripts": {
"build": "webpack --config webpack/webpack.prod.conf.js --progress --colors",
"dev": "webpack --config webpack/webpack.dev.conf.js --watch --progress --colors",
"dev-build": "webpack --config webpack/webpack.dev.conf.js",
"watch": "webpack --config webpack/webpack.dev.conf.js --watch --progress --colors",
"test": "jest",
"jest": "jest --notify --watch",
"codecov": "jest --coverage && codecov",
"ci-test": "jest --coverage",
"lint": "jshint --reporter=node_modules/jshint-stylish src/ & jscs src/"
"build": "webpack -c ./webpack.config.ts --env production",
"dev": "webpack -w -c ./webpack.config.ts --env development",
"test": "jest --watch --onlyChanged",
"test:ci": "jest --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 --file ./devenv/default/docker-compose.yml up --build",
"server:stop": "docker-compose --file ./devenv/default/docker-compose.yml stop",
"server:down": "docker-compose --file ./devenv/default/docker-compose.yml down",
"sign": "grafana-toolkit plugin:sign"
},
"repository": {
"type": "git",
@@ -25,39 +29,56 @@
"url": "https://github.com/alexanderzobnin/grafana-zabbix/issues"
},
"devDependencies": {
"@babel/core": "7.7.7",
"@babel/preset-env": "7.7.7",
"@babel/preset-react": "7.6.3",
"@emotion/css": "11.1.3",
"@emotion/react": "11.1.5",
"@grafana/data": "9.1.2",
"@grafana/e2e": "9.2.5",
"@grafana/e2e-selectors": "9.2.5",
"@grafana/eslint-config": "^5.1.0",
"@grafana/runtime": "9.1.2",
"@grafana/toolkit": "9.1.2",
"@grafana/tsconfig": "^1.2.0-rc1",
"@grafana/ui": "9.1.2",
"@popperjs/core": "2.4.0",
"@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/classnames": "2.2.9",
"@types/glob": "^8.0.0",
"@types/grafana": "github:CorpGlory/types-grafana",
"@types/jest": "24.0.13",
"@types/jest": "^29.2.2",
"@types/jquery": "3.3.32",
"@types/lodash": "4.14.161",
"@types/lodash": "^4.14.188",
"@types/node": "^18.11.9",
"@types/react": "17.0.42",
"@types/react-dom": "17.0.14",
"@types/react-router-dom": "^5.3.3",
"@types/react-transition-group": "4.2.4",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"autoprefixer": "10.4.7",
"axios": "^0.21.1",
"babel-jest": "24.8.0",
"babel-loader": "8.0.6",
"babel-plugin-angularjs-annotate": "0.10.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"benchmark": "^2.1.4",
"classnames": "2.2.6",
"clean-webpack-plugin": "^0.1.19",
"codecov": "^3.1.0",
"copy-webpack-plugin": "^5.1.1",
"css-loader": "3.4.2",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"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",
"html-loader": "0.5.5",
"jest": "24.8.0",
"identity-obj-proxy": "3.0.0",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-environment-jsdom-fifteen": "^1.0.2",
"jscs": "^3.0.7",
"jsdom": "~11.3.0",
@@ -65,29 +86,43 @@
"jshint-stylish": "^2.1.0",
"lodash": "4.17.21",
"memoize-one": "5.1.1",
"mini-css-extract-plugin": "2.6.1",
"moment": "2.24.0",
"ng-annotate-webpack-plugin": "0.3.0",
"node-sass": "^7.0.1",
"postcss": "8.4.14",
"postcss-loader": "7.0.1",
"postcss-reporter": "7.0.5",
"postcss-scss": "4.0.4",
"prettier": "^2.5.0",
"prop-types": "15.7.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-popper": "^2.2.3",
"react-table-6": "^6.8.6",
"react-table-6": "6.11.0",
"react-test-renderer": "17.0.2",
"react-transition-group": "4.3.0",
"react-use": "17.4.0",
"rst2html": "github:thoward/rst2html#990cb89",
"replace-in-file-webpack-plugin": "^1.0.6",
"rxjs": "6.6.3",
"sass-loader": "10.2.1",
"sass": "1.56.1",
"sass-loader": "13.2.0",
"semver": "^7.3.2",
"style-loader": "1.1.3",
"style-loader": "3.3.1",
"swc-loader": "^0.2.3",
"tether-drop": "^1.4.2",
"ts-jest": "24.1.0",
"ts-jest": "26.4.1",
"ts-loader": "4.4.1",
"ts-node": "^10.5.0",
"tsconfig-paths": "^4.1.0",
"tslint": "^6.1.3",
"typescript": "4.8.2",
"webpack": "4.41.5",
"webpack-cli": "3.3.10"
"webpack": "^5.69.1",
"webpack-cli": "^4.9.2",
"webpack-livereload-plugin": "^3.0.2",
"webpack-remove-empty-scripts": "^1.0.1"
},
"engines": {
"node": ">=16"
},
"resolutions": {
"js-yaml": "^3.13.1",