diff --git a/ui/.eslintignore b/ui/.eslintignore new file mode 100644 index 0000000000..689d2e93d0 --- /dev/null +++ b/ui/.eslintignore @@ -0,0 +1 @@ +src/utils/dashboard_client diff --git a/ui/.github_release_version b/ui/.github_release_version index db764e0a71..dd65f8fc8d 100644 --- a/ui/.github_release_version +++ b/ui/.github_release_version @@ -1,3 +1,3 @@ # This file contains a version number which will be used to release assets to # GitHub. To trigger a new asset release, simply increase this version number. -20200108_2 +20200109_1 diff --git a/ui/config-overrides.js b/ui/config-overrides.js index f22658c86a..fed220edc1 100644 --- a/ui/config-overrides.js +++ b/ui/config-overrides.js @@ -1,6 +1,15 @@ -const { override, fixBabelImports, addLessLoader, addWebpackPlugin } = require('customize-cra'); +const path = require('path'); +const { override, fixBabelImports, addLessLoader, addWebpackResolve, addWebpackPlugin } = require('customize-cra'); const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin'); +const enableEslintIgnore = () => config => { + const eslintRule = config.module.rules.filter( + r => r.use && r.use.some(u => u.options && u.options.useEslintrc !== void 0) + )[0]; + eslintRule.use[0].options.ignore = true; + return config; +} + module.exports = override( fixBabelImports('import', { libraryName: 'antd', @@ -9,7 +18,15 @@ module.exports = override( }), addLessLoader({ javascriptEnabled: true, - modifyVars: { '@primary-color': '#3351ff' }, + modifyVars: { + '@primary-color': '#3351ff', + '@body-background': '#f0f2f5', + }, + localIdentName: '[local]--[hash:base64:5]', }), addWebpackPlugin(new AntdDayjsWebpackPlugin()), + addWebpackResolve({ + alias: { '@': path.resolve(__dirname, 'src') }, + }), + enableEslintIgnore(), ); diff --git a/ui/package.json b/ui/package.json index 580e22a745..4da48f9dd9 100644 --- a/ui/package.json +++ b/ui/package.json @@ -3,22 +3,14 @@ "version": "0.1.0", "private": true, "dependencies": { - "@testing-library/jest-dom": "^4.2.4", - "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@pingcap-incubator/pd-client-js": "^0.1.5", "antd": "^3.26.5", - "antd-dayjs-webpack-plugin": "^0.0.7", "axios": "^0.19.0", - "babel-plugin-import": "^1.13.0", - "customize-cra": "^0.9.1", - "less": "^3.10.3", - "less-loader": "^5.0.0", "react": "^16.12.0", - "react-app-rewired": "^2.1.5", "react-dom": "^16.12.0", - "react-scripts": "3.3.0", - "typescript": "^3.7.4", - "@pingcap-incubator/pd-client-js": "^0.1.5" + "react-router-dom": "^5.1.2", + "single-spa": "^4.4.2", + "single-spa-react": "^2.11.0" }, "scripts": { "start": "react-app-rewired start", @@ -44,6 +36,15 @@ ] }, "devDependencies": { - "@openapitools/openapi-generator-cli": "^1.0.8-4.2.2" + "@openapitools/openapi-generator-cli": "^1.0.8-4.2.2", + "@types/react-router-dom": "^5.1.3", + "antd-dayjs-webpack-plugin": "^0.0.8", + "babel-plugin-import": "^1.13.0", + "customize-cra": "^0.9.1", + "less": "^3.10.3", + "less-loader": "^5.0.0", + "react-app-rewired": "^2.1.5", + "react-scripts": "3.1.x", + "typescript": "^3.7.4" } } diff --git a/ui/public/index.html b/ui/public/index.html index ffbcf80d48..c201ebfbe6 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -4,25 +4,13 @@ - - + +