Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
kafka-manager
提交
802b382b
K
kafka-manager
项目概览
DiDi
/
kafka-manager
大约 1 年 前同步成功
通知
60
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,发现更多精彩内容 >>
提交
802b382b
编写于
9月 22, 2022
作者:
G
GraceWalk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: Topic Messages 详情提示优化
上级
fc82999d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
12 deletion
+19
-12
km-console/packages/layout-clusters-fe/src/pages/TopicDetail/Messages.tsx
...ges/layout-clusters-fe/src/pages/TopicDetail/Messages.tsx
+19
-12
未找到文件。
km-console/packages/layout-clusters-fe/src/pages/TopicDetail/Messages.tsx
浏览文件 @
802b382b
...
@@ -10,7 +10,7 @@ const defaultParams: any = {
...
@@ -10,7 +10,7 @@ const defaultParams: any = {
maxRecords
:
100
,
maxRecords
:
100
,
pullTimeoutUnitMs
:
5000
,
pullTimeoutUnitMs
:
5000
,
// filterPartitionId: 1,
// filterPartitionId: 1,
filterOffsetReset
:
0
filterOffsetReset
:
0
,
};
};
const
defaultpaPagination
=
{
const
defaultpaPagination
=
{
current
:
1
,
current
:
1
,
...
@@ -32,8 +32,8 @@ const TopicMessages = (props: any) => {
...
@@ -32,8 +32,8 @@ const TopicMessages = (props: any) => {
// 获取消息开始位置
// 获取消息开始位置
const
offsetResetList
=
[
const
offsetResetList
=
[
{
'
label
'
:
'
latest
'
,
value
:
0
},
{
label
:
'
latest
'
,
value
:
0
},
{
'
label
'
:
'
earliest
'
,
value
:
1
}
{
label
:
'
earliest
'
,
value
:
1
},
];
];
// 默认排序
// 默认排序
...
@@ -99,10 +99,10 @@ const TopicMessages = (props: any) => {
...
@@ -99,10 +99,10 @@ const TopicMessages = (props: any) => {
const
onTableChange
=
(
pagination
:
any
,
filters
:
any
,
sorter
:
any
,
extra
:
any
)
=>
{
const
onTableChange
=
(
pagination
:
any
,
filters
:
any
,
sorter
:
any
,
extra
:
any
)
=>
{
setPagination
(
pagination
);
setPagination
(
pagination
);
// 只有排序事件时,触发重新请求后端数据
// 只有排序事件时,触发重新请求后端数据
if
(
extra
.
action
===
'
sort
'
)
{
if
(
extra
.
action
===
'
sort
'
)
{
setSorter
({
setSorter
({
sortField
:
sorter
.
field
||
''
,
sortField
:
sorter
.
field
||
''
,
sortType
:
sorter
.
order
?
sorter
.
order
.
substring
(
0
,
sorter
.
order
.
indexOf
(
'
end
'
))
:
''
sortType
:
sorter
.
order
?
sorter
.
order
.
substring
(
0
,
sorter
.
order
.
indexOf
(
'
end
'
))
:
''
,
});
});
}
}
// const asc = sorter?.order && sorter?.order === 'ascend' ? true : false;
// const asc = sorter?.order && sorter?.order === 'ascend' ? true : false;
...
@@ -137,11 +137,11 @@ const TopicMessages = (props: any) => {
...
@@ -137,11 +137,11 @@ const TopicMessages = (props: any) => {
<
Form
form
=
{
form
}
layout
=
"inline"
onFinish
=
{
onFinish
}
>
<
Form
form
=
{
form
}
layout
=
"inline"
onFinish
=
{
onFinish
}
>
<
Form
.
Item
name
=
"filterOffsetReset"
>
<
Form
.
Item
name
=
"filterOffsetReset"
>
<
Select
<
Select
options
=
{
offsetResetList
}
options
=
{
offsetResetList
}
size
=
"small"
size
=
"small"
style
=
{
{
width
:
'
120px
'
}
}
style
=
{
{
width
:
'
120px
'
}
}
className
=
{
'
detail-table-select
'
}
className
=
{
'
detail-table-select
'
}
placeholder
=
"请选择offset"
placeholder
=
"请选择offset"
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
name
=
"filterPartitionId"
>
<
Form
.
Item
name
=
"filterPartitionId"
>
...
@@ -172,7 +172,14 @@ const TopicMessages = (props: any) => {
...
@@ -172,7 +172,14 @@ const TopicMessages = (props: any) => {
style
=
{
{
margin
:
'
12px 0 4px
'
,
padding
:
'
7px 12px
'
,
background
:
'
#FFF9E6
'
}
}
style
=
{
{
margin
:
'
12px 0 4px
'
,
padding
:
'
7px 12px
'
,
background
:
'
#FFF9E6
'
}
}
message
=
{
message
=
{
<
div
>
<
div
>
此处展示Topic最近的100条messages,若想获取其他messages,可前往
<
a
onClick
=
{
jumpConsume
}
>
Produce
&
Consume
</
a
>
进行操作
此处展示 Topic 最近的 100 条 messages。
{
process
.
env
.
BUSINESS_VERSION
?
(
<
span
>
若想获取其他 messages,可前往
<
a
onClick
=
{
jumpConsume
}
>
Produce
&
Consume
</
a
>
进行操作
</
span
>
)
:
(
''
)
}
</
div
>
</
div
>
}
}
type
=
"warning"
type
=
"warning"
...
@@ -194,7 +201,7 @@ const TopicMessages = (props: any) => {
...
@@ -194,7 +201,7 @@ const TopicMessages = (props: any) => {
bordered
:
false
,
bordered
:
false
,
onChange
:
onTableChange
,
onChange
:
onTableChange
,
scroll
:
{
x
:
'
max-content
'
},
scroll
:
{
x
:
'
max-content
'
},
sortDirections
:
[
'
descend
'
,
'
ascend
'
,
'
default
'
]
sortDirections
:
[
'
descend
'
,
'
ascend
'
,
'
default
'
]
,
},
},
}
}
}
}
/>
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录