1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-09-28 22:40:45 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
Oliver Giles
b16991b17a fix race in http log output
Creating of LogWatcher makes it automatically receive new log
chunks as it is part of logWatchers. But we cannot be sure that
stream->write().then() will have already completed, so there is
a chance that a null fulfiller will be caused, causing a crash.
We cannot defer the creation of the LogWatcher until after
stream->write() because in the meantime we may lose new messages,
so call writeLogChunk to make sure we have a fulfiller before
entering stream->write().

Also, pending chunks of log output were std::move()'d to the first
interested client in the loop, they need to be copied if there
is more than one client.
2021-03-19 21:11:22 +13:00
Oliver Giles
ec237f475e deprecate custom css
replaced by custom index html page
2020-12-05 13:54:35 +13:00
Oliver Giles
1ea9713536 implement wallboard view
resolves #51
2020-10-09 13:06:03 +13:00
Oliver Giles
4316eb8a00 sse endpoint: hint to reverse-proxy not to buffer
Similarly to 210787a3, and as discussed in #88 and #130, nginx
will buffer chunked transfer-encoding unless proxy_buffering
is turned off or the X-Accel-Buffering header is set to no.

resolves #130
2020-08-11 06:54:03 +12:00
Cameron Eagans
2e54773e83
Add the ability to customize index.html (#113)
User may provide a custom index.html template file to be used instead
of the built-in version. Changes to this file are watched by laminard
using inotify in order to load and compress the custom file for gzip
delivery, reusing the existing method for serving static assets.

This feature obviates the custom css feature, so remove references from
the manual and add a deprecation warning if it is used.

Add a section to the UserManual describing how to use this feature and
including a link to an example using Semantic UI.
2020-03-10 19:40:14 +02:00
Oliver Giles
a7e6094d01 replace KJ_ASSERT with LASSERT
inadvertently reintroduced KJ_ASSERT with recent refactor.
It uses __FILE__ which contains path to source, which is
fixed with LASSERT
2020-01-02 08:16:55 +02:00
Oliver Giles
ba472711be refactor: remove run page json type hack
this hack tried to avoid sending unnecessary data to the frontend,
but it was more trouble than it's worth
2019-11-01 07:27:34 +02:00
Oliver Giles
39ca7e86cf replace websockets with sse and refactor
Large refactor that more closely aligns the codebase to the kj async
style, more clearly exposes an interface for functional testing and
removes cruft. There is a slight increase in coupling between the
Laminar and Http/Rpc classes, but this was always an issue, just until
now more obscured by the arbitrary pure virtual LaminarInterface class
(which has been removed in this change) and the previous lumping
together of all the async stuff in the Server class (which is now
more spread around the code according to function).

This change replaces the use of Websockets with Server Side Events
(SSE). They are simpler and more suitable for the publish-style messages
used by Laminar, and typically require less configuration of the
reverse proxy HTTP server.

Use of gmock is also removed, which eases testing in certain envs.

Resolves #90.
2019-10-05 20:06:35 +03:00
Oliver Giles
4a07e24da3 split server into http and rpc parts
this is initial preparation for a larger refactor
2019-09-27 20:50:46 +03:00