fix: large logs page stuck

This commit is contained in:
jialin
2024-11-05 19:46:47 +08:00
parent 5f2115fff6
commit f684a3b0ae
8 changed files with 114 additions and 40 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ interface RequestConfig {
beforeReconnect?: () => void;
params?: object;
byLine?: boolean;
watch?: boolean;
contentType?: 'json' | 'text';
}
@@ -70,6 +71,7 @@ const useSetChunkFetch = () => {
const fetchChunkRequest = async ({
url,
handler,
watch,
byLine = false,
params = {}
}: RequestConfig) => {
@@ -79,7 +81,7 @@ const useSetChunkFetch = () => {
const response = await fetch(
`v1${url}?${qs.stringify({
...params,
watch: true
watch: watch === undefined ? true : watch
})}`,
{
method: 'GET',