lynn-illumio commented on code in PR #11226: URL: https://github.com/apache/dolphinscheduler/pull/11226#discussion_r985369103
########## dolphinscheduler-ui/.env.development: ########## @@ -15,4 +15,4 @@ NODE_ENV=development -VITE_APP_DEV_WEB_URL='http://127.0.0.1:12345' +VITE_APP_DEV_WEB_URL='http://8.142.34.29:12345' Review Comment: Addressed in https://github.com/apache/dolphinscheduler/pull/11226/commits/7782c5d6cf93a4473fcdf8288ee433ed61870388. ########## dolphinscheduler-ui/src/views/projects/task/instance/batch-task.tsx: ########## @@ -74,20 +77,27 @@ const BatchTaskInstance = defineComponent({ variables.showModalRef = false } - const getLogs = (row: any) => { + const getLogs = (row: any, logTimer: number) => { const { state } = useAsyncState( queryLog({ taskInstanceId: Number(row.id), limit: variables.limit, skipLineNum: variables.skipLineNum }).then((res: any) => { - if (res?.message) { - variables.logRef += res.message + variables.logRef += res.message || '' + if (res && res.message !== '') { variables.limit += 1000 variables.skipLineNum += res.lineNum - getLogs(row) + getLogs(row, logTimer) } else { variables.logLoadingRef = false + setTimeout(() => { + variables.logRef = '' + variables.limit = 1000 + variables.skipLineNum = 0 + variables.logLoadingRef = true + getLogs(row, logTimer) + }, logTimer * 1000) Review Comment: https://github.com/apache/dolphinscheduler/pull/11226/commits/7782c5d6cf93a4473fcdf8288ee433ed61870388 ########## dolphinscheduler-ui/src/views/projects/task/instance/batch-task.tsx: ########## @@ -74,20 +77,27 @@ const BatchTaskInstance = defineComponent({ variables.showModalRef = false } - const getLogs = (row: any) => { + const getLogs = (row: any, logTimer: number) => { const { state } = useAsyncState( queryLog({ taskInstanceId: Number(row.id), limit: variables.limit, skipLineNum: variables.skipLineNum }).then((res: any) => { - if (res?.message) { - variables.logRef += res.message + variables.logRef += res.message || '' + if (res && res.message !== '') { variables.limit += 1000 variables.skipLineNum += res.lineNum - getLogs(row) + getLogs(row, logTimer) } else { variables.logLoadingRef = false + setTimeout(() => { + variables.logRef = '' + variables.limit = 1000 + variables.skipLineNum = 0 + variables.logLoadingRef = true + getLogs(row, logTimer) + }, logTimer * 1000) Review Comment: Addressed in https://github.com/apache/dolphinscheduler/pull/11226/commits/7782c5d6cf93a4473fcdf8288ee433ed61870388 ########## dolphinscheduler-ui/src/views/projects/task/instance/batch-task.tsx: ########## @@ -74,20 +77,27 @@ const BatchTaskInstance = defineComponent({ variables.showModalRef = false } - const getLogs = (row: any) => { + const getLogs = (row: any, logTimer: number) => { const { state } = useAsyncState( queryLog({ taskInstanceId: Number(row.id), limit: variables.limit, skipLineNum: variables.skipLineNum }).then((res: any) => { - if (res?.message) { - variables.logRef += res.message + variables.logRef += res.message || '' + if (res && res.message !== '') { variables.limit += 1000 variables.skipLineNum += res.lineNum - getLogs(row) + getLogs(row, logTimer) } else { variables.logLoadingRef = false + setTimeout(() => { + variables.logRef = '' + variables.limit = 1000 + variables.skipLineNum = 0 + variables.logLoadingRef = true + getLogs(row, logTimer) + }, logTimer * 1000) Review Comment: Addressed in https://github.com/apache/dolphinscheduler/pull/11226/commits/7782c5d6cf93a4473fcdf8288ee433ed61870388 ########## dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx: ########## @@ -233,23 +237,28 @@ export default defineComponent({ const handleViewLog = (taskId: number, taskType: string) => { taskModalVisible.value = false viewLog(taskId, taskType) - getLogs() + getLogs(logTimer) } - const getLogs = () => { + const getLogs = (logTimer: number) => { const { state } = useAsyncState( queryLog({ taskInstanceId: nodeVariables.logTaskId, limit: nodeVariables.limit, skipLineNum: nodeVariables.skipLineNum }).then((res: any) => { - if (res.message) { - nodeVariables.logRef += res.message + nodeVariables.logRef += res.message || '' + if (res && res.message !== '') { nodeVariables.limit += 1000 nodeVariables.skipLineNum += res.lineNum - getLogs() + getLogs(logTimer) } else { nodeVariables.logLoadingRef = false + setTimeout(() => { + nodeVariables.limit += 1000 + nodeVariables.skipLineNum += 1000 + getLogs(logTimer) + }, logTimer * 1000) Review Comment: Addressed in https://github.com/apache/dolphinscheduler/pull/11226/commits/fcfe28f870b4fcb367fa51591e0136fe040b382a. ########## dolphinscheduler-ui/src/views/projects/task/instance/batch-task.tsx: ########## @@ -74,20 +77,27 @@ const BatchTaskInstance = defineComponent({ variables.showModalRef = false } - const getLogs = (row: any) => { + const getLogs = (row: any, logTimer: number) => { const { state } = useAsyncState( queryLog({ taskInstanceId: Number(row.id), limit: variables.limit, skipLineNum: variables.skipLineNum }).then((res: any) => { - if (res?.message) { - variables.logRef += res.message + variables.logRef += res.message || '' + if (res && res.message !== '') { variables.limit += 1000 variables.skipLineNum += res.lineNum - getLogs(row) + getLogs(row, logTimer) } else { variables.logLoadingRef = false + setTimeout(() => { + variables.logRef = '' + variables.limit = 1000 + variables.skipLineNum = 0 + variables.logLoadingRef = true + getLogs(row, logTimer) + }, logTimer * 1000) Review Comment: That's a great point! Addressed in https://github.com/apache/dolphinscheduler/pull/11226/commits/7782c5d6cf93a4473fcdf8288ee433ed61870388 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
