mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-10 09:04:26 +08:00
fix: Topic Messages 详情提示优化
This commit is contained in:
@@ -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) => {
|
|||||||
|
|
||||||
// 获取消息开始位置
|
// 获取消息开始位置
|
||||||
const offsetResetList = [
|
const offsetResetList = [
|
||||||
{ 'label': 'latest', value: 0 },
|
{ label: 'latest', value: 0 },
|
||||||
{ 'label': 'earliest', value: 1 }
|
{ label: 'earliest', value: 1 },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 默认排序
|
// 默认排序
|
||||||
@@ -102,7 +102,7 @@ const TopicMessages = (props: any) => {
|
|||||||
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;
|
||||||
@@ -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) => {
|
|||||||
bordered: false,
|
bordered: false,
|
||||||
onChange: onTableChange,
|
onChange: onTableChange,
|
||||||
scroll: { x: 'max-content' },
|
scroll: { x: 'max-content' },
|
||||||
sortDirections: ['descend', 'ascend', 'default']
|
sortDirections: ['descend', 'ascend', 'default'],
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user