-
- -
-
- {{ name }}=
-
-
-
-
-
+
+
+
+
+
+
+ -
+
+ {{ name }}=
+
+
+
+
+
+
+
+
diff --git a/assets/components/LogViewer/LogEventSource.spec.ts b/assets/components/LogViewer/LogEventSource.spec.ts
index a1e71aff..7ae58d65 100644
--- a/assets/components/LogViewer/LogEventSource.spec.ts
+++ b/assets/components/LogViewer/LogEventSource.spec.ts
@@ -6,7 +6,7 @@ import LogEventSource from "./LogEventSource.vue";
import LogViewer from "./LogViewer.vue";
import { settings } from "../../composables/settings";
import { useSearchFilter } from "@/composables/search";
-import { vi, describe, expect, beforeEach, test, beforeAll, afterAll, afterEach } from "vitest";
+import { vi, describe, expect, beforeEach, test, afterEach } from "vitest";
import { computed, nextTick } from "vue";
import { createRouter, createWebHistory } from "vue-router";
@@ -23,6 +23,7 @@ describe("
", () => {
beforeEach(() => {
global.EventSource = EventSource;
+ // @ts-ignore
window.scrollTo = vi.fn();
global.IntersectionObserver = vi.fn().mockImplementation(() => ({
observe: vi.fn(),
@@ -112,6 +113,7 @@ describe("
", () => {
vi.runAllTimers();
await nextTick();
+ // @ts-ignore
const [message, _] = wrapper.vm.messages;
expect(message).toMatchSnapshot();
});
diff --git a/assets/components/LogViewer/LogEventSource.vue b/assets/components/LogViewer/LogEventSource.vue
index b5046dcd..b5cef1d4 100644
--- a/assets/components/LogViewer/LogEventSource.vue
+++ b/assets/components/LogViewer/LogEventSource.vue
@@ -12,7 +12,7 @@ const emit = defineEmits<{
}>();
const container = inject("container") as ComputedRef
;
-const { connect, messages, loadOlderLogs } = useLogStream(container);
+const { messages, loadOlderLogs } = useLogStream(container);
const beforeLoading = () => emit("loading-more", true);
const afterLoading = () => emit("loading-more", false);
@@ -22,6 +22,4 @@ defineExpose({
});
const fetchMore = () => loadOlderLogs({ beforeLoading, afterLoading });
-
-connect();
diff --git a/assets/components/LogViewer/LogViewer.vue b/assets/components/LogViewer/LogViewer.vue
index bafbd75e..a53f79d6 100644
--- a/assets/components/LogViewer/LogViewer.vue
+++ b/assets/components/LogViewer/LogViewer.vue
@@ -22,10 +22,7 @@
-