Merge pull request #1 from didi/master

pull code
This commit is contained in:
ZQKC
2020-06-05 14:04:11 +08:00
committed by GitHub
12 changed files with 273 additions and 60 deletions

View File

@@ -80,7 +80,7 @@ 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) ![dingding_group](doc/assets/images/common/dingding_group.jpg)

View File

@@ -69,6 +69,12 @@
"scheduler": "^0.13.6" "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": { "@types/echarts": {
"version": "4.1.9", "version": "4.1.9",
"resolved": "https://registry.npm.taobao.org/@types/echarts/download/@types/echarts-4.1.9.tgz", "resolved": "https://registry.npm.taobao.org/@types/echarts/download/@types/echarts-4.1.9.tgz",
@@ -78,6 +84,23 @@
"@types/zrender": "*" "@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": { "@types/history": {
"version": "4.7.2", "version": "4.7.2",
"resolved": "http://registry.npm.taobao.org/@types/history/download/@types/history-4.7.2.tgz", "resolved": "http://registry.npm.taobao.org/@types/history/download/@types/history-4.7.2.tgz",
@@ -90,6 +113,18 @@
"integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=",
"dev": true "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": { "@types/prop-types": {
"version": "15.7.1", "version": "15.7.1",
"resolved": "http://registry.npm.taobao.org/@types/prop-types/download/@types/prop-types-15.7.1.tgz", "resolved": "http://registry.npm.taobao.org/@types/prop-types/download/@types/prop-types-15.7.1.tgz",
@@ -151,6 +186,76 @@
"@types/react": "*" "@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": { "@types/zrender": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/@types/zrender/download/@types/zrender-4.0.0.tgz", "resolved": "https://registry.npm.taobao.org/@types/zrender/download/@types/zrender-4.0.0.tgz",
@@ -646,7 +751,8 @@
"version": "1.0.0", "version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz", "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true "dev": true,
"optional": true
}, },
"assign-symbols": { "assign-symbols": {
"version": "1.0.0", "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": { "cliui": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "http://registry.npm.taobao.org/cliui/download/cliui-4.1.0.tgz", "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", "resolved": "http://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.7.tgz",
"integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=", "integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"delayed-stream": "~1.0.0" "delayed-stream": "~1.0.0"
} }
@@ -1656,6 +1790,58 @@
"gud": "^1.0.0" "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": { "cross-spawn": {
"version": "6.0.5", "version": "6.0.5",
"resolved": "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz", "resolved": "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz",
@@ -2036,7 +2222,8 @@
"version": "1.0.0", "version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz", "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true "dev": true,
"optional": true
}, },
"depd": { "depd": {
"version": "1.1.2", "version": "1.1.2",
@@ -2754,7 +2941,8 @@
"version": "1.3.0", "version": "1.3.0",
"resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz", "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"dev": true "dev": true,
"optional": true
}, },
"fast-deep-equal": { "fast-deep-equal": {
"version": "2.0.1", "version": "2.0.1",
@@ -3170,7 +3358,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@@ -3191,12 +3380,14 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@@ -3211,17 +3402,20 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@@ -3338,7 +3532,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@@ -3350,6 +3545,7 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@@ -3364,6 +3560,7 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@@ -3371,12 +3568,14 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@@ -3395,6 +3594,7 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@@ -3475,7 +3675,8 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@@ -3487,6 +3688,7 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@@ -3572,7 +3774,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@@ -3608,6 +3811,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@@ -3627,6 +3831,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@@ -3670,12 +3875,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },
@@ -4657,7 +4864,8 @@
"version": "0.1.1", "version": "0.1.1",
"resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz", "resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"dev": true "dev": true,
"optional": true
}, },
"json-parse-better-errors": { "json-parse-better-errors": {
"version": "1.0.2", "version": "1.0.2",
@@ -8675,7 +8883,8 @@
"version": "0.14.5", "version": "0.14.5",
"resolved": "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz", "resolved": "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"dev": true "dev": true,
"optional": true
}, },
"type-is": { "type-is": {
"version": "1.6.16", "version": "1.6.16",

View File

@@ -4,9 +4,9 @@
"description": "", "description": "",
"scripts": { "scripts": {
"start": "webpack-dev-server", "start": "webpack-dev-server",
"daily-build": "rm -rf dist && NODE_ENV=production webpack", "daily-build": "cross-env NODE_ENV=production webpack",
"pre-build": "rm -rf dist && NODE_ENV=production webpack", "pre-build": "cross-env NODE_ENV=production webpack",
"prod-build": "rm -rf dist && NODE_ENV=production webpack" "prod-build": "cross-env NODE_ENV=production webpack"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",
@@ -17,6 +17,8 @@
"@types/react-dom": "^16.8.2", "@types/react-dom": "^16.8.2",
"@types/react-router-dom": "^4.3.1", "@types/react-router-dom": "^4.3.1",
"antd": "^3.16.1", "antd": "^3.16.1",
"clean-webpack-plugin": "^3.0.0",
"cross-env": "^7.0.2",
"css-loader": "^2.1.0", "css-loader": "^2.1.0",
"echarts": "^4.2.1", "echarts": "^4.2.1",
"file-loader": "^5.0.2", "file-loader": "^5.0.2",

View File

@@ -49,14 +49,14 @@ export class SearchAndFilter extends React.Component<any, IState> {
} }
public handleVisble = (type: string) => { public handleVisble = (type: string) => {
if (this.timer) clearTimeout(this.timer); if (this.timer) window.clearTimeout(this.timer);
setTimeout(() => { window.setTimeout(() => {
this.setState({ [type]: true }); this.setState({ [type]: true });
}); });
} }
public handleUnVisble = (type: string) => { public handleUnVisble = (type: string) => {
this.timer = setTimeout(() => { this.timer = window.setTimeout(() => {
this.setState({ [type]: false }); this.setState({ [type]: false });
}, 100); }, 100);
} }

View File

@@ -19,7 +19,7 @@ class ResetOffset extends React.Component<any> {
consume.offsetPartition(Object.assign({ timestamp: +moment(timestamp).format('x') }, topic.currentGroup)) consume.offsetPartition(Object.assign({ timestamp: +moment(timestamp).format('x') }, topic.currentGroup))
.then(() => { .then(() => {
message.success('重置时间成功'); message.success('重置时间成功');
setTimeout(() => { window.setTimeout(() => {
location.reload(); location.reload();
}, 200); }, 200);
}); });
@@ -28,7 +28,7 @@ class ResetOffset extends React.Component<any> {
public submitPartiton = () => { public submitPartiton = () => {
consume.offsetPartition(topic.currentGroup, 1).then(() => { consume.offsetPartition(topic.currentGroup, 1).then(() => {
message.success('重置分区成功'); message.success('重置分区成功');
setTimeout(() => { window.setTimeout(() => {
location.reload(); location.reload();
}, 200); }, 200);
}); });

View File

@@ -28,7 +28,7 @@ class Task extends React.Component<any> {
values.partitionIdList = typeof partitionIdList === 'string' ? values.partitionIdList.split(',') : []; values.partitionIdList = typeof partitionIdList === 'string' ? values.partitionIdList.split(',') : [];
if (this.getDisabled()) { if (this.getDisabled()) {
const { taskId } = operation.taskDetail; const { taskId } = operation.taskDetail;
modifyTask({ throttle, taskId, action: 'modify' }).then(() => { modifyTask({ throttle: values.throttle, taskId, action: 'modify' }).then(() => {
notification.success({ message: '修改成功' }); notification.success({ message: '修改成功' });
operation.getTask(); operation.getTask();
modal.close(); modal.close();

View File

@@ -36,7 +36,7 @@ class Topic extends React.Component<any> {
this.setState({ loading: true }); this.setState({ loading: true });
createTopic(values).then(data => { createTopic(values).then(data => {
notification.success({ message: '申请Topic成功' }); notification.success({ message: '申请Topic成功' });
setTimeout(() => location.assign('/user/my_order'), 500); window.setTimeout(() => location.assign('/user/my_order'), 500);
modal.close(); modal.close();
}, (err) => { }, (err) => {
this.setState({ loading: false }); this.setState({ loading: false });

View File

@@ -111,7 +111,7 @@ class Cluster {
return getRebalanceStatus(clusterId).then((type) => { return getRebalanceStatus(clusterId).then((type) => {
this.setLeaderStatus(type); this.setLeaderStatus(type);
if (type === 'RUNNING') { if (type === 'RUNNING') {
setTimeout(() => { window.setTimeout(() => {
this.getRebalance(clusterId); this.getRebalance(clusterId);
}, 1000 * 2); }, 1000 * 2);
} }

View File

@@ -4,6 +4,7 @@ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const TerserJSPlugin = require('terser-webpack-plugin'); const TerserJSPlugin = require('terser-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const isProd = process.env.NODE_ENV === 'production'; const isProd = process.env.NODE_ENV === 'production';
const outPath = `${__dirname}/dist`; const outPath = `${__dirname}/dist`;
@@ -20,7 +21,7 @@ const plugins = [
if (isProd) { if (isProd) {
plugins.push(new MiniCssExtractPlugin({ plugins.push(new MiniCssExtractPlugin({
filename: `${filename}.css`, filename: `${filename}.css`,
})); }), new CleanWebpackPlugin());
} }
module.exports = { module.exports = {

View File

@@ -4,8 +4,8 @@ USE `kafka_manager`;
CREATE TABLE `account` ( CREATE TABLE `account` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`username` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名', `username` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(256) NOT NULL DEFAULT '' COMMENT '密码', `password` varchar(128) NOT NULL DEFAULT '' COMMENT '密码',
`role` int(16) NOT NULL DEFAULT '0' COMMENT '角色类型, 0:普通用户', `role` int(16) NOT NULL DEFAULT '0' COMMENT '角色类型, 0:普通用户',
`status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中-1标识已废弃', `status` int(16) NOT NULL DEFAULT '0' COMMENT '0标识使用中-1标识已废弃',
`gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
@@ -33,7 +33,7 @@ CREATE TABLE `alarm_rule` (
CREATE TABLE `broker` ( CREATE TABLE `broker` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `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', `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerID',
`host` varchar(128) NOT NULL DEFAULT '' COMMENT 'Broker主机名', `host` varchar(128) NOT NULL DEFAULT '' COMMENT 'Broker主机名',
`port` int(32) NOT NULL DEFAULT '-1' COMMENT 'Broker端口', `port` int(32) NOT NULL DEFAULT '-1' COMMENT 'Broker端口',
@@ -48,7 +48,7 @@ CREATE TABLE `broker` (
CREATE TABLE `broker_metrics` ( CREATE TABLE `broker_metrics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `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', `broker_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'BrokerID',
`bytes_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 '每秒字节流出', `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流出',
@@ -93,7 +93,7 @@ CREATE TABLE `cluster` (
CREATE TABLE `cluster_metrics` ( CREATE TABLE `cluster_metrics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `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数', `topic_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Topic数',
`partition_num` int(11) NOT NULL DEFAULT '0' COMMENT '分区数', `partition_num` int(11) NOT NULL DEFAULT '0' COMMENT '分区数',
`broker_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Broker数', `broker_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Broker数',
@@ -121,8 +121,8 @@ CREATE TABLE `controller` (
CREATE TABLE `migration_task` ( CREATE TABLE `migration_task` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`cluster_id` bigint(128) NOT NULL DEFAULT '0' COMMENT '集群ID', `cluster_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '集群ID',
`topic_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'Topic名称', `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称',
`reassignment_json` text COMMENT '任务参数', `reassignment_json` text COMMENT '任务参数',
`real_throttle` bigint(20) NOT NULL DEFAULT '0' COMMENT '实际限流值(B/s)', `real_throttle` bigint(20) NOT NULL DEFAULT '0' COMMENT '实际限流值(B/s)',
`operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人', `operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人',
@@ -135,8 +135,8 @@ CREATE TABLE `migration_task` (
CREATE TABLE `operation_history` ( CREATE TABLE `operation_history` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `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',
`topic_name` varchar(128) NOT NULL DEFAULT '' COMMENT 'Topic名称', `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称',
`operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人', `operator` varchar(128) NOT NULL DEFAULT '' COMMENT '操作人',
`operation` varchar(256) NOT NULL DEFAULT '' COMMENT '操作描述', `operation` varchar(256) NOT NULL DEFAULT '' COMMENT '操作描述',
`gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
@@ -147,8 +147,8 @@ CREATE TABLE `operation_history` (
CREATE TABLE `order_partition` ( CREATE TABLE `order_partition` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID',
`cluster_name` varchar(256) NOT NULL DEFAULT '' COMMENT '集群名称', `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称',
`topic_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'Topic名称', `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称',
`applicant` varchar(128) NOT NULL DEFAULT '' COMMENT '申请人', `applicant` varchar(128) NOT NULL DEFAULT '' COMMENT '申请人',
`peak_bytes_in` bigint(20) NOT NULL DEFAULT '0' COMMENT '峰值流量', `peak_bytes_in` bigint(20) NOT NULL DEFAULT '0' COMMENT '峰值流量',
`description` text COMMENT '备注信息', `description` text COMMENT '备注信息',
@@ -164,8 +164,8 @@ CREATE TABLE `order_partition` (
CREATE TABLE `order_topic` ( CREATE TABLE `order_topic` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID', `cluster_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT '集群ID',
`cluster_name` varchar(256) NOT NULL DEFAULT '' COMMENT '集群名称', `cluster_name` varchar(128) NOT NULL DEFAULT '' COMMENT '集群名称',
`topic_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'Topic名称', `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称',
`retention_time` bigint(20) NOT NULL DEFAULT '-1' COMMENT '保留时间(ms)', `retention_time` bigint(20) NOT NULL DEFAULT '-1' COMMENT '保留时间(ms)',
`partition_num` int(16) NOT NULL DEFAULT '-1' COMMENT '分区数', `partition_num` int(16) NOT NULL DEFAULT '-1' COMMENT '分区数',
`replica_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` ( CREATE TABLE `region` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`cluster_id` bigint(20) NOT NULL DEFAULT '-1' 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列表', `broker_list` varchar(256) NOT NULL DEFAULT '' COMMENT 'Broker列表',
`level` int(16) NOT NULL DEFAULT '0' COMMENT 'Region重要等级, 0级普通, 1极重要2级极重要', `level` int(16) NOT NULL DEFAULT '0' COMMENT 'Region重要等级, 0级普通, 1极重要2级极重要',
`operator` varchar(45) NOT NULL DEFAULT '' COMMENT '操作人', `operator` varchar(45) NOT NULL DEFAULT '' COMMENT '操作人',
@@ -201,8 +201,8 @@ CREATE TABLE `region` (
CREATE TABLE `topic` ( CREATE TABLE `topic` (
`id` bigint(128) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `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',
`topic_name` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Topic名称', `topic_name` varchar(192) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Topic名称',
`applicant` varchar(256) NOT NULL DEFAULT '' COMMENT '申请人', `applicant` varchar(256) NOT NULL DEFAULT '' COMMENT '申请人',
`principals` varchar(256) NOT NULL DEFAULT '' COMMENT '负责人', `principals` varchar(256) NOT NULL DEFAULT '' COMMENT '负责人',
`description` text COMMENT '备注信息', `description` text COMMENT '备注信息',
@@ -216,9 +216,9 @@ CREATE TABLE `topic` (
CREATE TABLE `topic_favorite` ( CREATE TABLE `topic_favorite` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `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', `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表示删除', `status` int(16) NOT NULL DEFAULT '0' COMMENT '删除标记, 0表示未删除, -1表示删除',
`gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modify` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 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` ( CREATE TABLE `topic_metrics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `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',
`topic_name` varchar(256) NOT NULL DEFAULT '' COMMENT 'Topic名称', `topic_name` varchar(192) NOT NULL DEFAULT '' COMMENT 'Topic名称',
`messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒进入消息条数', `messages_in` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒进入消息条数',
`bytes_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 '每秒字节流出', `bytes_out` double(53,2) NOT NULL DEFAULT '0.00' COMMENT '每秒字节流出',

View File

@@ -12,7 +12,6 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version> <version>2.1.1.RELEASE</version>
<relativePath/>
</parent> </parent>
<properties> <properties>

View File

@@ -11,7 +11,6 @@
<artifactId>kafka-manager</artifactId> <artifactId>kafka-manager</artifactId>
<groupId>com.xiaojukeji.kafka</groupId> <groupId>com.xiaojukeji.kafka</groupId>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<relativePath />
</parent> </parent>
<properties> <properties>