Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
kafka-manager
提交
373772de
K
kafka-manager
项目概览
DiDi
/
kafka-manager
8 个月 前同步成功
通知
58
Star
6372
Fork
1229
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kafka-manager
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
373772de
编写于
11月 08, 2020
作者:
Z
ZQKC
提交者:
GitHub
11月 08, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #79 from didi/dev
文案优化|服务发现接口修复
上级
883b6945
7f5bbe8b
变更
29
隐藏空白更改
内联
并排
Showing
29 changed file
with
97 addition
and
74 deletion
+97
-74
kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/HttpUtils.java
.../com/xiaojukeji/kafka/manager/common/utils/HttpUtils.java
+1
-1
kafka-manager-console/src/container/admin/cluster-list/index.tsx
...anager-console/src/container/admin/cluster-list/index.tsx
+5
-5
kafka-manager-console/src/container/admin/config.tsx
kafka-manager-console/src/container/admin/config.tsx
+3
-3
kafka-manager-console/src/container/admin/operation-management/config.tsx
...nsole/src/container/admin/operation-management/config.tsx
+1
-1
kafka-manager-console/src/container/admin/operation-management/migration-detail.tsx
...container/admin/operation-management/migration-detail.tsx
+1
-1
kafka-manager-console/src/container/alarm/add-alarm/alarm-select.tsx
...er-console/src/container/alarm/add-alarm/alarm-select.tsx
+1
-1
kafka-manager-console/src/container/alarm/add-alarm/config.tsx
...-manager-console/src/container/alarm/add-alarm/config.tsx
+5
-5
kafka-manager-console/src/container/alarm/add-alarm/index.tsx
...a-manager-console/src/container/alarm/add-alarm/index.tsx
+1
-1
kafka-manager-console/src/container/alarm/alarm-detail/shield-history.tsx
...nsole/src/container/alarm/alarm-detail/shield-history.tsx
+5
-5
kafka-manager-console/src/container/alarm/alarm-list.tsx
kafka-manager-console/src/container/alarm/alarm-list.tsx
+2
-2
kafka-manager-console/src/container/app/app-list.tsx
kafka-manager-console/src/container/app/app-list.tsx
+1
-1
kafka-manager-console/src/container/modal/admin/cluster.ts
kafka-manager-console/src/container/modal/admin/cluster.ts
+2
-1
kafka-manager-console/src/container/modal/admin/migration.ts
kafka-manager-console/src/container/modal/admin/migration.ts
+1
-1
kafka-manager-console/src/container/modal/admin/user.ts
kafka-manager-console/src/container/modal/admin/user.ts
+1
-1
kafka-manager-console/src/container/modal/admin/version.ts
kafka-manager-console/src/container/modal/admin/version.ts
+3
-3
kafka-manager-console/src/container/modal/alarm.tsx
kafka-manager-console/src/container/modal/alarm.tsx
+2
-2
kafka-manager-console/src/container/modal/app.tsx
kafka-manager-console/src/container/modal/app.tsx
+1
-1
kafka-manager-core/pom.xml
kafka-manager-core/pom.xml
+1
-1
kafka-manager-dao/pom.xml
kafka-manager-dao/pom.xml
+1
-1
kafka-manager-extends/kafka-manager-account/pom.xml
kafka-manager-extends/kafka-manager-account/pom.xml
+3
-3
kafka-manager-extends/kafka-manager-bpm/pom.xml
kafka-manager-extends/kafka-manager-bpm/pom.xml
+4
-4
kafka-manager-extends/kafka-manager-kcm/pom.xml
kafka-manager-extends/kafka-manager-kcm/pom.xml
+2
-2
kafka-manager-extends/kafka-manager-monitor/pom.xml
kafka-manager-extends/kafka-manager-monitor/pom.xml
+1
-1
kafka-manager-extends/kafka-manager-openapi/pom.xml
kafka-manager-extends/kafka-manager-openapi/pom.xml
+2
-2
kafka-manager-task/pom.xml
kafka-manager-task/pom.xml
+3
-3
kafka-manager-web/pom.xml
kafka-manager-web/pom.xml
+5
-4
kafka-manager-web/src/main/java/com/xiaojukeji/kafka/manager/web/api/versionone/gateway/GatewayServiceDiscoveryController.java
...versionone/gateway/GatewayServiceDiscoveryController.java
+18
-4
kafka-manager-web/src/main/java/com/xiaojukeji/kafka/manager/web/api/versionone/thirdpart/ThirdPartConsumeController.java
.../api/versionone/thirdpart/ThirdPartConsumeController.java
+17
-11
pom.xml
pom.xml
+4
-3
未找到文件。
kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/utils/HttpUtils.java
浏览文件 @
373772de
...
...
@@ -30,7 +30,7 @@ public class HttpUtils {
private
static
int
CONNECT_TIME_OUT
=
15000
;
// 读取超时时间, 单位: ms
private
static
int
READ_TIME_OUT
=
2
000
;
private
static
int
READ_TIME_OUT
=
3
000
;
private
static
final
String
METHOD_GET
=
"GET"
;
private
static
final
String
METHOD_POST
=
"POST"
;
...
...
kafka-manager-console/src/container/admin/cluster-list/index.tsx
浏览文件 @
373772de
...
...
@@ -134,19 +134,19 @@ export class ClusterList extends SearchAndFilterContainer {
formData
:
item
?
item
:
{},
visible
:
true
,
width
:
590
,
title
:
'
注册
集群
'
,
title
:
item
?
'
编辑
'
:
'
接入
集群
'
,
onSubmit
:
(
value
:
IRegister
)
=>
{
value
.
idc
=
region
.
currentRegion
;
if
(
item
)
{
value
.
clusterId
=
item
.
clusterId
;
registerCluster
(
value
).
then
(
data
=>
{
admin
.
getMetaData
(
true
);
notification
.
success
({
message
:
'
修改
集群成功
'
});
notification
.
success
({
message
:
'
编辑
集群成功
'
});
});
}
else
{
createCluster
(
value
).
then
(
data
=>
{
admin
.
getMetaData
(
true
);
notification
.
success
({
message
:
'
注册
集群成功
'
});
notification
.
success
({
message
:
'
接入
集群成功
'
});
});
}
...
...
@@ -256,7 +256,7 @@ export class ClusterList extends SearchAndFilterContainer {
<
a
onClick
=
{
this
.
createOrRegisterCluster
.
bind
(
this
,
item
)
}
className
=
"action-button"
>
修改
>
编辑
</
a
>
<
Popconfirm
title
=
{
`确定
${
item
.
status
===
1
?
'
暂停
'
:
'
开始
'
}${
item
.
clusterName
}
监控?`
}
...
...
@@ -286,7 +286,7 @@ export class ClusterList extends SearchAndFilterContainer {
<
ul
>
{
this
.
renderSearch
(
''
,
'
请输入集群名称
'
)
}
<
li
className
=
"right-btn-1"
>
<
Button
type
=
"primary"
onClick
=
{
this
.
createOrRegisterCluster
.
bind
(
this
,
null
)
}
>
注册
集群
</
Button
>
<
Button
type
=
"primary"
onClick
=
{
this
.
createOrRegisterCluster
.
bind
(
this
,
null
)
}
>
接入
集群
</
Button
>
</
li
>
</
ul
>
</
div
>
...
...
kafka-manager-console/src/container/admin/config.tsx
浏览文件 @
373772de
...
...
@@ -26,7 +26,7 @@ export const getUserColumns = () => {
render
:
(
text
:
string
,
record
:
IUser
)
=>
{
return
(
<
span
className
=
"table-operation"
>
<
a
onClick
=
{
()
=>
showApplyModal
(
record
)
}
>
修改
</
a
>
<
a
onClick
=
{
()
=>
showApplyModal
(
record
)
}
>
编辑
</
a
>
<
Popconfirm
title
=
"确定删除?"
onConfirm
=
{
()
=>
users
.
deleteUser
(
record
.
username
)
}
...
...
@@ -105,7 +105,7 @@ export const getVersionColumns = () => {
render
:
(
text
:
string
,
record
:
IUploadFile
)
=>
{
return
(
<
span
className
=
"table-operation"
>
<
a
onClick
=
{
()
=>
showModifyModal
(
record
)
}
>
修改
</
a
>
<
a
onClick
=
{
()
=>
showModifyModal
(
record
)
}
>
编辑
</
a
>
<
Popconfirm
title
=
"确定删除?"
onConfirm
=
{
()
=>
version
.
deleteFile
(
record
.
id
)
}
...
...
@@ -164,7 +164,7 @@ export const getConfigureColumns = () => {
render
:
(
text
:
string
,
record
:
IConfigure
)
=>
{
return
(
<
span
className
=
"table-operation"
>
<
a
onClick
=
{
()
=>
showConfigureModal
(
record
)
}
>
修改
</
a
>
<
a
onClick
=
{
()
=>
showConfigureModal
(
record
)
}
>
编辑
</
a
>
<
Popconfirm
title
=
"确定删除?"
onConfirm
=
{
()
=>
admin
.
deleteConfigure
(
record
.
configKey
)
}
...
...
kafka-manager-console/src/container/admin/operation-management/config.tsx
浏览文件 @
373772de
...
...
@@ -45,7 +45,7 @@ export const migrationTaskColumns = (migrationUrl: string) => {
<
a
style
=
{
{
marginRight
:
16
}
}
>
开始
</
a
>
</
Popconfirm
>
}
{
[
0
,
1
].
indexOf
(
item
.
status
)
>
-
1
&&
<
a
onClick
=
{
()
=>
modifyMigrationTask
(
item
,
'
modify
'
)
}
style
=
{
{
marginRight
:
16
}
}
>
修改
</
a
>
}
<
a
onClick
=
{
()
=>
modifyMigrationTask
(
item
,
'
modify
'
)
}
style
=
{
{
marginRight
:
16
}
}
>
编辑
</
a
>
}
{
item
.
status
===
0
&&
<
Popconfirm
title
=
"确定取消?"
...
...
kafka-manager-console/src/container/admin/operation-management/migration-detail.tsx
浏览文件 @
373772de
...
...
@@ -130,7 +130,7 @@ export class MigrationDetail extends SearchAndFilterContainer {
render
:
(
text
:
string
,
item
:
IReassign
)
=>
(
<>
<
a
onClick
=
{
()
=>
this
.
renderRessignDetail
(
item
)
}
style
=
{
{
marginRight
:
16
}
}
>
详情
</
a
>
<
a
onClick
=
{
()
=>
modifyTransferTask
(
item
,
'
modify
'
,
this
.
taskId
)
}
>
修改
</
a
>
<
a
onClick
=
{
()
=>
modifyTransferTask
(
item
,
'
modify
'
,
this
.
taskId
)
}
>
编辑
</
a
>
</>
),
},
...
...
kafka-manager-console/src/container/alarm/add-alarm/alarm-select.tsx
浏览文件 @
373772de
...
...
@@ -52,7 +52,7 @@ export class AlarmSelect extends React.Component<IAlarmSelectProps> {
target
=
"_blank"
href
=
"https://github.com/didi/kafka-manager"
>
新
建告警
组?
新
增规则
组?
</
a
>
</>
);
...
...
kafka-manager-console/src/container/alarm/add-alarm/config.tsx
浏览文件 @
373772de
...
...
@@ -14,7 +14,7 @@ import { region } from 'store/region';
export
const
getAlarmColumns
=
(
urlPrefix
:
string
)
=>
{
const
columns
=
[
{
title
:
'
告警
名称
'
,
title
:
'
告警
规则
'
,
dataIndex
:
'
name
'
,
key
:
'
name
'
,
width
:
'
25%
'
,
...
...
@@ -32,7 +32,7 @@ export const getAlarmColumns = (urlPrefix: string) => {
</
Tooltip
>);
},
},
{
title
:
'
应用名称
'
,
title
:
'
所属应用
'
,
dataIndex
:
'
appName
'
,
key
:
'
appName
'
,
width
:
'
25%
'
,
...
...
@@ -72,7 +72,7 @@ export const getAlarmColumns = (urlPrefix: string) => {
width
:
'
10%
'
,
render
:
(
text
:
string
,
item
:
IMonitorStrategies
)
=>
(
<>
<
a
href
=
{
`
${
urlPrefix
}
/alarm/modify?id=
${
item
.
id
}
`
}
className
=
"action-button"
>
修改
</
a
>
<
a
href
=
{
`
${
urlPrefix
}
/alarm/modify?id=
${
item
.
id
}
`
}
className
=
"action-button"
>
编辑
</
a
>
<
Popconfirm
title
=
"确定删除?"
onConfirm
=
{
()
=>
deteleMonitor
(
item
)
}
...
...
@@ -205,8 +205,8 @@ export const xActionFormMap = [{
export
const
xTypeFormMap
=
[{
key
:
'
alarmName
'
,
label
:
'
告警
名称
'
,
rules
:
[{
required
:
true
,
message
:
'
请输入告警
名称
'
}],
label
:
'
告警
规则
'
,
rules
:
[{
required
:
true
,
message
:
'
请输入告警
规则
'
}],
attrs
:
{
placeholder
:
'
请输入
'
,
disabled
:
isDetailPage
},
},
{
key
:
'
app
'
,
...
...
kafka-manager-console/src/container/alarm/add-alarm/index.tsx
浏览文件 @
373772de
...
...
@@ -152,7 +152,7 @@ export class AddAlarm extends SearchAndFilterContainer {
<
PageHeader
className
=
{
this
.
isDetailPage
?
'
is-show
'
:
'
btn-group
'
}
onBack
=
{
()
=>
handlePageBack
(
'
/alarm
'
)
}
title
=
{
(
this
.
id
||
this
.
id
===
0
)
?
'
修改告警配置
'
:
'
新建告警配置
'
}
title
=
{
(
this
.
id
||
this
.
id
===
0
)
?
'
编辑告警规则
'
:
'
新建告警规则
'
}
extra
=
{
[
<
Button
key
=
"1"
type
=
"primary"
onClick
=
{
()
=>
this
.
handleSubmit
()
}
>
提交
</
Button
>,
<
Button
key
=
"2"
onClick
=
{
()
=>
this
.
handleResetForm
(
this
.
id
)
}
>
重置
</
Button
>,
...
...
kafka-manager-console/src/container/alarm/alarm-detail/shield-history.tsx
浏览文件 @
373772de
...
...
@@ -34,7 +34,7 @@ export class ShieldHistory extends React.Component {
title
:
'
详情
'
,
content
:
(
<
ul
className
=
"monitor-detail"
>
<
li
><
b
>
告警
名称
:
</
b
>
{
record
.
monitorName
}
</
li
>
<
li
><
b
>
告警
规则
:
</
b
>
{
record
.
monitorName
}
</
li
>
<
li
><
b
>
开始时间:
</
b
>
{
moment
(
record
.
startTime
).
format
(
timeFormat
)
}
</
li
>
<
li
><
b
>
结束时间:
</
b
>
{
moment
(
record
.
endTime
).
format
(
timeFormat
)
}
</
li
>
<
li
><
b
>
说明:
</
b
>
{
record
.
description
}
</
li
>
...
...
@@ -48,10 +48,10 @@ export class ShieldHistory extends React.Component {
formMap
:
[
{
key
:
'
monitorName
'
,
label
:
'
告警
名称
'
,
label
:
'
告警
规则
'
,
rules
:
[{
required
:
true
,
message
:
'
请输入告警
名称
'
,
message
:
'
请输入告警
规则
'
,
}],
attrs
:
{
disabled
:
true
,
...
...
@@ -112,7 +112,7 @@ export class ShieldHistory extends React.Component {
monitorId
:
record
.
monitorId
,
}
as
IMonitorSilences
;
alarm
.
modifyMask
(
params
,
this
.
id
).
then
(
data
=>
{
notification
.
success
({
message
:
'
修改
成功
'
});
notification
.
success
({
message
:
'
编辑
成功
'
});
});
},
};
...
...
@@ -158,7 +158,7 @@ export class ShieldHistory extends React.Component {
render
:
(
action
:
any
,
record
:
IMonitorSilences
)
=>
{
return
(
<>
<
a
onClick
=
{
()
=>
this
.
modifyMonitor
(
record
)
}
className
=
"action-button"
>
修改
</
a
>
<
a
onClick
=
{
()
=>
this
.
modifyMonitor
(
record
)
}
className
=
"action-button"
>
编辑
</
a
>
<
a
onClick
=
{
()
=>
this
.
silencesDetail
(
record
)
}
className
=
"action-button"
>
详情
</
a
>
<
Popconfirm
title
=
"确定删除?"
...
...
kafka-manager-console/src/container/alarm/alarm-list.tsx
浏览文件 @
373772de
...
...
@@ -52,11 +52,11 @@ export class AlarmList extends SearchAndFilterContainer {
return
(
<>
{
this
.
renderApp
(
'
应用:
'
)
}
{
this
.
renderSearch
(
'
名称:
'
,
'
请输入告警
名称
或者操作人
'
)
}
{
this
.
renderSearch
(
'
名称:
'
,
'
请输入告警
规则
或者操作人
'
)
}
<
li
className
=
"right-btn-1"
>
<
Button
type
=
"primary"
>
<
a
href
=
{
`
${
urlPrefix
}
/alarm/add`
}
>
新
建告警
新
增规则
</
a
>
</
Button
>
</
li
>
...
...
kafka-manager-console/src/container/app/app-list.tsx
浏览文件 @
373772de
...
...
@@ -92,7 +92,7 @@ export class CommonAppList extends SearchAndFilterContainer {
render
:
(
text
:
any
,
record
:
IAppItem
)
=>
{
return
(
<
span
className
=
"table-operation"
>
<
a
onClick
=
{
()
=>
showEditModal
(
record
,
this
.
from
)
}
>
修改
</
a
>
<
a
onClick
=
{
()
=>
showEditModal
(
record
,
this
.
from
)
}
>
编辑
</
a
>
<
a
onClick
=
{
()
=>
showEditModal
(
record
,
this
.
from
,
true
)
}
>
详情
</
a
>
<
a
onClick
=
{
()
=>
this
.
getOnlineConnect
(
record
)
}
>
申请下线
</
a
>
</
span
>);
...
...
kafka-manager-console/src/container/modal/admin/cluster.ts
浏览文件 @
373772de
...
...
@@ -25,9 +25,10 @@ export const showEditClusterTopic = (item: IClusterTopics) => {
label
:
'
应用ID
'
,
rules
:
[{
required
:
true
,
message
:
'
请输入应用ID
'
,
}],
attrs
:
{
disabled
:
true
,
placeholder
:
'
请输入应用ID
'
,
},
},
{
...
...
kafka-manager-console/src/container/modal/admin/migration.ts
浏览文件 @
373772de
...
...
@@ -104,7 +104,7 @@ export const modifyTransferTask = (item: IReassign, action: string, taskId: numb
minThrottle
:
transBToMB
(
item
.
minThrottle
),
},
visible
:
true
,
title
:
'
修改
'
,
title
:
'
编辑
'
,
onSubmit
:
(
value
:
IExecute
)
=>
{
const
params
=
{
action
,
...
...
kafka-manager-console/src/container/modal/admin/user.ts
浏览文件 @
373772de
...
...
@@ -30,7 +30,7 @@ export const showApplyModal = (record?: IUser) => {
],
formData
:
record
||
{},
visible
:
true
,
title
:
record
?
'
修改用户
信息
'
:
'
新增用户
'
,
title
:
record
?
'
修改用户
'
:
'
新增用户
'
,
onSubmit
:
(
value
:
IUser
)
=>
{
if
(
record
)
{
return
users
.
modfiyUser
(
value
).
then
(()
=>
{
...
...
kafka-manager-console/src/container/modal/admin/version.ts
浏览文件 @
373772de
...
...
@@ -133,7 +133,7 @@ export const showModifyModal = (record: IUploadFile) => {
formData
:
record
||
{},
visible
:
true
,
isWaitting
:
true
,
title
:
'
修改
'
,
title
:
'
编辑
'
,
onSubmit
:
async
(
value
:
IUploadFile
)
=>
{
value
.
file
=
value
.
uploadFile
[
0
].
originFileObj
;
const
md5
=
await
computeChecksumMd5
(
value
.
file
);
...
...
@@ -175,11 +175,11 @@ export const showConfigureModal = (record?: IConfigure) => {
formData
:
record
||
{},
visible
:
true
,
isWaitting
:
true
,
title
:
`
${
record
?
'
修改
配置
'
:
'
新建配置
'
}
`
,
title
:
`
${
record
?
'
编辑
配置
'
:
'
新建配置
'
}
`
,
onSubmit
:
async
(
value
:
IConfigure
)
=>
{
if
(
record
)
{
return
admin
.
editConfigure
(
value
).
then
(
data
=>
{
notification
.
success
({
message
:
'
修改
配置成功
'
});
notification
.
success
({
message
:
'
编辑
配置成功
'
});
});
}
return
admin
.
addNewConfigure
(
value
).
then
(
data
=>
{
...
...
kafka-manager-console/src/container/modal/alarm.tsx
浏览文件 @
373772de
...
...
@@ -11,10 +11,10 @@ export const createMonitorSilences = (monitorId: number, monitorName: string) =
formMap
:
[
{
key
:
'
monitorName
'
,
label
:
'
告警
名称
'
,
label
:
'
告警
规则
'
,
rules
:
[{
required
:
true
,
message
:
'
请输入告警
名称
'
,
message
:
'
请输入告警
规则
'
,
}],
attrs
:
{
disabled
:
true
,
...
...
kafka-manager-console/src/container/modal/app.tsx
浏览文件 @
373772de
...
...
@@ -85,7 +85,7 @@ export const showEditModal = (record?: IAppItem, from?: string, isDisabled?: boo
],
formData
:
record
,
visible
:
true
,
title
:
`
${
isDisabled
?
'
详情
'
:
record
?
'
修改
'
:
'
应用申请
'
}
`
,
title
:
`
${
isDisabled
?
'
详情
'
:
record
?
'
编辑
'
:
'
应用申请
'
}
`
,
onSubmit
:
(
value
:
IAppItem
)
=>
{
if
(
isDisabled
)
{
return
;
...
...
kafka-manager-core/pom.xml
浏览文件 @
373772de
...
...
@@ -31,7 +31,7 @@
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-dao
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<!-- spring -->
...
...
kafka-manager-dao/pom.xml
浏览文件 @
373772de
...
...
@@ -29,7 +29,7 @@
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-common
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
...
...
kafka-manager-extends/kafka-manager-account/pom.xml
浏览文件 @
373772de
...
...
@@ -18,17 +18,17 @@
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-common
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-dao
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-core
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
...
...
kafka-manager-extends/kafka-manager-bpm/pom.xml
浏览文件 @
373772de
...
...
@@ -18,22 +18,22 @@
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-common
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-dao
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-core
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-account
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
kafka-manager-extends/kafka-manager-kcm/pom.xml
浏览文件 @
373772de
...
...
@@ -35,12 +35,12 @@
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-dao
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-common
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
...
...
kafka-manager-extends/kafka-manager-monitor/pom.xml
浏览文件 @
373772de
...
...
@@ -32,7 +32,7 @@
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-dao
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
...
...
kafka-manager-extends/kafka-manager-openapi/pom.xml
浏览文件 @
373772de
...
...
@@ -35,12 +35,12 @@
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-core
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-bpm
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
...
...
kafka-manager-task/pom.xml
浏览文件 @
373772de
...
...
@@ -31,12 +31,12 @@
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-core
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-kcm
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
...
...
@@ -46,7 +46,7 @@
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-bpm
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
...
...
kafka-manager-web/pom.xml
浏览文件 @
373772de
...
...
@@ -19,28 +19,29 @@
<springframework.boot.version>
2.1.1.RELEASE
</springframework.boot.version>
<spring-version>
5.1.3.RELEASE
</spring-version>
<failOnMissingWebXml>
false
</failOnMissingWebXml>
<tomcat.version>
8.5.37
</tomcat.version>
</properties>
<dependencies>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-core
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-kcm
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-task
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
<artifactId>
kafka-manager-monitor
</artifactId>
<version>
${parent.version}
</version>
<version>
${p
roject.p
arent.version}
</version>
</dependency>
<dependency>
<groupId>
com.xiaojukeji.kafka
</groupId>
...
...
kafka-manager-web/src/main/java/com/xiaojukeji/kafka/manager/web/api/versionone/gateway/GatewayServiceDiscoveryController.java
浏览文件 @
373772de
...
...
@@ -60,6 +60,9 @@ public class GatewayServiceDiscoveryController {
if
(
ValidateUtils
.
isNull
(
config
)
||
ValidateUtils
.
isNull
(
config
.
getClusterIdBootstrapServersMap
()))
{
return
Result
.
buildFailure
(
"call init kafka bootstrap servers failed"
);
}
if
(
ValidateUtils
.
isEmptyMap
(
config
.
getClusterIdBootstrapServersMap
()))
{
return
Result
.
buildSuc
();
}
return
Result
.
buildSuc
(
JSON
.
toJSONString
(
config
.
getClusterIdBootstrapServersMap
()));
}
...
...
@@ -73,7 +76,9 @@ public class GatewayServiceDiscoveryController {
if
(
ValidateUtils
.
isNull
(
config
)
||
ValidateUtils
.
isNull
(
config
.
getClusterIdBootstrapServersMap
()))
{
return
Result
.
buildFailure
(
"call update kafka bootstrap servers failed"
);
}
if
(
ValidateUtils
.
isEmptyMap
(
config
.
getClusterIdBootstrapServersMap
()))
{
return
Result
.
buildSuc
();
}
return
Result
.
buildSuc
(
JSON
.
toJSONString
(
new
GatewayConfigVO
(
String
.
valueOf
(
config
.
getVersion
()),
JSON
.
toJSONString
(
config
.
getClusterIdBootstrapServersMap
())
...
...
@@ -89,7 +94,9 @@ public class GatewayServiceDiscoveryController {
if
(
ValidateUtils
.
isNull
(
config
))
{
return
Result
.
buildFailure
(
"call get request queue size config failed"
);
}
if
(
ValidateUtils
.
isNull
(
config
.
getMaxRequestQueueSize
()))
{
return
Result
.
buildSuc
();
}
return
Result
.
buildSuc
(
JSON
.
toJSONString
(
new
GatewayConfigVO
(
String
.
valueOf
(
config
.
getVersion
()),
...
...
@@ -107,7 +114,9 @@ public class GatewayServiceDiscoveryController {
if
(
ValidateUtils
.
isNull
(
config
))
{
return
Result
.
buildFailure
(
"call get app rate config failed"
);
}
if
(
ValidateUtils
.
isNull
(
config
.
getAppRateLimit
()))
{
return
Result
.
buildSuc
();
}
return
Result
.
buildSuc
(
JSON
.
toJSONString
(
new
GatewayConfigVO
(
String
.
valueOf
(
config
.
getVersion
()),
...
...
@@ -125,6 +134,9 @@ public class GatewayServiceDiscoveryController {
if
(
ValidateUtils
.
isNull
(
config
))
{
return
Result
.
buildFailure
(
"call get ip rate config failed"
);
}
if
(
ValidateUtils
.
isNull
(
config
.
getIpRateLimit
()))
{
return
Result
.
buildSuc
();
}
return
Result
.
buildSuc
(
JSON
.
toJSONString
(
new
GatewayConfigVO
(
String
.
valueOf
(
config
.
getVersion
()),
...
...
@@ -143,7 +155,9 @@ public class GatewayServiceDiscoveryController {
if
(
ValidateUtils
.
isNull
(
config
)
||
ValidateUtils
.
isNull
(
config
.
getSpRateMap
()))
{
return
Result
.
buildFailure
(
"call update kafka bootstrap servers failed"
);
}
if
(
ValidateUtils
.
isEmptyMap
(
config
.
getSpRateMap
()))
{
return
Result
.
buildSuc
();
}
List
<
String
>
strList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
Long
>
entry:
config
.
getSpRateMap
().
entrySet
())
{
strList
.
add
(
entry
.
getKey
()
+
"#"
+
String
.
valueOf
(
entry
.
getValue
()));
...
...
kafka-manager-web/src/main/java/com/xiaojukeji/kafka/manager/web/api/versionone/thirdpart/ThirdPartConsumeController.java
浏览文件 @
373772de
...
...
@@ -4,6 +4,7 @@ import com.xiaojukeji.kafka.manager.common.bizenum.ConsumeHealthEnum;
import
com.xiaojukeji.kafka.manager.common.bizenum.OffsetLocationEnum
;
import
com.xiaojukeji.kafka.manager.common.constant.ApiPrefix
;
import
com.xiaojukeji.kafka.manager.common.constant.Constant
;
import
com.xiaojukeji.kafka.manager.common.constant.SystemCodeConstant
;
import
com.xiaojukeji.kafka.manager.common.entity.Result
;
import
com.xiaojukeji.kafka.manager.common.entity.ResultStatus
;
import
com.xiaojukeji.kafka.manager.common.entity.ao.consumer.ConsumeDetailDTO
;
...
...
@@ -29,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
/**
...
...
@@ -56,6 +58,8 @@ public class ThirdPartConsumeController {
@Autowired
private
ThirdPartService
thirdPartService
;
private
static
final
List
<
String
>
WHITE_SYS_CODES_LIST
=
Arrays
.
asList
(
SystemCodeConstant
.
KAFKA_MANAGER
);
@ApiOperation
(
value
=
"消费组健康"
,
notes
=
"消费组是否健康"
)
@RequestMapping
(
value
=
"clusters/consumer-health"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
...
...
@@ -97,18 +101,20 @@ public class ThirdPartConsumeController {
return
Result
.
buildFrom
(
ResultStatus
.
CLUSTER_NOT_EXIST
);
}
// 检查AppID权限
if
(!
appService
.
verifyAppIdByPassword
(
dto
.
getAppId
(),
dto
.
getPassword
()))
{
return
Result
.
buildFrom
(
ResultStatus
.
PARAM_ILLEGAL
);
}
// 检查权限
AuthorityDO
authority
=
if
(!
WHITE_SYS_CODES_LIST
.
contains
(
dto
.
getSystemCode
()))
{
// 检查AppID权限
if
(!
appService
.
verifyAppIdByPassword
(
dto
.
getAppId
(),
dto
.
getPassword
()))
{
return
Result
.
buildFrom
(
ResultStatus
.
PARAM_ILLEGAL
);
}
// 检查权限
AuthorityDO
authority
=
authorityService
.
getAuthority
(
dto
.
getClusterId
(),
dto
.
getTopicName
(),
dto
.
getAppId
());
if
(
ValidateUtils
.
isNull
(
authority
)
||
(
authority
.
getAccess
()
&
1
)
<=
0
)
{
authority
=
authorityService
.
getAuthority
(
dto
.
getClusterId
(),
"*"
,
dto
.
getAppId
());
}
if
(
authority
==
null
||
(
authority
.
getAccess
()
&
1
)
<=
0
)
{
return
Result
.
buildFrom
(
ResultStatus
.
USER_WITHOUT_AUTHORITY
);
if
(
ValidateUtils
.
isNull
(
authority
)
||
(
authority
.
getAccess
()
&
1
)
<=
0
)
{
authority
=
authorityService
.
getAuthority
(
dto
.
getClusterId
(),
"*"
,
dto
.
getAppId
());
}
if
(
authority
==
null
||
(
authority
.
getAccess
()
&
1
)
<=
0
)
{
return
Result
.
buildFrom
(
ResultStatus
.
USER_WITHOUT_AUTHORITY
);
}
}
List
<
Result
>
resultList
=
thirdPartService
.
resetOffsets
(
clusterDO
,
dto
);
...
...
pom.xml
浏览文件 @
373772de
...
...
@@ -27,6 +27,7 @@
<java_target_version>
1.8
</java_target_version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<file_encoding>
UTF-8
</file_encoding>
<tomcat.version>
8.5.37
</tomcat.version>
</properties>
<modules>
...
...
@@ -67,7 +68,7 @@
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<version>
4.0.1
</version>
<version>
3.1.0
</version>
</dependency>
<dependency>
<groupId>
javax.annotation
</groupId>
...
...
@@ -124,7 +125,7 @@
<dependency>
<groupId>
org.apache.kafka
</groupId>
<artifactId>
kafka_2.10
</artifactId>
<version>
0.10.2.
2
</version>
<version>
0.10.2.
0
</version>
<exclusions>
<exclusion>
<groupId>
org.slf4j
</groupId>
...
...
@@ -135,7 +136,7 @@
<dependency>
<groupId>
org.apache.kafka
</groupId>
<artifactId>
kafka-clients
</artifactId>
<version>
0.10.2.
2
</version>
<version>
0.10.2.
0
</version>
</dependency>
<!-- json -->
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录