Compare commits

...

50 Commits

Author SHA1 Message Date
Amir Raminfar
6118cda6de Release 1.23.0 2020-05-07 15:31:44 -07:00
Amir Raminfar
d5bac298ec Updates tests 2020-05-07 15:26:05 -07:00
Amir Raminfar
2286bc65a7 Adds w.Header().Set("X-Accel-Buffering", "no") for server events 2020-05-07 15:23:53 -07:00
Amir Raminfar
254faa7145 Fixes buffer bug 2020-05-07 15:22:47 -07:00
Amir Raminfar
a927ba66a5 Fixes nginx buffer problem by adding X-Accel-Buffering: no 2020-05-07 15:22:21 -07:00
Amir Raminfar
6c9b6b7768 Fixes title bug 2020-05-07 15:18:22 -07:00
dependabot-preview[bot]
77abe748f0 Merge pull request #439 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001053 2020-05-07 22:07:16 +00:00
dependabot-preview[bot]
6e17e178da Bump caniuse-lite from 1.0.30001052 to 1.0.30001053
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001052 to 1.0.30001053.
- [Release notes](https://github.com/ben-eb/caniuse-lite/releases)
- [Changelog](https://github.com/ben-eb/caniuse-lite/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ben-eb/caniuse-lite/compare/v1.0.30001052...v1.0.30001053)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-07 06:05:19 +00:00
Amir Raminfar
55f4cff699 Adds web manifest 2020-05-06 16:00:15 -07:00
Amir Raminfar
6ed4dcc86a Uses webpack instead of parcel (#438) 2020-05-06 15:44:12 -07:00
dependabot-preview[bot]
fad25076f7 Merge pull request #437 from amir20/dependabot/npm_and_yarn/date-fns-2.13.0 2020-05-06 21:34:05 +00:00
dependabot-preview[bot]
6c796ecd2c Bump date-fns from 2.12.0 to 2.13.0
Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.12.0 to 2.13.0.
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/master/CHANGELOG.md)
- [Commits](https://github.com/date-fns/date-fns/compare/v2.12.0...v2.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-06 21:29:04 +00:00
dependabot-preview[bot]
df9c0f6863 Merge pull request #436 from amir20/dependabot/npm_and_yarn/vue/test-utils-1.0.2 2020-05-06 16:52:25 +00:00
dependabot-preview[bot]
6be5d7e42d Bump @vue/test-utils from 1.0.0 to 1.0.2
Bumps [@vue/test-utils](https://github.com/vuejs/vue-test-utils/tree/HEAD/packages/test-utils) from 1.0.0 to 1.0.2.
- [Release notes](https://github.com/vuejs/vue-test-utils/releases)
- [Changelog](https://github.com/vuejs/vue-test-utils/blob/dev/packages/test-utils/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-test-utils/commits/v1.0.2/packages/test-utils)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-06 16:47:28 +00:00
dependabot-preview[bot]
69dd53d669 Merge pull request #435 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001052 2020-05-06 00:43:13 +00:00
dependabot-preview[bot]
3673ea9b72 Bump caniuse-lite from 1.0.30001051 to 1.0.30001052
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001051 to 1.0.30001052.
- [Release notes](https://github.com/ben-eb/caniuse-lite/releases)
- [Changelog](https://github.com/ben-eb/caniuse-lite/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ben-eb/caniuse-lite/compare/v1.0.30001051...v1.0.30001052)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-06 00:36:53 +00:00
dependabot-preview[bot]
0a4f53b7c9 Merge pull request #434 from amir20/dependabot/npm_and_yarn/vue/test-utils-1.0.0 2020-05-05 17:14:46 +00:00
dependabot-preview[bot]
f5a84c249a Bump @vue/test-utils from 1.0.0-beta.33 to 1.0.0
Bumps [@vue/test-utils](https://github.com/vuejs/vue-test-utils/tree/HEAD/packages/test-utils) from 1.0.0-beta.33 to 1.0.0.
- [Release notes](https://github.com/vuejs/vue-test-utils/releases)
- [Changelog](https://github.com/vuejs/vue-test-utils/blob/dev/packages/test-utils/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-test-utils/commits/v1.0.0/packages/test-utils)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-05 17:08:27 +00:00
dependabot-preview[bot]
63a9f24193 Merge pull request #433 from amir20/dependabot/npm_and_yarn/jest-26.0.1 2020-05-05 15:43:05 +00:00
dependabot-preview[bot]
fa37625f36 Bump jest from 26.0.0 to 26.0.1
Bumps [jest](https://github.com/facebook/jest) from 26.0.0 to 26.0.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v26.0.0...v26.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-05 15:37:27 +00:00
dependabot-preview[bot]
a73fda2a29 Merge pull request #432 from amir20/dependabot/npm_and_yarn/babel-jest-26.0.1 2020-05-05 14:53:57 +00:00
dependabot-preview[bot]
75c80bdc96 Bump babel-jest from 26.0.0 to 26.0.1
Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 26.0.0 to 26.0.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v26.0.1/packages/babel-jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-05 14:47:55 +00:00
dependabot-preview[bot]
2414a65371 Merge pull request #431 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001051 2020-05-05 06:14:30 +00:00
dependabot-preview[bot]
83ca9b0a89 Bump caniuse-lite from 1.0.30001050 to 1.0.30001051
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001050 to 1.0.30001051.
- [Release notes](https://github.com/ben-eb/caniuse-lite/releases)
- [Changelog](https://github.com/ben-eb/caniuse-lite/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ben-eb/caniuse-lite/compare/v1.0.30001050...v1.0.30001051)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-05 06:08:57 +00:00
dependabot-preview[bot]
6bceaee801 Merge pull request #430 from amir20/dependabot/npm_and_yarn/jest-26.0.0 2020-05-04 19:14:21 +00:00
dependabot-preview[bot]
70dfa399e4 Bump jest from 25.5.4 to 26.0.0
Bumps [jest](https://github.com/facebook/jest) from 25.5.4 to 26.0.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.5.4...v26.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-04 19:08:23 +00:00
dependabot-preview[bot]
8e89aa7a28 Merge pull request #429 from amir20/dependabot/npm_and_yarn/babel-jest-26.0.0 2020-05-04 19:06:26 +00:00
dependabot-preview[bot]
9a1938c071 Bump babel-jest from 25.5.1 to 26.0.0
Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 25.5.1 to 26.0.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v26.0.0/packages/babel-jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-04 19:00:44 +00:00
dependabot-preview[bot]
7e150daac7 Merge pull request #428 from amir20/dependabot/go_modules/github.com/sirupsen/logrus-1.6.0 2020-05-04 13:23:23 +00:00
dependabot-preview[bot]
3386dd3af9 Bump github.com/sirupsen/logrus from 1.5.0 to 1.6.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.5.0...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-04 13:17:15 +00:00
dependabot-preview[bot]
293a03153c Merge pull request #427 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001050 2020-05-04 06:57:00 +00:00
dependabot-preview[bot]
092fa34e1a Bump caniuse-lite from 1.0.30001049 to 1.0.30001050
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001049 to 1.0.30001050.
- [Release notes](https://github.com/ben-eb/caniuse-lite/releases)
- [Changelog](https://github.com/ben-eb/caniuse-lite/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ben-eb/caniuse-lite/compare/v1.0.30001049...v1.0.30001050)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-04 06:51:31 +00:00
dependabot-preview[bot]
20d42bf83c Merge pull request #426 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001049 2020-05-04 03:45:17 +00:00
dependabot-preview[bot]
a7ee8c6061 Bump caniuse-lite from 1.0.30001048 to 1.0.30001049
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001048 to 1.0.30001049.
- [Release notes](https://github.com/ben-eb/caniuse-lite/releases)
- [Changelog](https://github.com/ben-eb/caniuse-lite/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ben-eb/caniuse-lite/compare/v1.0.30001048...v1.0.30001049)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-04 03:40:19 +00:00
dependabot-preview[bot]
1afcedc3e3 Merge pull request #425 from amir20/dependabot/npm_and_yarn/release-it-13.5.8 2020-05-03 18:58:36 +00:00
dependabot-preview[bot]
8e49c76039 Bump release-it from 13.5.7 to 13.5.8
Bumps [release-it](https://github.com/release-it/release-it) from 13.5.7 to 13.5.8.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.5.7...13.5.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-03 18:53:37 +00:00
Amir Raminfar
c9599676c9 Adds target="_blank" rel="noopener" for settings 2020-05-02 19:20:54 -07:00
dependabot-preview[bot]
d547a4ca81 Merge pull request #424 from amir20/dependabot/npm_and_yarn/jest-25.5.4 2020-05-02 08:43:53 +00:00
dependabot-preview[bot]
f2764fad0c Bump jest from 25.5.3 to 25.5.4
Bumps [jest](https://github.com/facebook/jest) from 25.5.3 to 25.5.4.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.5.3...v25.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-02 08:39:04 +00:00
dependabot-preview[bot]
cf381dfc1a Merge pull request #423 from amir20/dependabot/npm_and_yarn/integration/jest-25.5.4 2020-05-02 08:30:56 +00:00
dependabot-preview[bot]
0806405099 Bump jest from 25.5.3 to 25.5.4 in /integration
Bumps [jest](https://github.com/facebook/jest) from 25.5.3 to 25.5.4.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.5.3...v25.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-02 08:26:08 +00:00
Amir Raminfar
d4f2b50a5e Updates readme 2020-05-01 18:57:08 -07:00
dependabot-preview[bot]
584166f80d Merge pull request #422 from amir20/dependabot/npm_and_yarn/lint-staged-10.2.2 2020-05-01 04:36:48 +00:00
dependabot-preview[bot]
23f5d5e4e7 Bump lint-staged from 10.2.1 to 10.2.2
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.2.1 to 10.2.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.2.1...v10.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 04:31:34 +00:00
dependabot-preview[bot]
57d0c70ad7 Merge pull request #421 from amir20/dependabot/npm_and_yarn/jest-25.5.3 2020-04-30 22:46:00 +00:00
dependabot-preview[bot]
d3e02e24c5 Bump jest from 25.5.2 to 25.5.3
Bumps [jest](https://github.com/facebook/jest) from 25.5.2 to 25.5.3.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.5.2...v25.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-30 22:40:47 +00:00
dependabot-preview[bot]
9fd2f387c5 Merge pull request #420 from amir20/dependabot/npm_and_yarn/integration/jest-25.5.3 2020-04-30 22:25:32 +00:00
dependabot-preview[bot]
2f71ef6063 Bump jest from 25.5.2 to 25.5.3 in /integration
Bumps [jest](https://github.com/facebook/jest) from 25.5.2 to 25.5.3.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.5.2...v25.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-30 22:20:40 +00:00
Amir Raminfar
1a7416d5c7 Release 1.22.8 2020-04-30 15:18:51 -07:00
Amir Raminfar
eec14bbe18 Revert to node 13 2020-04-30 15:18:36 -07:00
28 changed files with 4223 additions and 3610 deletions

View File

@@ -1,9 +1,8 @@
{
"presets": [["@babel/preset-env", { "modules": false }]],
"plugins": [["@babel/plugin-transform-runtime", { "regenerator": true }]],
"presets": [["env", { "modules": false }]],
"env": {
"test": {
"presets": [["@babel/preset-env", { "targets": { "node": "current" } }]]
"presets": [["env", { "targets": { "node": "current" } }]]
}
}
}

View File

@@ -1,3 +0,0 @@
module.exports = {
minifySvg: false,
};

View File

@@ -1,5 +1,5 @@
# Build assets
FROM node:14-alpine as node
FROM node:13-alpine as node
RUN apk add --no-cache git openssh python make g++ util-linux
@@ -10,16 +10,14 @@ COPY package*.json yarn.lock ./
RUN yarn install --network-timeout 1000000
# Copy config files
COPY .* ./
COPY .* webpack*.js ./
# Copy assets to build
COPY assets ./assets
# Do the build
RUN yarn build
FROM golang:1.14-alpine AS builder
RUN apk add --no-cache git ca-certificates

View File

@@ -6,11 +6,11 @@
# Dozzle - [dozzle.dev](https://dozzle.dev/)
Dozzle is a real-time log viewer for Docker. It's free. It's small. And it's in your browser.
Dozzle is a simple, lightweight application that provides you with a web based interface to monitor your Docker container logs live. It doesnt store log information, it is for live monitoring of your container logs only.
While dozzle should work for most, it is not meant to be a full logging solution. For enterprise use, I recommend you look at [Loggly](https://www.loggly.com), [Papertrail](https://papertrailapp.com) or [Kibana](https://www.elastic.co/products/kibana).
While dozzle should work for most, it is not meant to be a full logging solution. For enterprise applications, products like [Loggly](https://www.loggly.com), [Papertrail](https://papertrailapp.com) or [Kibana](https://www.elastic.co/products/kibana) are more suited.
But if you don't want to pay for these services, then Dozzle can help! Dozzle will be able to capture all logs from your containers and send them in real-time to your browser. Installation is also very easy. Dozzle is not a database. It does not store or save any logs. You can only see live logs while using Dozzle.
Dozzle doesn't cost any money. Dozzle aims to stay simple, small and free.
![Image](https://github.com/amir20/dozzle/blob/master/.github/demo.gif?raw=true)
@@ -90,9 +90,9 @@ Dozzle follows the [12-factor](https://12factor.net/) model. Configurations can
### Nginx Config
If you are using nginx as a reverse proxy, then you need to configure `/api` to enable server-sent events.
If you are using nginx as a reverse proxy, then you need to configure `/api` to enable server-sent events.
Below is an example configuration using SSL and `proxy_pass` with correct settings.
Below is an example configuration using SSL and `proxy_pass` with correct settings.
```
server {
@@ -141,4 +141,3 @@ To Build and test locally:
5. Install node modules with `npm install`.
6. Do `npm start`
Instructions for Github actions can be found [here](.github/goreleaser/Dockerfile) which build and tests Dozzle.

View File

@@ -39,14 +39,16 @@ HTTP/1.1 200 OK
Connection: close
Cache-Control: no-cache
Connection: keep-alive
Content-Type: text/event-stream
Content-Type: text/event-stream
X-Accel-Buffering: no
/* snapshot: Test_handler_streamEvents_error_request */
HTTP/1.1 200 OK
Connection: close
Cache-Control: no-cache
Connection: keep-alive
Content-Type: text/event-stream
Content-Type: text/event-stream
X-Accel-Buffering: no
/* snapshot: Test_handler_streamEvents_happy */
HTTP/1.1 200 OK
@@ -54,6 +56,7 @@ Connection: close
Cache-Control: no-cache
Connection: keep-alive
Content-Type: text/event-stream
X-Accel-Buffering: no
event: containers-changed
data: start
@@ -71,7 +74,8 @@ HTTP/1.1 200 OK
Connection: close
Cache-Control: no-cache
Connection: keep-alive
Content-Type: text/event-stream
Content-Type: text/event-stream
X-Accel-Buffering: no
/* snapshot: Test_handler_streamLogs_happy */
HTTP/1.1 200 OK
@@ -79,5 +83,6 @@ Connection: close
Cache-Control: no-cache
Connection: keep-alive
Content-Type: text/event-stream
X-Accel-Buffering: no
data: INFO Testing logs...

View File

@@ -32,11 +32,6 @@ describe("<App />", () => {
});
});
test("is a Vue instance", async () => {
const wrapper = shallowMount(App, { stubs, store, localVue });
expect(wrapper.isVueInstance()).toBeTruthy();
});
test("has right title", async () => {
const wrapper = shallowMount(App, { stubs, store, localVue });
await wrapper.vm.$nextTick();

View File

@@ -1,12 +1,11 @@
<template>
<svg class="icomoon" :class="['icon-' + name]">
<use :href="'#icon-' + name"></use>
<template functional>
<svg class="icomoon" :class="['icon-' + props.name]">
<use :href="'#icon-' + props.name"></use>
</svg>
</template>
<script>
export default {
functional: true,
props: {
name: {
required: true,

View File

@@ -55,11 +55,6 @@ describe("<LogEventSource />", () => {
});
}
test("is a Vue instance", async () => {
const wrapper = shallowMount(LogEventSource);
expect(wrapper.isVueInstance()).toBeTruthy();
});
test("renders correctly", async () => {
const wrapper = createLogEventSource();
expect(wrapper.element).toMatchInlineSnapshot(`
@@ -126,7 +121,7 @@ describe("<LogEventSource />", () => {
const wrapper = createLogEventSource();
sources["/api/logs/stream?id=abc"].emitOpen();
sources["/api/logs/stream?id=abc"].emitMessage({ data: `2019-06-12T10:55:42.459034602Z "This is a message."` });
const [message, _] = wrapper.find(LogViewer).vm.messages;
const [message, _] = wrapper.findComponent(LogViewer).vm.messages;
const { key, ...messageWithoutKey } = message;

View File

@@ -30,6 +30,7 @@ export default {
if (this.es) {
this.es.close();
this.messages = [];
this.buffer = [];
this.es = null;
}
this.es = new EventSource(`${BASE_PATH}/api/logs/stream?id=${this.id}`);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

5
assets/favicon.svg Normal file
View File

@@ -0,0 +1,5 @@
<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="128" height="128" rx="6" fill="#222222"/>
<path d="M82.3248 94.3863H123V104.093H67.8025V95.3506L106.164 44.3736H68.3808V34.5382H121.072V42.9594L82.3248 94.3863Z" fill="#FFDD57"/>
<path d="M8 107.107L17.5656 14L43.8372 16.7013C51.9339 17.5338 58.9091 20.0604 64.7629 24.2812C70.6166 28.5019 74.8873 34.0893 77.5749 41.0432C80.3052 48.0016 81.2514 55.7674 80.4137 64.3407L79.8027 70.2877C78.9005 79.0698 76.4053 86.5894 72.3173 92.8468C68.2719 99.1084 62.914 103.684 56.2436 106.574C49.6158 109.468 42.1213 110.529 33.7602 109.755L8 107.107ZM28.8005 25.3655L21.3043 98.3288L34.2164 99.6565C43.6767 100.629 51.3299 98.4435 57.1758 93.0993C63.0644 87.7595 66.5671 79.6542 67.684 68.7832L68.2424 63.3477C69.3286 52.7752 67.6788 44.3123 63.293 37.9592C58.9542 31.5678 52.2295 27.8607 43.1188 26.8377L28.8005 25.3655Z" fill="#FFDD57"/>
</svg>

After

Width:  |  Height:  |  Size: 949 B

View File

@@ -4,10 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Dozzle</title>
<link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Gafata" rel="stylesheet" />
<link rel="manifest" href="manifest.webmanifest" />
<link href="styles.scss" rel="stylesheet" />
<link rel="icon" href="favicon.ico" />
<link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Gafata" rel="stylesheet" />
<script>
window["BASE_PATH"] = "{{ .Base }}";
window["VERSION"] = "{{ .Version }}";
@@ -69,6 +66,5 @@
</defs>
</svg>
<div id="app"></div>
<script src="main.js"></script>
</body>
</html>

View File

@@ -1,9 +0,0 @@
{
"name": "Dozzle Log Viewer",
"short_name": "Dozzle",
"theme_color": "#111111",
"background_color": "#111111",
"display": "standalone",
"scope": "/",
"start_url": "/"
}

View File

@@ -2,11 +2,6 @@ import { shallowMount } from "@vue/test-utils";
import Index from "./Index";
describe("<Index />", () => {
test("is a Vue instance", () => {
const wrapper = shallowMount(Index);
expect(wrapper.isVueInstance()).toBeTruthy();
});
test("renders correctly", () => {
const wrapper = shallowMount(Index);
expect(wrapper.element).toMatchSnapshot();

View File

@@ -10,7 +10,7 @@
>.
<span v-if="hasUpdate">
New version is available! Update to
<a :href="nextRelease.html_url" class="next-release">{{ nextRelease.name }}</a
<a :href="nextRelease.html_url" class="next-release" target="_blank" rel="noopener">{{ nextRelease.name }}</a
>.
</span>
</div>
@@ -46,7 +46,12 @@
<span class="is-capitalized">{{ size }}</span>
<span class="icon"><icon name="chevron-down"></icon></span>
</button>
<b-dropdown-item :value="value" aria-role="listitem" v-for="value in ['small', 'medium', 'large']">
<b-dropdown-item
:value="value"
aria-role="listitem"
v-for="value in ['small', 'medium', 'large']"
:key="value"
>
<div class="media">
<span class="icon keep-size">
<icon name="check" v-if="value == size"></icon>

2
go.mod
View File

@@ -34,7 +34,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/rogpeppe/go-internal v1.5.2 // indirect
github.com/sergi/go-diff v1.0.0 // indirect
github.com/sirupsen/logrus v1.5.0
github.com/sirupsen/logrus v1.6.0
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect

4
go.sum
View File

@@ -131,6 +131,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
@@ -204,6 +206,8 @@ github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.5.0 h1:1N5EYkVAPEywqZRJd7cwnRtCb6xJx7NH3T3WUTF980Q=
github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo=
github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=

View File

@@ -1,6 +1,6 @@
FROM amir20/docker-alpine-puppeteer:edge
COPY --chown=pptruser:pptruser package*.json /app/
COPY --chown=pptruser:pptruser package*.json yarn.lock /app/
RUN yarn
COPY --chown=pptruser:pptruser . /app/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -7,11 +7,11 @@ services:
environment:
- DOZZLE_FILTER=name=dozzle
build:
context: ..
context: ..
integration:
build:
context: .
command: npm test
command: yarn test
environment:
- BASE=http://dozzle:8080/
depends_on:

View File

@@ -8,9 +8,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"jest": "^25.2.6",
"jest": "^26.0.1",
"jest-image-snapshot": "^3.0.1",
"puppeteer": "^2.1.1"
"puppeteer": "^3.0.4"
},
"jest": {
"preset": "jest-puppeteer",

File diff suppressed because it is too large Load Diff

13
jest.config.js Normal file
View File

@@ -0,0 +1,13 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ["js", "json", "vue"],
coveragePathIgnorePatterns: ["node_modules"],
testPathIgnorePatterns: ["node_modules", "<rootDir>/integration/"],
transformIgnorePatterns: ["node_modules"],
watchPathIgnorePatterns: ["<rootDir>/node_modules/"],
snapshotSerializers: ["jest-serializer-vue"],
transform: {
".*\\.vue$": "vue-jest",
"^.+\\.js$": "babel-jest",
},
};

View File

@@ -1,14 +1,14 @@
{
"name": "dozzle",
"version": "1.22.7",
"version": "1.23.0",
"description": "Realtime log viewer for docker containers. ",
"scripts": {
"prestart": "npm run clean",
"start": "concurrently 'npm run watch-server' 'npm run watch-assets'",
"watch-assets": "npx parcel watch --no-source-maps --public-url '__BASE__' assets/index.html -d static",
"watch-assets": "webpack --mode=development --watch",
"watch-server": "reflex -c .reflex",
"prebuild": "npm run clean",
"build": "npx parcel build --no-source-maps --public-url '__BASE__' assets/index.html -d static",
"build": "yarn webpack --mode=production",
"clean": "rm -rf static/ a_main-packr.go",
"release": "release-it",
"test": "jest",
@@ -28,8 +28,7 @@
"ansi-to-html": "^0.6.14",
"buefy": "^0.8.17",
"bulma": "^0.8.2",
"caniuse-lite": "^1.0.30001048",
"date-fns": "^2.12.0",
"date-fns": "^2.13.0",
"hotkeys-js": "^3.7.6",
"lodash.debounce": "^4.0.8",
"semver": "^7.3.2",
@@ -44,24 +43,39 @@
"@babel/core": "^7.9.6",
"@babel/plugin-transform-runtime": "^7.9.6",
"@vue/component-compiler-utils": "^3.1.2",
"@vue/test-utils": "^1.0.0-beta.33",
"@vue/test-utils": "^1.0.2",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^25.5.1",
"babel-jest": "^26.0.1",
"babel-loader": "^8.1.0",
"babel-preset-env": "^1.7.0",
"caniuse-lite": "^1.0.30001053",
"concurrently": "^5.2.0",
"css-loader": "^3.5.3",
"eventsourcemock": "^2.0.0",
"html-webpack-plugin": "^4.3.0",
"husky": "^4.2.5",
"jest": "^25.5.2",
"jest": "^26.0.1",
"jest-serializer-vue": "^2.0.2",
"lint-staged": "^10.2.1",
"lint-staged": "^10.2.2",
"mini-css-extract-plugin": "^0.9.0",
"mockdate": "^2.0.5",
"node-fetch": "^2.6.0",
"parcel-bundler": "^1.12.4",
"postcss-cssnext": "^3.1.0",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"prettier": "^2.0.5",
"release-it": "^13.5.7",
"release-it": "^13.5.8",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-hot-reload-api": "^2.3.4",
"vue-jest": "^3.0.5",
"vue-template-compiler": "^2.6.11"
"vue-loader": "^15.9.2",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-manifest-plugin": "^2.2.0",
"webpack-pwa-manifest": "^4.2.0"
},
"husky": {
"hooks": {
@@ -73,40 +87,6 @@
"prettier --write"
]
},
"browserslist": [
">5%"
],
"alias": {
"vue": "./node_modules/vue/dist/vue.runtime.esm.js"
},
"jest": {
"clearMocks": true,
"moduleFileExtensions": [
"js",
"json",
"vue"
],
"coveragePathIgnorePatterns": [
"node_modules"
],
"testPathIgnorePatterns": [
"node_modules",
"<rootDir>/integration/"
],
"transformIgnorePatterns": [
"node_modules"
],
"watchPathIgnorePatterns": [
"<rootDir>/node_modules/"
],
"snapshotSerializers": [
"jest-serializer-vue"
],
"transform": {
".*\\.vue$": "vue-jest",
".+\\.js$": "babel-jest"
}
},
"release-it": {
"github": {
"release": true

View File

@@ -6,7 +6,6 @@ import (
"html/template"
"net/http"
"runtime"
"strings"
"time"
log "github.com/sirupsen/logrus"
@@ -21,7 +20,6 @@ func (h *handler) index(w http.ResponseWriter, req *http.Request) {
if err != nil {
panic(err)
}
text = strings.Replace(text, "__BASE__", "{{ .Base }}", -1)
tmpl, err := template.New("index.html").Parse(text)
if err != nil {
panic(err)
@@ -94,7 +92,8 @@ func (h *handler) streamLogs(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/event-stream")
w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("Connection", "keep-alive")
w.Header().Set("Transfer-Encoding", "chunked")
w.Header().Set("X-Accel-Buffering", "no")
log.Debugf("Starting to stream logs for %s", id)
Loop:
@@ -129,7 +128,7 @@ func (h *handler) streamEvents(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/event-stream")
w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("Connection", "keep-alive")
w.Header().Set("Transfer-Encoding", "chunked")
w.Header().Set("X-Accel-Buffering", "no")
ctx := r.Context()
messages, err := h.client.Events(ctx)

77
webpack.config.js Normal file
View File

@@ -0,0 +1,77 @@
const path = require("path");
const { VueLoaderPlugin } = require("vue-loader");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const WebpackPwaManifest = require("webpack-pwa-manifest");
module.exports = {
stats: { children: false, entrypoints: false, modules: false },
performance: {
maxAssetSize: 350000,
maxEntrypointSize: 570000,
},
entry: ["./assets/main.js", "./assets/styles.scss"],
output: {
path: path.resolve(__dirname, "./static"),
filename: "[name].js",
publicPath: "{{ .Base }}",
},
module: {
rules: [
{
test: /\.vue$/,
loader: "vue-loader",
},
{
test: /\.(sass|scss|css)$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: "css-loader",
query: {
importLoaders: 1,
},
},
{
loader: "postcss-loader",
options: {
ident: "postcss",
plugins: (loader) => [
require("postcss-import")(),
require("postcss-cssnext")({
features: {
customProperties: { warnings: false },
},
}),
],
},
},
"sass-loader",
],
},
],
},
plugins: [
new VueLoaderPlugin(),
new MiniCssExtractPlugin(),
new HtmlWebpackPlugin({
hash: true,
template: "assets/index.ejs",
scriptLoading: "defer",
favicon: "assets/favicon.svg",
}),
new WebpackPwaManifest({
name: "Dozzle Log Viewer",
short_name: "Dozzle",
theme_color: "#222",
background_color: "#222",
display: "standalone",
}),
],
resolve: {
alias: {
vue$: "vue/dist/vue.runtime.esm.js",
},
extensions: ["*", ".js", ".vue", ".json"],
},
};

6223
yarn.lock

File diff suppressed because it is too large Load Diff