diff --git a/assets/components.d.ts b/assets/components.d.ts
index 12a9c468..b272a2a5 100644
--- a/assets/components.d.ts
+++ b/assets/components.d.ts
@@ -42,6 +42,7 @@ declare module 'vue' {
HostList: typeof import('./components/HostList.vue')['default']
HostMenu: typeof import('./components/HostMenu.vue')['default']
'Ic:sharpKeyboardReturn': typeof import('~icons/ic/sharp-keyboard-return')['default']
+ IndeterminateBar: typeof import('./components/common/IndeterminateBar.vue')['default']
InfiniteLoader: typeof import('./components/InfiniteLoader.vue')['default']
KeyShortcut: typeof import('./components/common/KeyShortcut.vue')['default']
LabeledInput: typeof import('./components/common/LabeledInput.vue')['default']
diff --git a/assets/components/LogViewer/EventSource.vue b/assets/components/LogViewer/EventSource.vue
index 6b98bcde..e22c68f8 100644
--- a/assets/components/LogViewer/EventSource.vue
+++ b/assets/components/LogViewer/EventSource.vue
@@ -1,9 +1,14 @@
-
-
-
-
+
+
+
diff --git a/assets/components/LogViewer/__snapshots__/EventSource.spec.ts.snap b/assets/components/LogViewer/__snapshots__/EventSource.spec.ts.snap
index ef3b8b89..30b00d54 100644
--- a/assets/components/LogViewer/__snapshots__/EventSource.spec.ts.snap
+++ b/assets/components/LogViewer/__snapshots__/EventSource.spec.ts.snap
@@ -59,8 +59,25 @@ exports[` > render html correctly > should render messag
exports[` > renders loading correctly 1`] = `
"
-
-"
+
+"
`;
exports[` > should parse messages 1`] = `
diff --git a/assets/components/ScrollableView.vue b/assets/components/ScrollableView.vue
index 21e98573..70390d07 100644
--- a/assets/components/ScrollableView.vue
+++ b/assets/components/ScrollableView.vue
@@ -21,10 +21,7 @@
-
+
@@ -90,20 +87,6 @@ function scrollToBottom(behavior: "auto" | "smooth" = "auto") {
.fade-leave-to {
@apply opacity-0;
}
-
-.animate-background {
- animation: gradient-animation 3s ease-out infinite;
-}
-
-@keyframes gradient-animation {
- 0%,
- 100% {
- transform: translateX(0%);
- }
- 50% {
- transform: translateX(100%);
- }
-}
diff --git a/assets/composable/eventStreams.ts b/assets/composable/eventStreams.ts
index f72966f1..52edc03f 100644
--- a/assets/composable/eventStreams.ts
+++ b/assets/composable/eventStreams.ts
@@ -53,6 +53,8 @@ function useLogStream(url: Ref, loadMoreUrl?: Ref) {
const messages: ShallowRef[]> = shallowRef([]);
const buffer: ShallowRef[]> = shallowRef([]);
const opened = ref(false);
+ const loading = ref(true);
+ const error = ref(false);
const { paused: scrollingPaused } = useScrollContext();
function flushNow() {
@@ -124,6 +126,8 @@ function useLogStream(url: Ref, loadMoreUrl?: Ref) {
close();
if (clear) clearMessages();
opened.value = false;
+ loading.value = true;
+ error.value = false;
es = new EventSource(urlWithParams.value);
es.addEventListener("container-event", (e) => {
const event = JSON.parse((e as MessageEvent).data) as { actorId: string; name: string };
@@ -151,9 +155,13 @@ function useLogStream(url: Ref, loadMoreUrl?: Ref) {
flushBuffer();
}
};
- es.onerror = () => clearMessages();
+ es.onerror = () => {
+ error.value = true;
+ };
es.onopen = () => {
+ loading.value = false;
opened.value = true;
+ error.value = false;
};
}
@@ -210,5 +218,5 @@ function useLogStream(url: Ref, loadMoreUrl?: Ref) {
}
});
- return { messages, loadOlderLogs, isLoadingMore, hasComplexLogs, opened };
+ return { messages, loadOlderLogs, isLoadingMore, hasComplexLogs, opened, error, loading };
}