diff --git a/src/components/DetailsLogs/DetailsLogs.js b/src/components/DetailsLogs/DetailsLogs.js index 3aef606fc..067fc62a2 100644 --- a/src/components/DetailsLogs/DetailsLogs.js +++ b/src/components/DetailsLogs/DetailsLogs.js @@ -50,7 +50,10 @@ const DetailsLogs = ({ }, [item, params.projectName, refreshLogs, removeLogs, withLogsRefreshBtn]) const handleScroll = event => { - if (streamLogsRef.current && event.target.scrollHeight - event.target.scrollTop === event.target.clientHeight) { + if ( + streamLogsRef.current && + event.target.scrollHeight - event.target.scrollTop - 1 < event.target.clientHeight + ) { streamLogsRef.current() } } diff --git a/src/utils/getJobLogs.util.js b/src/utils/getJobLogs.util.js index ddd2467f3..e55de3f89 100644 --- a/src/utils/getJobLogs.util.js +++ b/src/utils/getJobLogs.util.js @@ -18,6 +18,8 @@ under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ export const getJobLogs = (uid, projectName, streamLogsRef, setDetailsLogs, fetchJobLogs) => { + setDetailsLogs('') + fetchJobLogs(uid, projectName).then(res => { const reader = res.body?.getReader()