1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-10-27 20:34:20 +00:00
Commit Graph

227 Commits

Author SHA1 Message Date
Oliver Giles
f3a6ba2f4b console log: improve color scheme
based on base16 default/bright palette
2021-06-11 15:41:16 +12:00
Oliver Giles
d01cf1c9b0 failure to remove rundir should not abort the jobrunner
kj::Directory::remove will throw if it fails to remove some files, e.g. in
case of insufficient permissions. Catch this and move right along.

resolves #156
2021-05-23 14:42:06 +12:00
Oliver Giles
02810309fc make taskFailed non-fatal
turns out we can end up here when an http client unexpectedly
drops the connection, so it must not cause an exit()
2021-05-03 09:18:06 +12:00
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
Paolo Greppi
c7c586167c use relative paths to support LAMINAR_BASE_URL option 2021-03-19 20:47:56 +13:00
Jan-Benedict Glaw
7e77ec1211 Allow subdirs in artifacts directory
Extend populateArtifacts() with a subdir parameter (default initialized to ".")
to allow for recursive calls. With subdirs encountered, call recursively.
2021-03-08 20:30:59 +13:00
Oliver Giles
9b8c3762ec fe: do not html entity encode angle braces
in log output, ansi_up does it already.

resolves #148
2021-03-07 21:02:42 +13:00
vrein
c42b6d4207 Pass reason and queuedAt to Home page 2021-02-22 08:53:05 +13:00
Oliver Giles
8df882b273 remove debug logging in app.js 2021-01-09 21:52:02 +13:00
Oliver Giles
14ea1f0f43 move ansi_up to latest version: 4.0.4
this is also the version in debian libjs-ansi-up
2021-01-09 21:51:12 +13:00
meskio
381fd8b55e
Remove vue-router in the build process (#141) 2021-01-07 09:32:14 +13:00
Oliver Giles
9f969ae847 remove deprecated href to custom style.css 2021-01-02 21:26:50 +13:00
Oliver Giles
907f3926ce remove dependency on vue-router
only a small subset of vue-router is used, and integration is
complicated by each route having its own EventSource request.
Implementing the routing directly allows simplification of
the EventSource logic.

Another motivating factor is that the vue-router packages in
debian have been unreliable, making the dependence on vue-router
a hinderance for packaging laminar in debian.
2021-01-02 21:26:13 +13:00
Alex Myczko
882978fa77
Update client.cpp (#137)
fix typo
2020-12-09 07:48:29 +13:00
Oliver Giles
1a5292f141 remove old trigger command
it has been deprecated for a while now
2020-12-05 13:55:11 +13:00
Oliver Giles
ec237f475e deprecate custom css
replaced by custom index html page
2020-12-05 13:54:35 +13:00
Oliver Giles
5e64844440 frontend: "builds" -> "runs"
use consistent naming
2020-12-05 13:52:40 +13:00
Oliver Giles
c274e321df fetch average runtime as double, not int
only makes a difference for very short jobs, but nice
to have more accurate graphs
2020-12-05 13:51:25 +13:00
Oliver Giles
308d679ea4 update vue and vue-router
to 2.6.12 and 3.4.8 respectively, as they are the versions available
in Debian. fix an exposed issue where the status handler attempted
to manipulate the DOM before vue had rendered it - such manipulations
need to be deferred with $nextTick().
2020-11-20 14:34:26 +13:00
Oliver Giles
b851c72d53 progress bar: fix initial delayed update
when the displayed frontend state changes, any progress bar
should begin in the initial correct state before smoothly
transitioning with time.
2020-11-20 14:08:02 +13:00
Oliver Giles
3e993d35a0 no badges for unfinished runs
do not attempt to generate badges for runs which have not
yet finished.

resolves #134
2020-11-13 14:02:00 +13:00
Oliver Giles
579c192d89 builds per day: fix dynamic update to wrong result
the wrong dataset was updated, causing the graph to increase
the number of failed builds when a build succeeded and vice-versa.
2020-11-13 14:00:59 +13:00
Oliver Giles
4fb95fcb4f allow contexts to specify accepted jobs
using a glob expression, the same way jobs can specify
contexts. This allows more flexibility in situations where
there are many jobs sharing limited contexts because it
may obviate the need to create a conf file for each job.

resolves #124
2020-11-13 13:47:02 +13:00
Oliver Giles
bd489bdbb0 frontend refactor
use a more modern style, reduce variable scopes where possible,
fix several minor bugs such as pagination and scales in chart
tooltips
2020-10-16 21:19:12 +13:00
Oliver Giles
1ea9713536 implement wallboard view
resolves #51
2020-10-09 13:06:03 +13:00
Oliver Giles
746ab24676 move buildTimeDist chart to examples
too esoteric for the front page, converting it to an example
of querying laminar db directly and using gnuplot should provide
more value to those needing deeper insights into job behaviour.
2020-09-26 15:12:02 +12:00
Oliver Giles
9862affd98 fix warnings under clang++ 2020-09-26 11:33:36 +12:00
Oliver Giles
06a5f3d8ef assign run numbers at queue time
This allows build chains to be traced in the common case where
an upstream job calls `laminarc queue' instead of `laminarc start'.
Incomplete job runs now have database entries, which requires
some adjustments in queries. Queued jobs can now be viewed in
the frontend and there is a corresponding status icon.
2020-09-25 15:29:30 +12:00
Oliver Giles
6d2c0b208b fix LAST_RESULT env var
the variable was set too late to be passed to the forked
process.

resolves #131
2020-09-20 09:15:03 +12:00
Oliver Giles
4b62e6dbf3 fix colours of per-job build time graph 2020-09-19 15:22:01 +12:00
Oliver Giles
dc3e41fb28 prettier graphs 2020-09-04 13:21:29 +12:00
Oliver Giles
e74332595e build time graph: simplify success/failed color logic 2020-09-04 13:15:30 +12:00
Oliver Giles
a793a97424 fix time scales in graphs
these were not correct at all
2020-09-04 13:12:52 +12:00
Oliver Giles
4e9c4bfb04 run page: switch progress bar and nav buttons
the navigation buttons are more usable next to other
navigation elements. This is especially noticeable on
large monitors.
2020-09-04 13:10:09 +12:00
Oliver Giles
e29568f627 improve layout on large screens 2020-09-04 13:08:34 +12: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
Oliver Giles
8a4992e6af more aggressive, recursive kill on abort
some jobs may spawn child processes which change their process group
or session id, making the existing abort behavior of HUP-then-KILL to
the process group ineffective. Instead, if HUP to the process group
fails, recursively walk /proc and KILL anything with a ppid corresponding
to the leader process. This should keep working because the leader
process is a subreaper.

resolves #129
2020-08-08 12:03:55 +12:00
Oliver Giles
7f7e8d2455 downstream link signal only within job
only add the private ANSI sequence to the output of laminarc
start/run commands used for adding a hyperlink to the frontend if
we are within a job execution (tested with __LAMINAR_SETENV_PIPE).
this makes parsing the output easier, which is likely to be more
common when laminarc is invoked externally
2020-07-03 18:11:29 +12:00
Oliver Giles
d6be7f5079 fix minor compile warnings 2020-07-03 17:31:44 +12:00
Oliver Giles
09a208ebeb report version and usage messages
add -h|--help usage messages to laminarc and laminard

add a mechanism to compile in a version number, and display the
version in the help messages and in the frontend.

resolves #119
2020-07-03 15:13:11 +12:00
Oliver Giles
ae560b9de4 webui refresh
WebUI rewritten in a more modern style, bootstrap is dropped in favour of
plain css/grid. Hand-crafted svgs replace utf-8 glyphs for a more uniform
look and smoother animation. webmanifest added for better mobile behaviour.

No doubt minor tweaks will follow...

resolves #57
2020-06-27 10:45:47 +12:00
Oliver Giles
559a6480ee send SIGKILL to unterminated child jobs
If we haven't exited 2 seconds after SIGTERM, send SIGKILL. This
allows aborting of runs with wayward descendent processes.
2020-06-20 16:05:14 +12:00
Oliver Giles
de948c149e don't report latestNum of non-existent job
navigating to a non-existent job in the frontend caused a
mutating change to the buildNums map, and returing the latestNum
field caused the frontend to repeatedly try to fetch the latest
run, which could overload the backend
2020-06-20 15:46:18 +12:00
Oliver Giles
c690be3a90 set html lang="en"
This fixes weird offers from browsers to translate erroneously
detected languages
2020-06-19 12:13:09 +12:00
Oliver Giles
1cc6cc6ae9 unify SSE reconnect behaviour
Chrome auto-reconnects when an EventSource connection is interrupted
but Firefox doesn't. Enforce consistent behaviour by implementing
reconnect logic.
2020-06-19 12:01:46 +12:00
Oliver Giles
d5cfa3b94e connect stdin to /dev/null
laminard is a daemon process and does not read from stdin. Usually
we can rely on the process mananger to do this for us, but if not
(e.g. laminard is run interactively), we need this so that child
processes (job runs) will not be able to block on stdin.

resolves #125
2020-06-15 12:31:42 +12:00
Oliver Giles
081becf23a laminarc: correct variable lifetime of show-jobs etc
the one-liner used to iterate on the results of the RPC
calls for show-jobs, show-queued and show-running meant
that the result collection was destroyed before we
finished with it. Hoist it out of the loop.

resolves #127
2020-06-14 07:49:02 +12:00
Oliver Giles
6c61fb3111 add missing #includes
New compiler version exposed missing header files

resolves #123
2020-05-22 11:42:16 +12:00
Oliver Giles
eadcdbdf9c laminarc: improve exit codes and errors
- return non-zero when failed to connect to laminard
- only output trigger links on successful trigger
- better error messages

Resolves #121
2020-04-25 08:49:39 +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