feat(web): 增加pulsar接收时间和压缩最后业务时间的展示

This commit is contained in:
v-zhangjc9
2024-05-14 09:40:03 +08:00
parent fbbaa60dc5
commit 71b8d0684b
6 changed files with 54 additions and 12 deletions

View File

@@ -146,7 +146,7 @@ public class TableController extends BaseController {
.reject(ObjectUtil::isNull)
.toList()
.toImmutable();
return AmisResponse.responseCrudData(tableVOS, tableVOS.size() == 0 ? 0 : total);
return AmisResponse.responseCrudData(tableVOS, tableVOS.isEmpty() ? 0 : total);
}
@GetMapping("list_metas")

View File

@@ -14,6 +14,7 @@ public class SyncStateVO {
private final SyncState syncState;
private final String sourceStartTimeFromNow;
private final String sourceReceiveTimeFromNow;
private final String sourceCheckpointTimeFromNow;
private final String sourcePublishTimeFromNow;
private final String sourceOperationTimeFromNow;
@@ -27,6 +28,7 @@ public class SyncStateVO {
long now = Instant.now().toEpochMilli();
this.sourceStartTimeFromNow = DatetimeUtil.fromNow(now, this::getSourceStartTime);
this.sourceReceiveTimeFromNow = DatetimeUtil.fromNow(now, this::getSourceReceiveTime);
this.sourceCheckpointTimeFromNow = DatetimeUtil.fromNow(now, this::getSourceCheckpointTime);
this.sourcePublishTimeFromNow = DatetimeUtil.fromNow(now, this::getSourcePublishTime);
this.sourceOperationTimeFromNow = DatetimeUtil.fromNow(now, this::getSourceOperationTime);
@@ -44,6 +46,10 @@ public class SyncStateVO {
return syncState.getSourceStartTime();
}
public Long getSourceReceiveTime() {
return syncState.getSourceReceiveTime();
}
public Long getSourceCheckpointTime() {
return syncState.getSourceCheckpointTime();
}
@@ -84,6 +90,10 @@ public class SyncStateVO {
return sourceStartTimeFromNow;
}
public String getSourceReceiveTimeFromNow() {
return sourceReceiveTimeFromNow;
}
public String getSourceCheckpointTimeFromNow() {
return sourceCheckpointTimeFromNow;
}

View File

@@ -1,6 +1,6 @@
const commonInfo = {
// baseUrl: 'http://132.126.207.130:35690/hudi_services/service_web',
baseUrl: '/hudi_services/service_web',
baseUrl: 'http://132.126.207.130:35690/hudi_services/service_web',
// baseUrl: '/hudi_services/service_web',
clusters: {
// hudi同步运行集群和yarn队列名称
sync: {

View File

@@ -155,6 +155,13 @@ function tableTab() {
sortable: true,
className: 'bg-green-50',
},
{
name: 'source_receive_time',
label: '同步接收时间',
...timeAndFrom('syncState.sourceReceiveTime', 'syncState.sourceReceiveTimeFromNow', '无数据'),
sortable: true,
className: 'bg-green-50',
},
{
name: 'source_checkpoint_time',
label: '同步心跳时间',
@@ -200,6 +207,13 @@ function tableTab() {
sortable: true,
className: 'bg-cyan-50',
},
{
name: 'compaction_latest_operation_time',
label: '压缩业务时间',
...timeAndFrom('syncState.compactionLatestOperationTime', 'syncState.compactionLatestOperationTimeFromNow', '无'),
sortable: true,
className: 'bg-cyan-50',
},
{
name: 'compaction_finish_time',
label: '压缩完成时间',