Unverified Commit 88935858 authored by Zzm0809's avatar Zzm0809 Committed by GitHub

[Fix-3021] fix jobmanager log render logical error (#3022)

parent 11be8fb7
...@@ -25,6 +25,12 @@ import { ProCard } from '@ant-design/pro-components'; ...@@ -25,6 +25,12 @@ import { ProCard } from '@ant-design/pro-components';
import { Spin } from 'antd'; import { Spin } from 'antd';
import { useState } from 'react'; import { useState } from 'react';
type ThreadDumpMessage = {
stringifiedThreadInfo: string;
threadName: string;
}
const JobManagerLogsTab = (props: JobProps) => { const JobManagerLogsTab = (props: JobProps) => {
const { jobDetail } = props; const { jobDetail } = props;
const jmaddr = jobDetail?.history?.jobManagerAddress; const jmaddr = jobDetail?.history?.jobManagerAddress;
...@@ -63,9 +69,13 @@ const JobManagerLogsTab = (props: JobProps) => { ...@@ -63,9 +69,13 @@ const JobManagerLogsTab = (props: JobProps) => {
if (!ur.data) { if (!ur.data) {
return; return;
} else { } else {
return (JSON.parse(ur.data)['threadInfos'] as any[]) const threadInfos = JSON.parse(ur.data) && JSON.parse(ur.data)['threadInfos'] as ThreadDumpMessage[];
.map((x) => x['stringifiedThreadInfo']) if (!threadInfos) {
.join(''); return 'No Log';
}else if (threadInfos && threadInfos.length === 0) {
return 'No Thread Info';
}
return threadInfos.map((x: ThreadDumpMessage) => x.stringifiedThreadInfo).join('');
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment