@@ -10,7 +10,7 @@ const defaultParams: any = {
1010 maxRecords : 100 ,
1111 pullTimeoutUnitMs : 5000 ,
1212 // filterPartitionId: 1,
13- filterOffsetReset : 0
13+ filterOffsetReset : 0 ,
1414} ;
1515const defaultpaPagination = {
1616 current : 1 ,
@@ -32,8 +32,8 @@ const TopicMessages = (props: any) => {
3232
3333 // 获取消息开始位置
3434 const offsetResetList = [
35- { ' label' : 'latest' , value : 0 } ,
36- { ' label' : 'earliest' , value : 1 }
35+ { label : 'latest' , value : 0 } ,
36+ { label : 'earliest' , value : 1 } ,
3737 ] ;
3838
3939 // 默认排序
@@ -99,10 +99,10 @@ const TopicMessages = (props: any) => {
9999 const onTableChange = ( pagination : any , filters : any , sorter : any , extra : any ) => {
100100 setPagination ( pagination ) ;
101101 // 只有排序事件时,触发重新请求后端数据
102- if ( extra . action === 'sort' ) {
102+ if ( extra . action === 'sort' ) {
103103 setSorter ( {
104104 sortField : sorter . field || '' ,
105- sortType : sorter . order ? sorter . order . substring ( 0 , sorter . order . indexOf ( 'end' ) ) : ''
105+ sortType : sorter . order ? sorter . order . substring ( 0 , sorter . order . indexOf ( 'end' ) ) : '' ,
106106 } ) ;
107107 }
108108 // const asc = sorter?.order && sorter?.order === 'ascend' ? true : false;
@@ -137,11 +137,11 @@ const TopicMessages = (props: any) => {
137137 < Form form = { form } layout = "inline" onFinish = { onFinish } >
138138 < Form . Item name = "filterOffsetReset" >
139139 < Select
140- options = { offsetResetList }
141- size = "small"
142- style = { { width : '120px' } }
143- className = { 'detail-table-select' }
144- placeholder = "请选择offset"
140+ options = { offsetResetList }
141+ size = "small"
142+ style = { { width : '120px' } }
143+ className = { 'detail-table-select' }
144+ placeholder = "请选择offset"
145145 />
146146 </ Form . Item >
147147 < Form . Item name = "filterPartitionId" >
@@ -172,7 +172,14 @@ const TopicMessages = (props: any) => {
172172 style = { { margin : '12px 0 4px' , padding : '7px 12px' , background : '#FFF9E6' } }
173173 message = {
174174 < div >
175- 此处展示Topic最近的100条messages,若想获取其他messages,可前往< a onClick = { jumpConsume } > Produce& Consume </ a > 进行操作
175+ 此处展示 Topic 最近的 100 条 messages。
176+ { process . env . BUSINESS_VERSION ? (
177+ < span >
178+ 若想获取其他 messages,可前往 < a onClick = { jumpConsume } > Produce& Consume </ a > 进行操作
179+ </ span >
180+ ) : (
181+ ''
182+ ) }
176183 </ div >
177184 }
178185 type = "warning"
@@ -194,7 +201,7 @@ const TopicMessages = (props: any) => {
194201 bordered : false ,
195202 onChange : onTableChange ,
196203 scroll : { x : 'max-content' } ,
197- sortDirections : [ 'descend' , 'ascend' , 'default' ]
204+ sortDirections : [ 'descend' , 'ascend' , 'default' ] ,
198205 } ,
199206 } }
200207 />
0 commit comments