Compare commits

...

112 Commits

Author SHA1 Message Date
Amir Raminfar
f88e77215c Release 3.2.2 2021-01-21 13:56:33 -08:00
Amir Raminfar
7f6a6a03c0 Fixes possible goroutine leak 2021-01-21 10:50:09 -08:00
dependabot-preview[bot]
21561b40b0 Merge pull request #948 from amir20/dependabot/npm_and_yarn/sass-1.32.5 2021-01-21 12:22:02 +00:00
dependabot-preview[bot]
2145f66237 Bump sass from 1.32.4 to 1.32.5
Bumps [sass](https://github.com/sass/dart-sass) from 1.32.4 to 1.32.5.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.32.4...1.32.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-21 12:16:48 +00:00
dependabot-preview[bot]
ba2b381964 Merge pull request #950 from amir20/dependabot/npm_and_yarn/postcss-loader-4.2.0 2021-01-21 12:14:52 +00:00
dependabot-preview[bot]
30faba9e1d Bump postcss-loader from 4.1.0 to 4.2.0
Bumps [postcss-loader](https://github.com/webpack-contrib/postcss-loader) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/webpack-contrib/postcss-loader/releases)
- [Changelog](https://github.com/webpack-contrib/postcss-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/postcss-loader/compare/v4.1.0...v4.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-21 12:09:42 +00:00
dependabot-preview[bot]
f4152df06f Merge pull request #947 from amir20/dependabot/npm_and_yarn/webpack-5.16.0 2021-01-21 09:10:50 +00:00
dependabot-preview[bot]
2dde844318 Bump webpack from 5.15.0 to 5.16.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.15.0 to 5.16.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.15.0...v5.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-21 09:05:32 +00:00
dependabot-preview[bot]
59b3447854 Merge pull request #949 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001179 2021-01-21 09:03:37 +00:00
dependabot-preview[bot]
241fb8f1b3 Bump caniuse-lite from 1.0.30001178 to 1.0.30001179
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001178 to 1.0.30001179.
- [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.30001178...v1.0.30001179)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-21 08:58:35 +00:00
Amir Raminfar
1747efbd12 Removes built with 2021-01-20 16:40:42 -08:00
Amir Raminfar
289d3845a8 Only enables pprof when debugging is enabled 2021-01-20 15:54:14 -08:00
Amir Raminfar
5f0c384b86 rebases master 2021-01-20 15:39:51 -08:00
Amir Raminfar
f306da7ef8 Adds pprof 2021-01-20 15:39:51 -08:00
Amir Raminfar
928884815b Tidy up mod 2021-01-20 15:39:38 -08:00
dependabot-preview[bot]
95dd9ae6f9 Merge pull request #946 from amir20/dependabot/npm_and_yarn/autoprefixer-10.2.3 2021-01-19 19:39:17 +00:00
dependabot-preview[bot]
88167d10bf Bump autoprefixer from 10.2.1 to 10.2.3
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.2.1 to 10.2.3.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.2.1...10.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-19 19:33:55 +00:00
dependabot-preview[bot]
cf8f07fa41 Merge pull request #945 from amir20/dependabot/npm_and_yarn/hotkeys-js-3.8.2 2021-01-19 13:32:39 +00:00
dependabot-preview[bot]
acfe74ce95 Bump hotkeys-js from 3.8.1 to 3.8.2
Bumps [hotkeys-js](https://github.com/jaywcjlove/hotkeys) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/jaywcjlove/hotkeys/releases)
- [Commits](https://github.com/jaywcjlove/hotkeys/commits/v3.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-19 13:29:07 +00:00
dependabot-preview[bot]
015fb38b46 Merge pull request #944 from amir20/dependabot/npm_and_yarn/webpack-cli-4.4.0 2021-01-19 11:37:15 +00:00
dependabot-preview[bot]
ce7d734672 Bump webpack-cli from 4.3.1 to 4.4.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.3.1 to 4.4.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.3.1...webpack-cli@4.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-19 11:32:19 +00:00
dependabot-preview[bot]
98b88c2857 Merge pull request #943 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001178 2021-01-17 06:42:05 +00:00
dependabot-preview[bot]
3c0a56e709 Bump caniuse-lite from 1.0.30001177 to 1.0.30001178
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001177 to 1.0.30001178.
- [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.30001177...v1.0.30001178)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-17 06:37:25 +00:00
dependabot-preview[bot]
f4be8d327d Merge pull request #942 from amir20/dependabot/npm_and_yarn/webpack-5.15.0 2021-01-15 17:19:55 +00:00
dependabot-preview[bot]
0979916707 Bump webpack from 5.14.0 to 5.15.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.14.0 to 5.15.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.14.0...v5.15.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-15 17:13:49 +00:00
dependabot-preview[bot]
038351c373 Merge pull request #941 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001177 2021-01-14 09:03:17 +00:00
dependabot-preview[bot]
0004844ace Bump caniuse-lite from 1.0.30001176 to 1.0.30001177
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001176 to 1.0.30001177.
- [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.30001176...v1.0.30001177)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-14 08:58:21 +00:00
dependabot-preview[bot]
8e0cdfcf20 Merge pull request #940 from amir20/dependabot/npm_and_yarn/webpack-5.14.0 2021-01-14 00:04:56 +00:00
dependabot-preview[bot]
4eefe46a93 Bump webpack from 5.13.0 to 5.14.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.13.0 to 5.14.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.13.0...v5.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-13 23:58:58 +00:00
dependabot-preview[bot]
3332b4183c Merge pull request #939 from amir20/dependabot/npm_and_yarn/webpack-dev-server-3.11.2 2021-01-13 15:43:37 +00:00
dependabot-preview[bot]
0213333722 Bump webpack-dev-server from 3.11.1 to 3.11.2
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.11.1 to 3.11.2.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/v3.11.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.11.1...v3.11.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-13 15:37:40 +00:00
dependabot-preview[bot]
a4fa1b784b Merge pull request #938 from amir20/dependabot/npm_and_yarn/mini-css-extract-plugin-1.3.4 2021-01-13 15:10:48 +00:00
dependabot-preview[bot]
4f62a01a33 Bump mini-css-extract-plugin from 1.3.3 to 1.3.4
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.3...v1.3.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-13 15:04:57 +00:00
dependabot-preview[bot]
a6f63662e4 Merge pull request #937 from amir20/dependabot/go_modules/github.com/stretchr/testify-1.7.0 2021-01-13 13:32:16 +00:00
dependabot-preview[bot]
436998faf3 Bump github.com/stretchr/testify from 1.6.1 to 1.7.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.6.1...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-13 13:27:31 +00:00
dependabot-preview[bot]
5d18ed435a Merge pull request #936 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001176 2021-01-13 08:08:37 +00:00
dependabot-preview[bot]
decbccf7fa Bump caniuse-lite from 1.0.30001174 to 1.0.30001176
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001174 to 1.0.30001176.
- [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.30001174...v1.0.30001176)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-13 08:03:12 +00:00
dependabot-preview[bot]
79d9a2db83 Merge pull request #935 from amir20/dependabot/npm_and_yarn/sass-1.32.4 2021-01-12 02:12:58 +00:00
dependabot-preview[bot]
3792ac517a Bump sass from 1.32.3 to 1.32.4
Bumps [sass](https://github.com/sass/dart-sass) from 1.32.3 to 1.32.4.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.32.3...1.32.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-12 02:07:49 +00:00
dependabot-preview[bot]
aef3d37342 Merge pull request #934 from amir20/dependabot/npm_and_yarn/sass-1.32.3 2021-01-12 00:39:55 +00:00
dependabot-preview[bot]
c71f2f6618 Bump sass from 1.32.2 to 1.32.3
Bumps [sass](https://github.com/sass/dart-sass) from 1.32.2 to 1.32.3.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.32.2...1.32.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-12 00:34:24 +00:00
dependabot-preview[bot]
a6e4a67cfe Merge pull request #933 from amir20/dependabot/npm_and_yarn/webpack-5.13.0 2021-01-11 22:41:30 +00:00
dependabot-preview[bot]
a72ff78050 Bump webpack from 5.12.3 to 5.13.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.12.3 to 5.13.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.12.3...v5.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-11 22:36:07 +00:00
dependabot-preview[bot]
b26d281135 Merge pull request #932 from amir20/dependabot/npm_and_yarn/sass-loader-10.1.1 2021-01-11 14:29:51 +00:00
dependabot-preview[bot]
fca3672a74 Bump sass-loader from 10.1.0 to 10.1.1
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 10.1.0 to 10.1.1.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v10.1.0...v10.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-11 14:27:37 +00:00
dependabot-preview[bot]
df8bc2694c Merge pull request #931 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001174 2021-01-10 21:52:10 +00:00
dependabot-preview[bot]
069eee0db1 Bump caniuse-lite from 1.0.30001173 to 1.0.30001174
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001173 to 1.0.30001174.
- [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.30001173...v1.0.30001174)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-10 21:46:10 +00:00
dependabot-preview[bot]
87c0aaab19 Merge pull request #930 from amir20/dependabot/npm_and_yarn/webpack-5.12.3 2021-01-10 18:59:28 +00:00
dependabot-preview[bot]
b594ebdea4 Bump webpack from 5.12.2 to 5.12.3
Bumps [webpack](https://github.com/webpack/webpack) from 5.12.2 to 5.12.3.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.12.2...v5.12.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-10 18:53:33 +00:00
dependabot-preview[bot]
113adc0ac3 Merge pull request #929 from amir20/dependabot/npm_and_yarn/postcss-8.2.4 2021-01-09 10:37:24 +00:00
dependabot-preview[bot]
8893643841 Bump postcss from 8.2.3 to 8.2.4
Bumps [postcss](https://github.com/postcss/postcss) from 8.2.3 to 8.2.4.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.2.3...8.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-09 10:32:42 +00:00
dependabot-preview[bot]
fd141d0deb Merge pull request #928 from amir20/dependabot/npm_and_yarn/webpack-5.12.2 2021-01-09 08:45:31 +00:00
dependabot-preview[bot]
c52a3f65f4 Bump webpack from 5.12.1 to 5.12.2
Bumps [webpack](https://github.com/webpack/webpack) from 5.12.1 to 5.12.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.12.1...v5.12.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-09 08:39:52 +00:00
dependabot-preview[bot]
7349f8ff20 Merge pull request #927 from amir20/dependabot/npm_and_yarn/webpack-5.12.1 2021-01-08 16:01:00 +00:00
dependabot-preview[bot]
47e11e9627 Bump webpack from 5.12.0 to 5.12.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.12.0 to 5.12.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.12.0...v5.12.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-08 15:55:29 +00:00
dependabot-preview[bot]
c9abae77cc Merge pull request #926 from amir20/dependabot/npm_and_yarn/webpack-5.12.0 2021-01-08 13:10:39 +00:00
dependabot-preview[bot]
17024fb3f5 Bump webpack from 5.11.1 to 5.12.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.11.1 to 5.12.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.11.1...v5.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-08 13:05:19 +00:00
dependabot-preview[bot]
5d2f505ba1 Merge pull request #925 from amir20/dependabot/npm_and_yarn/autoprefixer-10.2.1 2021-01-08 01:52:27 +00:00
dependabot-preview[bot]
1065367be8 Bump autoprefixer from 10.2.0 to 10.2.1
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.2.0 to 10.2.1.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.2.0...10.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-08 01:46:54 +00:00
dependabot-preview[bot]
2d4257b557 Merge pull request #924 from amir20/dependabot/npm_and_yarn/postcss-8.2.3 2021-01-07 12:16:19 +00:00
dependabot-preview[bot]
1a8babde4c Bump postcss from 8.2.2 to 8.2.3
Bumps [postcss](https://github.com/postcss/postcss) from 8.2.2 to 8.2.3.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.2.2...8.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-07 12:10:57 +00:00
dependabot-preview[bot]
7f0e452405 Merge pull request #923 from amir20/dependabot/npm_and_yarn/sass-1.32.2 2021-01-07 00:13:24 +00:00
dependabot-preview[bot]
12c045f36c Bump sass from 1.32.1 to 1.32.2
Bumps [sass](https://github.com/sass/dart-sass) from 1.32.1 to 1.32.2.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.32.1...1.32.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-07 00:08:09 +00:00
dependabot-preview[bot]
a08e2e138a Merge pull request #922 from amir20/dependabot/npm_and_yarn/sass-1.32.1 2021-01-06 21:54:35 +00:00
dependabot-preview[bot]
902f3de319 Bump sass from 1.32.0 to 1.32.1
Bumps [sass](https://github.com/sass/dart-sass) from 1.32.0 to 1.32.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.32.0...1.32.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-06 21:48:58 +00:00
Amir Raminfar
398db90f2a Release 3.2.1 2021-01-06 11:00:09 -08:00
dependabot-preview[bot]
d8b9019114 Merge pull request #921 from amir20/dependabot/npm_and_yarn/autoprefixer-10.2.0 2021-01-06 02:32:45 +00:00
dependabot-preview[bot]
6027012548 Bump autoprefixer from 10.1.0 to 10.2.0
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.1.0...10.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-06 02:27:13 +00:00
Amir Raminfar
4d4d8f549f Adds html5 download and changes mimetype 2021-01-05 16:59:51 -08:00
Amir Raminfar
72fabbb3fa Cleans up go.mod 2021-01-05 13:53:49 -08:00
dependabot-preview[bot]
fba244144c Merge pull request #919 from amir20/dependabot/go_modules/github.com/docker/docker-20.10.2incompatible 2021-01-05 13:27:02 +00:00
dependabot-preview[bot]
c5c04ed9b5 Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.1+incompatible to 20.10.2+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.1...v20.10.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-05 13:21:39 +00:00
Amir Raminfar
7e2e75fcd2 Cleans up go code 2021-01-04 20:07:28 -08:00
Amir Raminfar
89144ff61f Release 3.2.0 2021-01-04 11:26:21 -08:00
dependabot-preview[bot]
b66e959abf Merge pull request #918 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001173 2021-01-04 09:27:52 +00:00
dependabot-preview[bot]
1164909c8f Bump caniuse-lite from 1.0.30001171 to 1.0.30001173
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001171 to 1.0.30001173.
- [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.30001171...v1.0.30001173)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-04 09:22:51 +00:00
Amir Raminfar
30fcf42bd7 Reverts subtractions 2021-01-03 17:31:46 -08:00
Amir Raminfar
911a4843c6 Subtracts 2 minutes from begenning of container 2021-01-03 17:24:55 -08:00
Amir Raminfar
5ba3d8df2f Fixes version test 2021-01-03 14:39:22 -08:00
Amir Raminfar
c362ef24fc Updates version route 2021-01-03 14:30:58 -08:00
Amir Raminfar
ac008519bc Add new functionality to download logs (#917) 2021-01-03 14:27:17 -08:00
Amir Raminfar
b87b0d018f Fixes error handeling for streaming 2021-01-03 13:44:36 -08:00
dependabot-preview[bot]
6dbbd78801 Merge pull request #916 from amir20/dependabot/npm_and_yarn/html-webpack-plugin-4.5.1 2021-01-03 17:46:42 +00:00
dependabot-preview[bot]
ebd9db4d00 Bump html-webpack-plugin from 4.5.0 to 4.5.1
Bumps [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/jantimon/html-webpack-plugin/releases)
- [Changelog](https://github.com/jantimon/html-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jantimon/html-webpack-plugin/compare/v4.5.0...v4.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-03 17:41:50 +00:00
Amir Raminfar
de15fcd74f Tries to user readers instead of channels (#915) 2021-01-02 19:25:52 -08:00
Amir Raminfar
246f06e1a5 Fixes formatting 2021-01-01 14:58:22 -08:00
Amir Raminfar
da2401bb89 Adds is-hidden-mobile for header 2021-01-01 14:50:47 -08:00
dependabot-preview[bot]
8d7f897e19 Merge pull request #913 from amir20/dependabot/npm_and_yarn/webpack-cli-4.3.1 2020-12-31 17:48:43 +00:00
dependabot-preview[bot]
76b506ad25 Bump webpack-cli from 4.3.0 to 4.3.1
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.3.0...webpack-cli@4.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-31 17:43:38 +00:00
dependabot-preview[bot]
5e21179d2e Merge pull request #912 from amir20/dependabot/npm_and_yarn/sass-1.32.0 2020-12-30 00:32:10 +00:00
dependabot-preview[bot]
619f23517c Bump sass from 1.30.0 to 1.32.0
Bumps [sass](https://github.com/sass/dart-sass) from 1.30.0 to 1.32.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.30.0...1.32.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-30 00:26:08 +00:00
dependabot-preview[bot]
0a40077c9a Merge pull request #911 from amir20/dependabot/npm_and_yarn/postcss-8.2.2 2020-12-29 21:06:08 +00:00
dependabot-preview[bot]
cf0b4a5896 Bump postcss from 8.2.1 to 8.2.2
Bumps [postcss](https://github.com/postcss/postcss) from 8.2.1 to 8.2.2.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.2.1...8.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-29 21:01:01 +00:00
dependabot-preview[bot]
22c2003794 Merge pull request #910 from amir20/dependabot/npm_and_yarn/webpack-dev-server-3.11.1 2020-12-29 13:47:45 +00:00
dependabot-preview[bot]
e05425e161 Bump webpack-dev-server from 3.11.0 to 3.11.1
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.11.0 to 3.11.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/v3.11.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.11.0...v3.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-29 13:42:37 +00:00
dependabot-preview[bot]
65e2000876 Merge pull request #909 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001171 2020-12-29 00:42:27 +00:00
dependabot-preview[bot]
138c5fd957 Bump caniuse-lite from 1.0.30001170 to 1.0.30001171
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001170 to 1.0.30001171.
- [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.30001170...v1.0.30001171)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-29 00:37:08 +00:00
dependabot-preview[bot]
5144cafa97 Merge pull request #908 from amir20/dependabot/npm_and_yarn/webpack-5.11.1 2020-12-28 18:44:09 +00:00
dependabot-preview[bot]
f7d4f41de4 Bump webpack from 5.11.0 to 5.11.1
Bumps [webpack](https://github.com/webpack/webpack) from 5.11.0 to 5.11.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.11.0...v5.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-28 18:38:34 +00:00
dependabot-preview[bot]
8ff8ce109b Merge pull request #907 from amir20/dependabot/npm_and_yarn/webpack-cli-4.3.0 2020-12-25 18:10:29 +00:00
dependabot-preview[bot]
6a0a3eb0fa Bump webpack-cli from 4.2.0 to 4.3.0
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.2.0...webpack-cli@4.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-25 18:05:48 +00:00
dependabot[bot]
3abdee6c2f Bump node-notifier from 8.0.0 to 8.0.1 in /integration (#906)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-22 07:25:21 -08:00
dependabot-preview[bot]
eeb9243118 Merge pull request #905 from amir20/dependabot/npm_and_yarn/node-notifier-8.0.1 2020-12-21 16:31:34 +00:00
dependabot-preview[bot]
b9b4cdbcd9 [Security] Bump node-notifier from 8.0.0 to 8.0.1
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1. **This update includes a security fix.**
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 16:25:43 +00:00
dependabot-preview[bot]
8d9abdb929 Merge pull request #904 from amir20/dependabot/npm_and_yarn/webpack-5.11.0 2020-12-21 13:19:49 +00:00
dependabot-preview[bot]
56dddc61ee Bump webpack from 5.10.3 to 5.11.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.10.3 to 5.11.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.10.3...v5.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-21 13:13:10 +00:00
dependabot-preview[bot]
5acd019994 Merge pull request #903 from amir20/dependabot/npm_and_yarn/caniuse-lite-1.0.30001170 2020-12-20 06:42:44 +00:00
dependabot-preview[bot]
ed7eab4e26 Bump caniuse-lite from 1.0.30001168 to 1.0.30001170
Bumps [caniuse-lite](https://github.com/ben-eb/caniuse-lite) from 1.0.30001168 to 1.0.30001170.
- [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.30001168...v1.0.30001170)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-20 06:37:23 +00:00
dependabot-preview[bot]
1b6ee569e5 Merge pull request #902 from amir20/dependabot/npm_and_yarn/dompurify-2.2.6 2020-12-18 15:28:22 +00:00
dependabot-preview[bot]
c76296ab02 Bump dompurify from 2.2.5 to 2.2.6
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/commits/2.2.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-18 15:22:52 +00:00
dependabot-preview[bot]
dac35f658c Merge pull request #901 from amir20/dependabot/npm_and_yarn/dompurify-2.2.5 2020-12-18 15:05:43 +00:00
dependabot-preview[bot]
7139d5ff63 Bump dompurify from 2.2.4 to 2.2.5
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.2.4 to 2.2.5.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/2.2.4...2.2.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-18 15:00:25 +00:00
15 changed files with 619 additions and 587 deletions

View File

@@ -1,13 +1,26 @@
<template>
<scrollable-view :scrollable="scrollable" v-if="container">
<template v-slot:header v-if="showTitle">
<div class="columns is-vcentered mr-0">
<div class="columns is-vcentered mr-0 is-hidden-mobile">
<div class="column is-narrow">
<container-title :value="container.name" @close="$emit('close')"></container-title>
</div>
<div class="column is-clipped">
<container-stat :stat="container.stat" :state="container.state"></container-stat>
</div>
<div class="column is-narrow">
<a
class="button is-small is-outlined"
id="download"
:href="`${base}/api/logs/download?id=${container.id}`"
download
>
<span class="icon">
<icon name="save"></icon>
</span>
Download
</a>
</div>
<div class="column is-narrow" v-if="closable">
<button class="delete is-medium" @click="$emit('close')"></button>
</div>
@@ -26,6 +39,8 @@ import LogViewerWithSource from "./LogViewerWithSource";
import ScrollableView from "./ScrollableView";
import ContainerTitle from "./ContainerTitle";
import ContainerStat from "./ContainerStat";
import Icon from "./Icon";
import config from "../store/config";
export default {
props: {
@@ -51,12 +66,16 @@ export default {
ScrollableView,
ContainerTitle,
ContainerStat,
Icon,
},
computed: {
...mapGetters(["allContainersById"]),
container() {
return this.allContainersById[this.id];
},
base() {
return config.base;
},
},
};
</script>
@@ -73,4 +92,16 @@ button.delete {
opacity: 1;
}
}
#download.button {
.icon {
margin-right: 5px;
height: 80%;
}
&:hover {
color: var(--primary-color);
border-color: var(--primary-color);
}
}
</style>

View File

@@ -124,9 +124,7 @@ describe("<LogEventSource />", () => {
describe("render html correctly", () => {
const RealDate = Date;
beforeAll(() => {
global.Date = class extends (
RealDate
) {
global.Date = class extends RealDate {
constructor(arg) {
if (arg) {
return new RealDate(arg);

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
<template> </template>
<template></template>
<script>
import { mapActions, mapGetters, mapState } from "vuex";

View File

@@ -1,10 +1,7 @@
package docker
import (
"bufio"
"bytes"
"context"
"encoding/binary"
"encoding/json"
"fmt"
"io"
@@ -37,9 +34,9 @@ type dockerProxy interface {
type Client interface {
ListContainers() ([]Container, error)
FindContainer(string) (Container, error)
ContainerLogs(context.Context, string, int, string) (<-chan string, <-chan error)
ContainerLogs(context.Context, string, int, string) (io.ReadCloser, error)
Events(context.Context) (<-chan ContainerEvent, <-chan error)
ContainerLogsBetweenDates(context.Context, string, time.Time, time.Time) ([]string, error)
ContainerLogsBetweenDates(context.Context, string, time.Time, time.Time) (io.ReadCloser, error)
ContainerStats(context.Context, string, chan<- ContainerStat) error
}
@@ -121,34 +118,6 @@ func (d *dockerClient) ListContainers() ([]Container, error) {
return containers, nil
}
func logReader(reader io.ReadCloser, tty bool) func() (string, error) {
if tty {
scanner := bufio.NewScanner(reader)
return func() (string, error) {
if scanner.Scan() {
return scanner.Text(), nil
}
return "", io.EOF
}
}
hdr := make([]byte, 8)
var buffer bytes.Buffer
return func() (string, error) {
buffer.Reset()
_, err := reader.Read(hdr)
if err != nil {
return "", err
}
count := binary.BigEndian.Uint32(hdr[4:])
_, err = io.CopyN(&buffer, reader, int64(count))
if err != nil {
return "", err
}
return buffer.String(), nil
}
}
func (d *dockerClient) ContainerStats(ctx context.Context, id string, stats chan<- ContainerStat) error {
response, err := d.cli.ContainerStats(ctx, id, true)
@@ -179,11 +148,15 @@ func (d *dockerClient) ContainerStats(ctx context.Context, id string, stats chan
)
if cpuPercent > 0 || memUsage > 0 {
stats <- ContainerStat{
select {
case <-ctx.Done():
return
case stats <- ContainerStat{
ID: id,
CPUPercent: cpuPercent,
MemoryPercent: memPercent,
MemoryUsage: memUsage,
}:
}
}
}
@@ -192,7 +165,7 @@ func (d *dockerClient) ContainerStats(ctx context.Context, id string, stats chan
return nil
}
func (d *dockerClient) ContainerLogs(ctx context.Context, id string, tailSize int, since string) (<-chan string, <-chan error) {
func (d *dockerClient) ContainerLogs(ctx context.Context, id string, tailSize int, since string) (io.ReadCloser, error) {
log.WithField("id", id).WithField("since", since).Debug("streaming logs for container")
options := types.ContainerLogsOptions{
@@ -203,42 +176,18 @@ func (d *dockerClient) ContainerLogs(ctx context.Context, id string, tailSize in
Timestamps: true,
Since: since,
}
reader, err := d.cli.ContainerLogs(ctx, id, options)
errChannel := make(chan error, 1)
reader, err := d.cli.ContainerLogs(ctx, id, options)
if err != nil {
errChannel <- err
close(errChannel)
return nil, errChannel
return nil, err
}
messages := make(chan string)
go func() {
<-ctx.Done()
reader.Close()
}()
containerJSON, err := d.cli.ContainerInspect(ctx, id)
if err != nil {
return nil, err
}
containerJSON, _ := d.cli.ContainerInspect(ctx, id)
go func() {
defer close(messages)
defer close(errChannel)
defer reader.Close()
nextEntry := logReader(reader, containerJSON.Config.Tty)
for {
line, err := nextEntry()
if err != nil {
errChannel <- err
break
}
select {
case messages <- line:
case <-ctx.Done():
}
}
}()
return messages, errChannel
return newLogReader(reader, containerJSON.Config.Tty), nil
}
func (d *dockerClient) Events(ctx context.Context) (<-chan ContainerEvent, <-chan error) {
@@ -267,7 +216,7 @@ func (d *dockerClient) Events(ctx context.Context) (<-chan ContainerEvent, <-cha
return messages, errors
}
func (d *dockerClient) ContainerLogsBetweenDates(ctx context.Context, id string, from time.Time, to time.Time) ([]string, error) {
func (d *dockerClient) ContainerLogsBetweenDates(ctx context.Context, id string, from time.Time, to time.Time) (io.ReadCloser, error) {
options := types.ContainerLogsOptions{
ShowStdout: true,
ShowStderr: true,
@@ -275,25 +224,17 @@ func (d *dockerClient) ContainerLogsBetweenDates(ctx context.Context, id string,
Since: strconv.FormatInt(from.Unix(), 10),
Until: strconv.FormatInt(to.Unix(), 10),
}
reader, _ := d.cli.ContainerLogs(ctx, id, options)
defer reader.Close()
containerJSON, _ := d.cli.ContainerInspect(ctx, id)
reader, err := d.cli.ContainerLogs(ctx, id, options)
nextEntry := logReader(reader, containerJSON.Config.Tty)
var messages []string
for {
line, err := nextEntry()
if err != nil {
if err == io.EOF {
break
} else {
return nil, err
}
}
messages = append(messages, line)
if err != nil {
return nil, err
}
return messages, nil
containerJSON, err := d.cli.ContainerInspect(ctx, id)
if err != nil {
return nil, err
}
return newLogReader(reader, containerJSON.Config.Tty), nil
}

View File

@@ -7,6 +7,7 @@ import (
"errors"
"io"
"io/ioutil"
"strings"
"testing"
"github.com/docker/docker/api/types"
@@ -132,13 +133,10 @@ func Test_dockerClient_ContainerLogs_happy(t *testing.T) {
proxy.On("ContainerInspect", mock.Anything, id).Return(json, nil)
client := &dockerClient{proxy, filters.NewArgs()}
messages, _ := client.ContainerLogs(context.Background(), id, 300, "since")
logReader, _ := client.ContainerLogs(context.Background(), id, 300, "since")
actual, _ := <-messages
assert.Equal(t, expected, actual, "message doesn't match expected")
_, ok := <-messages
assert.False(t, ok, "channel should have been closed")
actual, _ := ioutil.ReadAll(logReader)
assert.Equal(t, expected, string(actual), "message doesn't match expected")
proxy.AssertExpectations(t)
}
@@ -148,7 +146,7 @@ func Test_dockerClient_ContainerLogs_happy_with_tty(t *testing.T) {
proxy := new(mockedProxy)
expected := "INFO Testing logs..."
reader := ioutil.NopCloser(bytes.NewReader([]byte(expected)))
reader := ioutil.NopCloser(strings.NewReader(expected))
options := types.ContainerLogsOptions{ShowStdout: true, ShowStderr: true, Follow: true, Tail: "300", Timestamps: true}
proxy.On("ContainerLogs", mock.Anything, id, options).Return(reader, nil)
@@ -156,13 +154,11 @@ func Test_dockerClient_ContainerLogs_happy_with_tty(t *testing.T) {
proxy.On("ContainerInspect", mock.Anything, id).Return(json, nil)
client := &dockerClient{proxy, filters.NewArgs()}
messages, _ := client.ContainerLogs(context.Background(), id, 300, "")
logReader, _ := client.ContainerLogs(context.Background(), id, 300, "")
actual, _ := <-messages
assert.Equal(t, expected, actual, "message doesn't match expected")
actual, _ := ioutil.ReadAll(logReader)
assert.Equal(t, expected, string(actual), "message doesn't match expected")
_, ok := <-messages
assert.False(t, ok, "channel should have been closed")
proxy.AssertExpectations(t)
}
@@ -174,14 +170,10 @@ func Test_dockerClient_ContainerLogs_error(t *testing.T) {
client := &dockerClient{proxy, filters.NewArgs()}
messages, err := client.ContainerLogs(context.Background(), id, 300, "")
reader, err := client.ContainerLogs(context.Background(), id, 300, "")
assert.Nil(t, messages, "messages should be nil")
e, _ := <-err
assert.Error(t, e, "error should have been returned")
_, ok := <-err
assert.False(t, ok, "error channel should have been closed")
assert.Nil(t, reader, "reader should be nil")
assert.Error(t, err, "error should have been returned")
proxy.AssertExpectations(t)
}

49
docker/reader.go Normal file
View File

@@ -0,0 +1,49 @@
package docker
import (
"bytes"
"encoding/binary"
"io"
)
type logReader struct {
readerCloser io.ReadCloser
tty bool
lastHeader []byte
buffer bytes.Buffer
}
func newLogReader(reader io.ReadCloser, tty bool) io.ReadCloser {
return &logReader{
reader,
tty,
make([]byte, 8),
bytes.Buffer{},
}
}
func (r *logReader) Read(p []byte) (n int, err error) {
if r.tty {
return r.readerCloser.Read(p)
} else {
if r.buffer.Len() > 0 {
return r.buffer.Read(p)
} else {
r.buffer.Reset()
_, err := r.readerCloser.Read(r.lastHeader)
if err != nil {
return 0, err
}
count := binary.BigEndian.Uint32(r.lastHeader[4:])
_, err = io.CopyN(&r.buffer, r.readerCloser, int64(count))
if err != nil {
return 0, err
}
return r.buffer.Read(p)
}
}
}
func (r *logReader) Close() error {
return r.readerCloser.Close()
}

4
go.mod
View File

@@ -5,7 +5,7 @@ require (
github.com/beme/abide v0.0.0-20190723115211-635a09831760
github.com/containerd/containerd v1.4.3 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v20.10.1+incompatible
github.com/docker/docker v20.10.2+incompatible
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/dustin/go-humanize v1.0.0
@@ -32,7 +32,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20201216054612-986b41b23924 // indirect
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e // indirect
golang.org/x/text v0.3.4 // indirect

8
go.sum
View File

@@ -55,8 +55,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v20.10.1+incompatible h1:u0HIBLwOJdemyBdTCkoBX34u3lb5KyBo0rQE3a5Yg+E=
github.com/docker/docker v20.10.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v20.10.2+incompatible h1:vFgEHPqWBTp4pTjdLwjAA4bSo3gvIGOYwuJTlEjVBCw=
github.com/docker/docker v20.10.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
@@ -299,8 +299,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=

View File

@@ -2754,6 +2754,13 @@ lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.4:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
lru-cache@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
dependencies:
yallist "^4.0.0"
make-dir@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392"
@@ -2931,9 +2938,9 @@ node-modules-regexp@^1.0.0:
integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=
node-notifier@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.0.tgz#a7eee2d51da6d0f7ff5094bc7108c911240c1620"
integrity sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA==
version "8.0.1"
resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.1.tgz#f86e89bbc925f2b068784b31f382afdc6ca56be1"
integrity sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA==
dependencies:
growly "^1.3.0"
is-wsl "^2.2.0"
@@ -3485,9 +3492,11 @@ semver@^6.0.0, semver@^6.3.0:
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
semver@^7.3.2:
version "7.3.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
version "7.3.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
dependencies:
lru-cache "^6.0.0"
set-blocking@^2.0.0:
version "2.0.0"
@@ -4019,9 +4028,9 @@ uuid@^3.3.2:
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
uuid@^8.3.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea"
integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
v8-to-istanbul@^7.0.0:
version "7.0.0"
@@ -4189,6 +4198,11 @@ y18n@^4.0.0:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
yargs-parser@^18.1.2:
version "18.1.3"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"

View File

@@ -1,6 +1,6 @@
{
"name": "dozzle",
"version": "3.1.2",
"version": "3.2.2",
"description": "Realtime log viewer for docker containers. ",
"scripts": {
"prestart": "yarn clean",
@@ -32,8 +32,8 @@
"buefy": "^0.9.4",
"bulma": "^0.9.1",
"date-fns": "^2.16.1",
"dompurify": "^2.2.4",
"hotkeys-js": "^3.8.1",
"dompurify": "^2.2.6",
"hotkeys-js": "^3.8.2",
"lodash.debounce": "^4.0.8",
"lodash.throttle": "^4.1.1",
"semver": "^7.3.4",
@@ -49,34 +49,34 @@
"@babel/plugin-transform-runtime": "^7.12.10",
"@vue/component-compiler-utils": "^3.2.0",
"@vue/test-utils": "^1.1.2",
"autoprefixer": "^10.1.0",
"autoprefixer": "^10.2.3",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^26.6.3",
"babel-preset-env": "^1.7.0",
"caniuse-lite": "^1.0.30001168",
"caniuse-lite": "^1.0.30001179",
"css-loader": "^5.0.1",
"eventsourcemock": "^2.0.0",
"html-webpack-plugin": "^4.5.0",
"html-webpack-plugin": "^4.5.1",
"husky": "^5.0.6",
"jest": "^26.6.3",
"jest-serializer-vue": "^2.0.2",
"lint-staged": "^10.5.3",
"mini-css-extract-plugin": "^1.3.3",
"mini-css-extract-plugin": "^1.3.4",
"npm-run-all": "^4.1.5",
"postcss": "^8.2.1",
"postcss-loader": "^4.1.0",
"postcss": "^8.2.4",
"postcss-loader": "^4.2.0",
"prettier": "^2.2.1",
"release-it": "^14.2.2",
"sass": "^1.30.0",
"sass-loader": "^10.1.0",
"sass": "^1.32.5",
"sass-loader": "^10.1.1",
"vue-hot-reload-api": "^2.3.4",
"vue-jest": "^3.0.7",
"vue-loader": "^15.9.6",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.12",
"webpack": "^5.10.3",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.0",
"webpack": "^5.16.0",
"webpack-cli": "^4.4.0",
"webpack-dev-server": "^3.11.2",
"webpack-pwa-manifest": "^4.3.0"
},
"lint-staged": {

View File

@@ -81,12 +81,15 @@ X-Content-Type-Options: nosniff
error finding container
/* snapshot: Test_handler_streamLogs_error_reading */
HTTP/1.1 200 OK
HTTP/1.1 500 Internal Server Error
Connection: close
Cache-Control: no-cache
Connection: keep-alive
Content-Type: text/event-stream
X-Accel-Buffering: no
Content-Type: text/plain; charset=utf-8
X-Accel-Buffering: no
X-Content-Type-Options: nosniff
test error
/* snapshot: Test_handler_streamLogs_happy */
HTTP/1.1 200 OK
@@ -112,9 +115,6 @@ X-Accel-Buffering: no
event: container-stopped
data: end of stream
event: container-stopped
data: end of stream
/* snapshot: Test_handler_streamLogs_happy_with_id */
HTTP/1.1 200 OK
Connection: close

View File

@@ -1,13 +1,18 @@
package web
import (
"bufio"
"compress/gzip"
"context"
"encoding/json"
"fmt"
"html/template"
"io"
"net/http"
_ "net/http/pprof"
"runtime"
"strings"
"time"
"github.com/amir20/dozzle/docker"
@@ -52,10 +57,17 @@ func createRouter(h *handler) *mux.Router {
}
s := r.PathPrefix(base).Subrouter()
s.HandleFunc("/api/logs/stream", h.streamLogs)
s.HandleFunc("/api/logs/download", h.downloadLogs)
s.HandleFunc("/api/logs", h.fetchLogsBetweenDates)
s.HandleFunc("/api/events/stream", h.streamEvents)
s.HandleFunc("/version", h.version)
if log.IsLevelEnabled(log.DebugLevel) {
s.PathPrefix("/debug/pprof/").Handler(http.DefaultServeMux)
}
s.PathPrefix("/").Handler(http.StripPrefix(base, http.HandlerFunc(h.index)))
return r
}
@@ -103,11 +115,42 @@ func (h *handler) fetchLogsBetweenDates(w http.ResponseWriter, r *http.Request)
to, _ := time.Parse(time.RFC3339, r.URL.Query().Get("to"))
id := r.URL.Query().Get("id")
messages, _ := h.client.ContainerLogsBetweenDates(r.Context(), id, from, to)
reader, err := h.client.ContainerLogsBetweenDates(r.Context(), id, from, to)
defer reader.Close()
for _, m := range messages {
fmt.Fprintln(w, m)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
io.Copy(w, reader)
}
func (h *handler) downloadLogs(w http.ResponseWriter, r *http.Request) {
id := r.URL.Query().Get("id")
container, err := h.client.FindContainer(id)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
now := time.Now()
from := time.Unix(container.Created, 0)
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%v.log.gz", container.ID))
w.Header().Set("Content-Type", "application/gzip")
zw := gzip.NewWriter(w)
defer zw.Close()
zw.Name = fmt.Sprintf("%v.log", container.ID)
zw.Comment = "Logs generated by Dozzle"
zw.ModTime = now
reader, err := h.client.ContainerLogsBetweenDates(r.Context(), container.ID, from, now)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
io.Copy(zw, reader)
}
func (h *handler) streamLogs(w http.ResponseWriter, r *http.Request) {
@@ -123,45 +166,51 @@ func (h *handler) streamLogs(w http.ResponseWriter, r *http.Request) {
return
}
container, e := h.client.FindContainer(id)
if e != nil {
http.Error(w, e.Error(), http.StatusNotFound)
container, err := h.client.FindContainer(id)
if err != nil {
http.Error(w, err.Error(), http.StatusNotFound)
return
}
messages, err := h.client.ContainerLogs(r.Context(), container.ID, h.config.TailSize, r.Header.Get("Last-Event-ID"))
w.Header().Set("Content-Type", "text/event-stream")
w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("Connection", "keep-alive")
w.Header().Set("X-Accel-Buffering", "no")
Loop:
for {
select {
case message, ok := <-messages:
if !ok {
fmt.Fprintf(w, "event: container-stopped\ndata: end of stream\n\n")
break Loop
}
fmt.Fprintf(w, "data: %s\n", message)
if index := strings.IndexAny(message, " "); index != -1 {
id := message[:index]
if _, err := time.Parse(time.RFC3339Nano, id); err == nil {
fmt.Fprintf(w, "id: %s\n", id)
}
}
fmt.Fprintf(w, "\n")
reader, err := h.client.ContainerLogs(r.Context(), container.ID, h.config.TailSize, r.Header.Get("Last-Event-ID"))
if err != nil {
if err == io.EOF {
fmt.Fprintf(w, "event: container-stopped\ndata: end of stream\n\n")
f.Flush()
case e := <-err:
if e == io.EOF {
log.Debugf("container stopped: %v", container.ID)
fmt.Fprintf(w, "event: container-stopped\ndata: end of stream\n\n")
f.Flush()
} else {
log.Debugf("error while reading from log stream: %v", e)
break Loop
} else {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
return
}
defer reader.Close()
scanner := bufio.NewScanner(reader)
for scanner.Scan() {
message := scanner.Text()
fmt.Fprintf(w, "data: %s\n", message)
if index := strings.IndexAny(message, " "); index != -1 {
id := message[:index]
if _, err := time.Parse(time.RFC3339Nano, id); err == nil {
fmt.Fprintf(w, "id: %s\n", id)
}
}
fmt.Fprintf(w, "\n")
f.Flush()
}
log.Debugf("streaming stopped: %v", container.ID)
if scanner.Err() == nil {
log.Debugf("container stopped: %v", container.ID)
fmt.Fprintf(w, "event: container-stopped\ndata: end of stream\n\n")
f.Flush()
} else if scanner.Err() != context.Canceled {
log.Errorf("unknown error while streaming %v", scanner.Err())
}
log.WithField("routines", runtime.NumGoroutine()).Debug("runtime goroutine stats")
@@ -199,14 +248,14 @@ func (h *handler) streamEvents(w http.ResponseWriter, r *http.Request) {
for _, c := range containers {
if c.State == "running" {
if err := h.client.ContainerStats(ctx, c.ID, stats); err != nil {
log.Errorf("Error while streaming container stats: %v", err)
log.Errorf("error while streaming container stats: %v", err)
}
}
}
}
if err := sendContainersJSON(h.client, w); err != nil {
log.Errorf("Error while encoding containers to stream: %v", err)
log.Errorf("error while encoding containers to stream: %v", err)
}
f.Flush()
@@ -257,24 +306,25 @@ func (h *handler) streamEvents(w http.ResponseWriter, r *http.Request) {
}
func (h *handler) version(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, h.config.Version)
fmt.Fprintf(w, "%v", h.config.Version)
}
func sendContainersJSON(client docker.Client, w http.ResponseWriter) error {
if containers, err := client.ListContainers(); err != nil {
containers, err := client.ListContainers()
if err != nil {
return err
} else {
if _, err := fmt.Fprint(w, "event: containers-changed\ndata: "); err != nil {
return err
}
}
if err := json.NewEncoder(w).Encode(containers); err != nil {
return err
}
if _, err := fmt.Fprint(w, "event: containers-changed\ndata: "); err != nil {
return err
}
if _, err := fmt.Fprint(w, "\n\n"); err != nil {
return err
}
if err := json.NewEncoder(w).Encode(containers); err != nil {
return err
}
if _, err := fmt.Fprint(w, "\n\n"); err != nil {
return err
}
return nil

View File

@@ -4,9 +4,11 @@ import (
"context"
"errors"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"strings"
"testing"
"github.com/magiconair/properties/assert"
@@ -25,34 +27,17 @@ type MockedClient struct {
func (m *MockedClient) FindContainer(id string) (docker.Container, error) {
args := m.Called(id)
container, ok := args.Get(0).(docker.Container)
if !ok {
panic("containers is not of type docker.Container")
}
return container, args.Error(1)
return args.Get(0).(docker.Container), args.Error(1)
}
func (m *MockedClient) ListContainers() ([]docker.Container, error) {
args := m.Called()
containers, ok := args.Get(0).([]docker.Container)
if !ok {
panic("containers is not of type []docker.Container")
}
return containers, args.Error(1)
return args.Get(0).([]docker.Container), args.Error(1)
}
func (m *MockedClient) ContainerLogs(ctx context.Context, id string, tailSize int, since string) (<-chan string, <-chan error) {
func (m *MockedClient) ContainerLogs(ctx context.Context, id string, tailSize int, since string) (io.ReadCloser, error) {
args := m.Called(ctx, id, tailSize)
channel, ok := args.Get(0).(chan string)
if !ok {
panic("channel is not of type chan string")
}
err, ok := args.Get(1).(chan error)
if !ok {
panic("error is not of type chan error")
}
return channel, err
return args.Get(0).(io.ReadCloser), args.Error(1)
}
func (m *MockedClient) Events(ctx context.Context) (<-chan docker.ContainerEvent, <-chan error) {
@@ -82,15 +67,9 @@ func Test_handler_streamLogs_happy(t *testing.T) {
require.NoError(t, err, "NewRequest should not return an error.")
mockedClient := new(MockedClient)
messages := make(chan string)
errChannel := make(chan error)
reader := ioutil.NopCloser(strings.NewReader("INFO Testing logs..."))
mockedClient.On("FindContainer", id).Return(docker.Container{ID: id}, nil)
mockedClient.On("ContainerLogs", mock.Anything, mock.Anything, 300).Return(messages, errChannel)
go func() {
messages <- "INFO Testing logs..."
close(messages)
}()
mockedClient.On("ContainerLogs", mock.Anything, mock.Anything, 300).Return(reader, nil)
h := handler{client: mockedClient, config: &Config{TailSize: 300}}
handler := http.HandlerFunc(h.streamLogs)
@@ -109,15 +88,9 @@ func Test_handler_streamLogs_happy_with_id(t *testing.T) {
require.NoError(t, err, "NewRequest should not return an error.")
mockedClient := new(MockedClient)
messages := make(chan string)
errChannel := make(chan error)
reader := ioutil.NopCloser(strings.NewReader("2020-05-13T18:55:37.772853839Z INFO Testing logs..."))
mockedClient.On("FindContainer", id).Return(docker.Container{ID: id}, nil)
mockedClient.On("ContainerLogs", mock.Anything, mock.Anything, 300).Return(messages, errChannel)
go func() {
messages <- "2020-05-13T18:55:37.772853839Z INFO Testing logs..."
close(messages)
}()
mockedClient.On("ContainerLogs", mock.Anything, mock.Anything, 300).Return(reader, nil)
h := handler{client: mockedClient, config: &Config{TailSize: 300}}
handler := http.HandlerFunc(h.streamLogs)
@@ -136,15 +109,8 @@ func Test_handler_streamLogs_happy_container_stopped(t *testing.T) {
require.NoError(t, err, "NewRequest should not return an error.")
mockedClient := new(MockedClient)
messages := make(chan string)
errChannel := make(chan error)
mockedClient.On("FindContainer", id).Return(docker.Container{ID: id}, nil)
mockedClient.On("ContainerLogs", mock.Anything, id, 300).Return(messages, errChannel)
go func() {
errChannel <- io.EOF
close(messages)
}()
mockedClient.On("ContainerLogs", mock.Anything, id, 300).Return(ioutil.NopCloser(strings.NewReader("")), io.EOF)
h := handler{client: mockedClient, config: &Config{TailSize: 300}}
handler := http.HandlerFunc(h.streamLogs)
@@ -182,15 +148,8 @@ func Test_handler_streamLogs_error_reading(t *testing.T) {
require.NoError(t, err, "NewRequest should not return an error.")
mockedClient := new(MockedClient)
messages := make(chan string)
errChannel := make(chan error)
mockedClient.On("FindContainer", id).Return(docker.Container{ID: id}, nil)
mockedClient.On("ContainerLogs", mock.Anything, id, 300).Return(messages, errChannel)
go func() {
errChannel <- errors.New("test error")
close(messages)
}()
mockedClient.On("ContainerLogs", mock.Anything, id, 300).Return(ioutil.NopCloser(strings.NewReader("")), errors.New("test error"))
h := handler{client: mockedClient, config: &Config{TailSize: 300}}
handler := http.HandlerFunc(h.streamLogs)

685
yarn.lock

File diff suppressed because it is too large Load Diff