1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

feat: adds support for levels (#3306)

This commit is contained in:
Amir Raminfar
2024-10-04 13:47:12 -07:00
committed by GitHub
parent 157b2cb304
commit 1e5264a00b
11 changed files with 182 additions and 72 deletions

View File

@@ -11,6 +11,7 @@ import { createRouter, createWebHistory } from "vue-router";
import { default as Component } from "./EventSource.vue";
import LogViewer from "@/components/LogViewer/LogViewer.vue";
import { Container } from "@/models/Container";
import { Level } from "@/models/LogEntry";
vi.mock("@/stores/config", () => ({
__esModule: true,
@@ -82,6 +83,7 @@ describe("<ContainerEventSource />", () => {
containers: computed(() => [{ id: "abc", image: "test:v123", host: "localhost" }]),
streamConfig: reactive({ stdout: true, stderr: true }),
hasComplexLogs: ref(false),
levels: new Set<Level>(["info"]),
},
},
},
@@ -97,7 +99,7 @@ describe("<ContainerEventSource />", () => {
});
}
const sourceUrl = "/api/hosts/localhost/containers/abc/logs/stream?stdout=1&stderr=1";
const sourceUrl = "/api/hosts/localhost/containers/abc/logs/stream?stdout=1&stderr=1&levels=info";
test("renders loading correctly", async () => {
const wrapper = createLogEventSource();