diff --git a/README.md b/README.md index 5f29e567..0f3cd6ea 100644 --- a/README.md +++ b/README.md @@ -28,15 +28,15 @@ - 管理员用户与普通用户视角区分; - 管理员用户与普通用户权限区分; - + --- ## kafka-manager架构图 ![kafka-manager-arch](doc/assets/images/common/arch.png) - ---- + +--- ## 安装手册 @@ -59,19 +59,19 @@ mysql -uXXXX -pXXX -h XXX.XXX.XXX.XXX -PXXXX < ./create_mysql_table.sql ``` --- - + ### 打包 -执行`mvn install`命令即可。 - +执行`mvn install`命令即可。 + 备注:每一次执行`mvn install`命令,都将在`web/src/main/resources/templates`下面生成最新的前端资源文件,如果`console`模块下的代码没有变更,可以修改`./pom.xml`文件,忽略对`console`模块的打包。 --- ### 启动 -``` +``` ############# application.yml 是配置文件 cp web/src/main/resources/application.yml web/target/ cd web/target/ @@ -80,10 +80,10 @@ nohup java -jar kafka-manager-web-1.0.0-SNAPSHOT.jar --spring.config.location=./ ### 使用 -本地启动的话,访问`http://localhost:8080`,输入帐号及密码进行登录。更多参考:[kafka-manager使用手册](./user_cn_guide.md) +本地启动的话,访问`http://localhost:8080`,输入帐号及密码进行登录。更多参考:[kafka-manager使用手册](doc/user_cn_guide.md) - ---- + +--- ## 相关文档 @@ -92,6 +92,9 @@ nohup java -jar kafka-manager-web-1.0.0-SNAPSHOT.jar --spring.config.location=./ ## 钉钉交流群 +搜索群号:`32821440` 或者扫码可入群交流. 备注:在钉钉搜索框搜索`32821440`,然后搜索结果中点击 "网络查找手机/邮箱/钉钉号" 即可看到我们的钉钉群:滴滴KafkaManager开源用户群。 + + ![dingding_group](doc/assets/images/common/dingding_group.jpg) diff --git a/console/package-lock.json b/console/package-lock.json index 20a35d6c..1e6cc369 100644 --- a/console/package-lock.json +++ b/console/package-lock.json @@ -69,6 +69,12 @@ "scheduler": "^0.13.6" } }, + "@types/anymatch": { + "version": "1.3.1", + "resolved": "https://registry.npm.taobao.org/@types/anymatch/download/@types/anymatch-1.3.1.tgz?cache=0&sync_timestamp=1580841236934&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fanymatch%2Fdownload%2F%40types%2Fanymatch-1.3.1.tgz", + "integrity": "sha1-M2utwb7sudrMOL6izzKt9ieoQho=", + "dev": true + }, "@types/echarts": { "version": "4.1.9", "resolved": "https://registry.npm.taobao.org/@types/echarts/download/@types/echarts-4.1.9.tgz", @@ -78,6 +84,23 @@ "@types/zrender": "*" } }, + "@types/events": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/@types/events/download/@types/events-3.0.0.tgz?cache=0&sync_timestamp=1580841806837&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fevents%2Fdownload%2F%40types%2Fevents-3.0.0.tgz", + "integrity": "sha1-KGLz9Yqaf3w+eNefEw3U1xwlwqc=", + "dev": true + }, + "@types/glob": { + "version": "7.1.1", + "resolved": "https://registry.npm.taobao.org/@types/glob/download/@types/glob-7.1.1.tgz", + "integrity": "sha1-qlmhxuP7xCHgfM0xqUTDDrpSFXU=", + "dev": true, + "requires": { + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" + } + }, "@types/history": { "version": "4.7.2", "resolved": "http://registry.npm.taobao.org/@types/history/download/@types/history-4.7.2.tgz", @@ -90,6 +113,18 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npm.taobao.org/@types/minimatch/download/@types/minimatch-3.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fminimatch%2Fdownload%2F%40types%2Fminimatch-3.0.3.tgz", + "integrity": "sha1-PcoOPzOyAPx9ETnAzZbBJoyt/Z0=", + "dev": true + }, + "@types/node": { + "version": "13.9.8", + "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-13.9.8.tgz", + "integrity": "sha1-CZdkIPyAp6AL9AaAxjgV7Yx2FvQ=", + "dev": true + }, "@types/prop-types": { "version": "15.7.1", "resolved": "http://registry.npm.taobao.org/@types/prop-types/download/@types/prop-types-15.7.1.tgz", @@ -151,6 +186,76 @@ "@types/react": "*" } }, + "@types/source-list-map": { + "version": "0.1.2", + "resolved": "https://registry.npm.taobao.org/@types/source-list-map/download/@types/source-list-map-0.1.2.tgz", + "integrity": "sha1-AHiDYGP/rxdBI0m7o2QIfgrALsk=", + "dev": true + }, + "@types/tapable": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/@types/tapable/download/@types/tapable-1.0.5.tgz?cache=0&sync_timestamp=1580844951142&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Ftapable%2Fdownload%2F%40types%2Ftapable-1.0.5.tgz", + "integrity": "sha1-mtvBKVBYKqZerXa//fOf4MJ6PAI=", + "dev": true + }, + "@types/uglify-js": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/@types/uglify-js/download/@types/uglify-js-3.0.4.tgz", + "integrity": "sha1-lr6uI99vVhhiqDC0KIpJ6GuqwII=", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "@types/webpack": { + "version": "4.41.10", + "resolved": "https://registry.npm.taobao.org/@types/webpack/download/@types/webpack-4.41.10.tgz", + "integrity": "sha1-Lh9rNQiiSYVO/j3MdpCQWsXuEL4=", + "dev": true, + "requires": { + "@types/anymatch": "*", + "@types/node": "*", + "@types/tapable": "*", + "@types/uglify-js": "*", + "@types/webpack-sources": "*", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "@types/webpack-sources": { + "version": "0.1.7", + "resolved": "https://registry.npm.taobao.org/@types/webpack-sources/download/@types/webpack-sources-0.1.7.tgz?cache=0&sync_timestamp=1584978716401&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fwebpack-sources%2Fdownload%2F%40types%2Fwebpack-sources-0.1.7.tgz", + "integrity": "sha1-CjMKlFYRNBDHSl1kGArwy8oAcUE=", + "dev": true, + "requires": { + "@types/node": "*", + "@types/source-list-map": "*", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, "@types/zrender": { "version": "4.0.0", "resolved": "https://registry.npm.taobao.org/@types/zrender/download/@types/zrender-4.0.0.tgz", @@ -646,7 +751,8 @@ "version": "1.0.0", "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "dev": true, + "optional": true }, "assign-symbols": { "version": "1.0.0", @@ -1271,6 +1377,33 @@ } } }, + "clean-webpack-plugin": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/clean-webpack-plugin/download/clean-webpack-plugin-3.0.0.tgz", + "integrity": "sha1-qZ2Ow0wcYopFQVZ6p7RXRGRgxis=", + "dev": true, + "requires": { + "@types/webpack": "^4.4.31", + "del": "^4.1.1" + }, + "dependencies": { + "del": { + "version": "4.1.1", + "resolved": "https://registry.npm.taobao.org/del/download/del-4.1.1.tgz", + "integrity": "sha1-no8RciLqRKMf86FWwEm5kFKp8LQ=", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "globby": "^6.1.0", + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + } + } + } + }, "cliui": { "version": "4.1.0", "resolved": "http://registry.npm.taobao.org/cliui/download/cliui-4.1.0.tgz", @@ -1372,6 +1505,7 @@ "resolved": "http://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.7.tgz", "integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=", "dev": true, + "optional": true, "requires": { "delayed-stream": "~1.0.0" } @@ -1656,6 +1790,58 @@ "gud": "^1.0.0" } }, + "cross-env": { + "version": "7.0.2", + "resolved": "https://registry.npm.taobao.org/cross-env/download/cross-env-7.0.2.tgz?cache=0&sync_timestamp=1583443602692&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-env%2Fdownload%2Fcross-env-7.0.2.tgz", + "integrity": "sha1-vV7TEzmpOjQYrE88qco0Awgq5fk=", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.1.tgz", + "integrity": "sha1-CrVihuD3wk4VPQTMKqAn5DqaXRQ=", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz", + "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz?cache=0&sync_timestamp=1567781622888&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fshebang-command%2Fdownload%2Fshebang-command-2.0.0.tgz", + "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz", + "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-2.0.2.tgz", + "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz", @@ -2036,7 +2222,8 @@ "version": "1.0.0", "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "dev": true, + "optional": true }, "depd": { "version": "1.1.2", @@ -2754,7 +2941,8 @@ "version": "1.3.0", "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true + "dev": true, + "optional": true }, "fast-deep-equal": { "version": "2.0.1", @@ -3170,7 +3358,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3191,12 +3380,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3211,17 +3402,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3338,7 +3532,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3350,6 +3545,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3364,6 +3560,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3371,12 +3568,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3395,6 +3594,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3475,7 +3675,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3487,6 +3688,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3572,7 +3774,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -3608,6 +3811,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3627,6 +3831,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3670,12 +3875,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -4657,7 +4864,8 @@ "version": "0.1.1", "resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true + "dev": true, + "optional": true }, "json-parse-better-errors": { "version": "1.0.2", @@ -8675,7 +8883,8 @@ "version": "0.14.5", "resolved": "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true + "dev": true, + "optional": true }, "type-is": { "version": "1.6.16", diff --git a/console/package.json b/console/package.json index 447444c4..121533c0 100644 --- a/console/package.json +++ b/console/package.json @@ -4,9 +4,9 @@ "description": "", "scripts": { "start": "webpack-dev-server", - "daily-build": "rm -rf dist && NODE_ENV=production webpack", - "pre-build": "rm -rf dist && NODE_ENV=production webpack", - "prod-build": "rm -rf dist && NODE_ENV=production webpack" + "daily-build": "cross-env NODE_ENV=production webpack", + "pre-build": "cross-env NODE_ENV=production webpack", + "prod-build": "cross-env NODE_ENV=production webpack" }, "author": "", "license": "ISC", @@ -17,6 +17,8 @@ "@types/react-dom": "^16.8.2", "@types/react-router-dom": "^4.3.1", "antd": "^3.16.1", + "clean-webpack-plugin": "^3.0.0", + "cross-env": "^7.0.2", "css-loader": "^2.1.0", "echarts": "^4.2.1", "file-loader": "^5.0.2", diff --git a/console/src/container/cluster-topic/index.tsx b/console/src/container/cluster-topic/index.tsx index 89859310..cde5193b 100644 --- a/console/src/container/cluster-topic/index.tsx +++ b/console/src/container/cluster-topic/index.tsx @@ -49,14 +49,14 @@ export class SearchAndFilter extends React.Component { } public handleVisble = (type: string) => { - if (this.timer) clearTimeout(this.timer); - setTimeout(() => { + if (this.timer) window.clearTimeout(this.timer); + window.setTimeout(() => { this.setState({ [type]: true }); }); } public handleUnVisble = (type: string) => { - this.timer = setTimeout(() => { + this.timer = window.setTimeout(() => { this.setState({ [type]: false }); }, 100); } diff --git a/console/src/container/drawer/reset-offset.tsx b/console/src/container/drawer/reset-offset.tsx index dafeaac1..f9690045 100644 --- a/console/src/container/drawer/reset-offset.tsx +++ b/console/src/container/drawer/reset-offset.tsx @@ -19,7 +19,7 @@ class ResetOffset extends React.Component { consume.offsetPartition(Object.assign({ timestamp: +moment(timestamp).format('x') }, topic.currentGroup)) .then(() => { message.success('重置时间成功'); - setTimeout(() => { + window.setTimeout(() => { location.reload(); }, 200); }); @@ -28,7 +28,7 @@ class ResetOffset extends React.Component { public submitPartiton = () => { consume.offsetPartition(topic.currentGroup, 1).then(() => { message.success('重置分区成功'); - setTimeout(() => { + window.setTimeout(() => { location.reload(); }, 200); }); diff --git a/console/src/container/modal/task-new.tsx b/console/src/container/modal/task-new.tsx index aa4a55fb..91ec125a 100644 --- a/console/src/container/modal/task-new.tsx +++ b/console/src/container/modal/task-new.tsx @@ -28,7 +28,7 @@ class Task extends React.Component { values.partitionIdList = typeof partitionIdList === 'string' ? values.partitionIdList.split(',') : []; if (this.getDisabled()) { const { taskId } = operation.taskDetail; - modifyTask({ throttle, taskId, action: 'modify' }).then(() => { + modifyTask({ throttle: values.throttle, taskId, action: 'modify' }).then(() => { notification.success({ message: '修改成功' }); operation.getTask(); modal.close(); diff --git a/console/src/container/modal/topic-new.tsx b/console/src/container/modal/topic-new.tsx index 27ccdf74..813d5040 100644 --- a/console/src/container/modal/topic-new.tsx +++ b/console/src/container/modal/topic-new.tsx @@ -36,7 +36,7 @@ class Topic extends React.Component { this.setState({ loading: true }); createTopic(values).then(data => { notification.success({ message: '申请Topic成功' }); - setTimeout(() => location.assign('/user/my_order'), 500); + window.setTimeout(() => location.assign('/user/my_order'), 500); modal.close(); }, (err) => { this.setState({ loading: false }); diff --git a/console/src/store/cluster.ts b/console/src/store/cluster.ts index 39777fbc..34e957bd 100644 --- a/console/src/store/cluster.ts +++ b/console/src/store/cluster.ts @@ -111,7 +111,7 @@ class Cluster { return getRebalanceStatus(clusterId).then((type) => { this.setLeaderStatus(type); if (type === 'RUNNING') { - setTimeout(() => { + window.setTimeout(() => { this.getRebalance(clusterId); }, 1000 * 2); } diff --git a/console/webpack.config.js b/console/webpack.config.js index 96c00d9c..a9bf7274 100644 --- a/console/webpack.config.js +++ b/console/webpack.config.js @@ -4,6 +4,7 @@ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const TerserJSPlugin = require('terser-webpack-plugin'); +const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const isProd = process.env.NODE_ENV === 'production'; const outPath = `${__dirname}/dist`; @@ -20,7 +21,7 @@ const plugins = [ if (isProd) { plugins.push(new MiniCssExtractPlugin({ filename: `${filename}.css`, - })); + }), new CleanWebpackPlugin()); } module.exports = { diff --git a/doc/create_mysql_table.sql b/doc/create_mysql_table.sql index e39dc7eb..8f0a3861 100644 --- a/doc/create_mysql_table.sql +++ b/doc/create_mysql_table.sql @@ -4,8 +4,8 @@ USE `kafka_manager`; CREATE TABLE `account` ( `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', - `username` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名', - `password` varchar(256) NOT NULL DEFAULT '' COMMENT '密码', + `username` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名', + `password` varchar(128) NOT NULL DEFAULT '' COMMENT '密码', `role` int(16) NOT NULL DEFAULT '0' COMMENT '角色类型, 0:普通用户', `status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中,-1标识已废弃', `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', @@ -33,7 +33,7 @@ CREATE TABLE `alarm_rule` ( CREATE TABLE `broker` ( `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(128) NOT NULL DEFAULT '-1' COMMENT '集群ID', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerID', `host` varchar(128) NOT NULL DEFAULT '' COMMENT 'Broker主机名', `port` int(32) NOT NULL DEFAULT '-1' COMMENT 'Broker端口', @@ -48,7 +48,7 @@ CREATE TABLE `broker` ( CREATE TABLE `broker_metrics` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(11) NOT NULL DEFAULT '-1' COMMENT '集群ID', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerID', `bytes_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流入', `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流出', @@ -93,7 +93,7 @@ CREATE TABLE `cluster` ( CREATE TABLE `cluster_metrics` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(11) NOT NULL DEFAULT '0' COMMENT '集群ID', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群ID', `topic_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Topic数', `partition_num` int(11) NOT NULL DEFAULT '0' COMMENT '分区数', `broker_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Broker数', @@ -121,8 +121,8 @@ CREATE TABLE `controller` ( CREATE TABLE `migration_task` ( `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(128) NOT NULL DEFAULT '0' COMMENT '集群ID', - `topic_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'Topic名称', + `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群ID', + `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', `reassignment_json` text COMMENT '任务参数', `real_throttle` bigint(20) NOT NULL DEFAULT '0' COMMENT '实际限流值(B/s)', `operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人', @@ -135,8 +135,8 @@ CREATE TABLE `migration_task` ( CREATE TABLE `operation_history` ( `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', - `cluster_id` bigint(128) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(128) NOT NULL DEFAULT '' COMMENT 'Topic名称', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', + `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', `operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人', `operation` varchar(256) NOT NULL DEFAULT '' COMMENT '操作描述', `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', @@ -147,8 +147,8 @@ CREATE TABLE `operation_history` ( CREATE TABLE `order_partition` ( `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `cluster_name` varchar(256) NOT NULL DEFAULT '' COMMENT '集群名称', - `topic_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'Topic名称', + `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称', + `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', `applicant` varchar(128) NOT NULL DEFAULT '' COMMENT '申请人', `peak_bytes_in` bigint(20) NOT NULL DEFAULT '0' COMMENT '峰值流量', `description` text COMMENT '备注信息', @@ -164,8 +164,8 @@ CREATE TABLE `order_partition` ( CREATE TABLE `order_topic` ( `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `cluster_name` varchar(256) NOT NULL DEFAULT '' COMMENT '集群名称', - `topic_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'Topic名称', + `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称', + `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', `retention_time` bigint(20) NOT NULL DEFAULT '-1' COMMENT '保留时间(ms)', `partition_num` int(16) NOT NULL DEFAULT '-1' COMMENT '分区数', `replica_num` int(16) NOT NULL DEFAULT '-1' COMMENT '副本数', @@ -187,7 +187,7 @@ CREATE TABLE `order_topic` ( CREATE TABLE `region` ( `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `region_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'Region名称', + `region_name` varchar(128) NOT NULL DEFAULT '' COMMENT 'Region名称', `broker_list` varchar(256) NOT NULL DEFAULT '' COMMENT 'Broker列表', `level` int(16) NOT NULL DEFAULT '0' COMMENT 'Region重要等级, 0级普通, 1极重要,2级极重要', `operator` varchar(45) NOT NULL DEFAULT '' COMMENT '操作人', @@ -201,8 +201,8 @@ CREATE TABLE `region` ( CREATE TABLE `topic` ( `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', - `cluster_id` bigint(128) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Topic名称', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', + `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Topic名称', `applicant` varchar(256) NOT NULL DEFAULT '' COMMENT '申请人', `principals` varchar(256) NOT NULL DEFAULT '' COMMENT '负责人', `description` text COMMENT '备注信息', @@ -216,9 +216,9 @@ CREATE TABLE `topic` ( CREATE TABLE `topic_favorite` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', - `username` varchar(128) NOT NULL DEFAULT '' COMMENT '用户名', + `username` varchar(64) NOT NULL DEFAULT '' COMMENT '用户名', `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(512) NOT NULL DEFAULT '' COMMENT 'Topic名称', + `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', `status` int(16) NOT NULL DEFAULT '0' COMMENT '删除标记, 0表示未删除, -1表示删除', `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', @@ -228,8 +228,8 @@ CREATE TABLE `topic_favorite` ( CREATE TABLE `topic_metrics` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', - `cluster_id` bigint(11) NOT NULL DEFAULT '-1' COMMENT '集群ID', - `topic_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'Topic名称', + `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', + `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称', `messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒进入消息条数', `bytes_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流入', `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流出', diff --git a/pom.xml b/pom.xml index 9fe35d43..fa81479b 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,6 @@ org.springframework.boot spring-boot-starter-parent 2.1.1.RELEASE - diff --git a/web/pom.xml b/web/pom.xml index 3ad68e73..8865e641 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -11,7 +11,6 @@ kafka-manager com.xiaojukeji.kafka 1.0.0-SNAPSHOT -