mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
fix: When there is no client, LoaderCircle will always transfer (#1511)
This commit is contained in:
@@ -55,8 +55,11 @@ export default function ContainersTable({ systemId }: { systemId?: string }) {
|
|||||||
filter: systemId ? pb.filter("system={:system}", { system: systemId }) : undefined,
|
filter: systemId ? pb.filter("system={:system}", { system: systemId }) : undefined,
|
||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
({ items }) =>
|
({ items }) => {
|
||||||
items.length &&
|
if (items.length === 0) {
|
||||||
|
setData([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
setData((curItems) => {
|
setData((curItems) => {
|
||||||
const lastUpdated = Math.max(items[0].updated, items.at(-1)?.updated ?? 0)
|
const lastUpdated = Math.max(items[0].updated, items.at(-1)?.updated ?? 0)
|
||||||
const containerIds = new Set()
|
const containerIds = new Set()
|
||||||
@@ -74,6 +77,7 @@ export default function ContainersTable({ systemId }: { systemId?: string }) {
|
|||||||
}
|
}
|
||||||
return newItems
|
return newItems
|
||||||
})
|
})
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,12 +337,12 @@ function ContainerSheet({
|
|||||||
setLogsDisplay("")
|
setLogsDisplay("")
|
||||||
setInfoDisplay("")
|
setInfoDisplay("")
|
||||||
if (!container) return
|
if (!container) return
|
||||||
;(async () => {
|
;(async () => {
|
||||||
const [logsHtml, infoHtml] = await Promise.all([getLogsHtml(container), getInfoHtml(container)])
|
const [logsHtml, infoHtml] = await Promise.all([getLogsHtml(container), getInfoHtml(container)])
|
||||||
setLogsDisplay(logsHtml)
|
setLogsDisplay(logsHtml)
|
||||||
setInfoDisplay(infoHtml)
|
setInfoDisplay(infoHtml)
|
||||||
setTimeout(scrollLogsToBottom, 20)
|
setTimeout(scrollLogsToBottom, 20)
|
||||||
})()
|
})()
|
||||||
}, [container])
|
}, [container])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user