feat(错误信息): 抽取数据的错误信息仅显示错误基本描述

This commit is contained in:
taojinlong 2021-07-12 11:47:26 +08:00
parent 440342e757
commit fd7d70e86a
2 changed files with 17 additions and 4 deletions

View File

@ -410,7 +410,9 @@ public class ExtractDataService {
userIds.forEach(userId -> { userIds.forEach(userId -> {
Map<String,Object> param = new HashMap<>(); Map<String,Object> param = new HashMap<>();
param.put("tableId", id); param.put("tableId", id);
param.put("taskId", taskId); if(StringUtils.isNotEmpty(taskId)){
param.put("taskId", taskId);
}
DeMsgutil.sendMsg(userId, 1, "数据集【"+datasetTable.getName()+"】同步"+msg, gson.toJson(param)); DeMsgutil.sendMsg(userId, 1, "数据集【"+datasetTable.getName()+"】同步"+msg, gson.toJson(param));
}); });
} }
@ -443,7 +445,7 @@ public class ExtractDataService {
if(CollectionUtils.isNotEmpty(datasetTableTaskLogs)){ if(CollectionUtils.isNotEmpty(datasetTableTaskLogs)){
datasetTableTaskLog = datasetTableTaskLogs.get(0); datasetTableTaskLog = datasetTableTaskLogs.get(0);
datasetTableTaskLog.setStatus(JobStatus.Error.name()); datasetTableTaskLog.setStatus(JobStatus.Error.name());
datasetTableTaskLog.setInfo(ExceptionUtils.getStackTrace(e)); datasetTableTaskLog.setInfo(e.getMessage());
datasetTableTaskLog.setEndTime(System.currentTimeMillis()); datasetTableTaskLog.setEndTime(System.currentTimeMillis());
dataSetTableTaskLogService.save(datasetTableTaskLog); dataSetTableTaskLogService.save(datasetTableTaskLog);
} }

View File

@ -71,7 +71,8 @@
width="50%" width="50%"
class="dialog-css" class="dialog-css"
> >
<span>{{ error_massage }}</span> <span class="err-msg">{{ error_massage }}
</span>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" @click="show_error_massage = false">{{ $t('dataset.close') }}</el-button> <el-button size="mini" @click="show_error_massage = false">{{ $t('dataset.close') }}</el-button>
</span> </span>
@ -703,7 +704,17 @@ export default {
overflow-y: auto; overflow-y: auto;
} }
span{ .err-msg{
font-size: 12px;
word-break:normal;
width:auto;
display:block;
white-space:pre-wrap;
word-wrap : break-word ;
overflow: hidden ;
}
.span{
font-size: 12px; font-size: 12px;
} }
</style> </style>