diff --git a/__snapshots__/dozzle.snapshot b/__snapshots__/dozzle.snapshot index b4dab137..449dc6af 100644 --- a/__snapshots__/dozzle.snapshot +++ b/__snapshots__/dozzle.snapshot @@ -31,20 +31,16 @@ Content-Type: text/plain; charset=utf-8 dev -/* snapshot: Test_handler_listContainers_happy */ -HTTP/1.1 200 OK -Connection: close -Content-Type: text/plain; charset=utf-8 - -[{"id":"1234567890","names":null,"name":"test","image":"image","imageId":"image_id","command":"command","created":0,"state":"state","status":"status"}] - /* snapshot: Test_handler_streamEvents_error */ HTTP/1.1 200 OK Connection: close Cache-Control: no-cache Connection: keep-alive Content-Type: text/event-stream -X-Accel-Buffering: no +X-Accel-Buffering: no + +event: containers-changed +data: [] /* snapshot: Test_handler_streamEvents_error_request */ HTTP/1.1 200 OK @@ -52,7 +48,10 @@ Connection: close Cache-Control: no-cache Connection: keep-alive Content-Type: text/event-stream -X-Accel-Buffering: no +X-Accel-Buffering: no + +event: containers-changed +data: [] /* snapshot: Test_handler_streamEvents_happy */ HTTP/1.1 200 OK @@ -63,7 +62,7 @@ Content-Type: text/event-stream X-Accel-Buffering: no event: containers-changed -data: start +data: [] /* snapshot: Test_handler_streamLogs_error_finding_container */ HTTP/1.1 404 Not Found diff --git a/assets/App.spec.js b/assets/App.spec.js index d405d1b9..bf274c85 100644 --- a/assets/App.spec.js +++ b/assets/App.spec.js @@ -26,22 +26,22 @@ describe("", () => { { id: "xyz", name: "Test 2" }, ]; }, - }; - - const actions = { - FETCH_CONTAINERS: () => Promise.resolve(), + activeContainers() { + return []; + }, }; store = new Vuex.Store({ state, getters, - actions, }); }); test("has right title", async () => { const wrapper = shallowMount(App, { stubs, store, localVue }); await wrapper.vm.$nextTick(); + wrapper.vm.$options.watch.visibleContainers.call(wrapper.vm); + expect(wrapper.vm.title).toContain("2 containers"); }); diff --git a/assets/App.vue b/assets/App.vue index 8a1a9a30..5f341aa4 100644 --- a/assets/App.vue +++ b/assets/App.vue @@ -15,7 +15,6 @@ +
+
+ {{ state }} +
+
mem {{ formatBytes(stat.memoryUsage) }}
+
load {{ stat.cpu }}%
+
+ + + + + diff --git a/assets/components/ContainerTitle.vue b/assets/components/ContainerTitle.vue index 51f13828..3bdf8b67 100644 --- a/assets/components/ContainerTitle.vue +++ b/assets/components/ContainerTitle.vue @@ -22,8 +22,6 @@ export default {