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

85 Commits

Author SHA1 Message Date
Oliver Giles
3cc01bc45d Better average line in Build time graph
The technique to display the average line in the old Chart.js
does not look so great in the new version. Take a different
approach using a plugin instead.
2022-11-18 19:47:59 +13:00
Guilherme Lima
e25b58944d Minor tweaks to charts appearance
Some charts had a more 'curvy' look to it. Adjusted this by using the
'tension' parameter.
Adjusted 'Utilization' pie chart aspect ratio so it is not so big.
2022-11-18 19:47:59 +13:00
Guilherme Lima
1be755e323 Update Chart.js to version 3.9
Fixes #175

Following 3.x Migration Guide, here is a list of the changes:

https://www.chartjs.org/docs/latest/getting-started/v3-migration.html#specific-changes
- Chart.scaleService was replaced with Chart.registry. Scale defaults are now in Chart.defaults.scales[type].
- scales.[x/y]Axes arrays were removed. Scales are now configured directly to options.scales object with the object key being the scale Id.
- scales.[x/y]Axes.barPercentage was moved to dataset option barPercentages
- scales.[x/y]Axes.barThickness was moved to dataset option barThickness
- scales.[x/y]Axes.scaleLabel was renamed to scales[id].title
- scales.[x/y]Axes.scaleLabel.labelString was renamed to scales[id].title.text
- scales.[x/y]Axes.ticks.userCallback was renamed to scales[id].ticks.callback
- tooltips namespace was renamed to tooltip to match the plugin name
- legend, title and tooltip namespaces were moved from options to options.plugins

https://www.chartjs.org/docs/latest/getting-started/v3-migration.html#defaults
- legend, title and tooltip namespaces were moved from Chart.defaults to Chart.defaults.plugins.
- elements.line.fill default changed from true to false

https://www.chartjs.org/docs/latest/getting-started/v3-migration.html#chart-types
- horizontalBar chart type was removed. Horizontal bar charts can be configured using the new indexAxis option

https://www.chartjs.org/docs/latest/getting-started/v3-migration.html#tooltip
- xLabel and yLabel were removed. Please use label and formattedValue
- The callbacks no longer are given a data parameter. The tooltip item parameter contains the chart and dataset instead
- The tooltip item's index parameter was renamed to dataIndex and value was renamed to formattedValue

https://www.chartjs.org/docs/latest/getting-started/v3-migration.html#ticks
- options.gridLines was renamed to options.gridLines
2022-11-18 19:47:59 +13:00
Oliver Giles
e9fc547a72 wallboard: correctly tag running build for css
also on page refresh, not just via SSE.
2022-09-03 19:54:10 +12:00
Oliver Giles
01183a3c25 wallboard: fix stuck page without filter query
if no filter param is provided, use a copy of the jobs array
to avoid an infinite sort loop in the frontend

resolves #174
2022-09-03 19:53:14 +12:00
Oliver Giles
e7defa9f15 fe: fix display of first run of job
if it is still running and is the first known of its
name to the frontend, special handling is needed
2022-09-03 19:51:29 +12:00
Oliver Giles
7303e4d592 fe perf: insertAdjacentHTML is faster than innerHTML+= 2022-01-22 20:08:23 +13:00
Oliver Giles
23cb30fc0c fe perf: throttle log rendering
as a further enhancement to efafda16f, schedule a render immediately if
500ms have passed without one, and cap the max delay to 500ms.
This removes delay for short logs, and prevents an issue where output that
is produced reasonably quickly will not be rendered for a long time.
2022-01-22 20:07:23 +13:00
Oliver Giles
41ddd8fe4f allow adding job to front of queue
laminarc now supports {queue,start,run} --next to place the job at the
front of the queue instead of at the end.

resolves #162
2022-01-22 15:18:43 +13:00
Oliver Giles
efafda16ff improve frontend performance with large logs
frontend would furiously try to render as fast as it received data
chunks from the server. This causes a lot of extra load on the browser
renderer if the logs are large. Buffer and batch calls to rerender
to improve performance.

resolves #165
2022-01-01 21:30:38 +13:00
Oliver Giles
e1686d454b display run number for queued jobs
in the frontend and in laminarc queue/show-queued. This makes
it much easier to abort/unqueue runs which have not yet started.

resolves #155
2021-12-05 13:42:27 +13:00
Oliver Giles
78ceeec3e8 frontend: fix double-escaped link
do not escape links to downstream jobs generated with a private
ANSI CSI escape sequence, because the newer ansi_up escapes HTML.
Work around its dropping of unknown sequences, and have the link
use the Vue routing mechanism rather than a page reload.

resolves #161
2021-09-25 19:07:36 +12:00
Oliver Giles
a50514a135 frontend: better dynamic update of graphs
react to jobCompletion messages by updating graphs in
more cases so manual refresh is not necessary to see
most up to date representation.
2021-07-09 10:04:20 +12:00
Oliver Giles
f3a6ba2f4b console log: improve color scheme
based on base16 default/bright palette
2021-06-11 15:41:16 +12:00
Paolo Greppi
c7c586167c use relative paths to support LAMINAR_BASE_URL option 2021-03-19 20:47:56 +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
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
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
Oliver Giles
5e64844440 frontend: "builds" -> "runs"
use consistent naming
2020-12-05 13:52:40 +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
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
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
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
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
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
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
2bf04d8157 allow setting a job description
adding DESCRIPTION=foo to $JOBNAME.conf will display "foo"
in the job overview page on the frontend

Resolves #97
2019-12-25 14:37:16 +02:00
Oliver Giles
0384fc9a0a
Replace nodes/tags with contexts
The nodes/tags system has not been particularly successful, it's not as
intuitive as it could be, and in an attempt to be a single feature to address
many use cases, ends up addressing none of them particularly well.

This commit replaces nodes and tags with contexts.

Each job may define which context(s) the job may be associated with.
Laminar will only pop the job off the waiting queue when it can be assigned
to a context. A context defines an integer number of executors, which
represents how many runs can be simultaneously assigned to it. A context
may provide extra environment variables.

Essentially, a context replaces a node, and tags are gone. You just assign
jobs to contexts directly, and you can use a glob expression. This should be
more intuitive.

For grouping jobs in the WebUI, a separate mechanism called "groups" is provided.
2019-12-13 10:42:22 +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
95482c78a5 resolves #80: reverse-proxy with custom base URL
Fix all hrefs and vue routes to correctly operate against the
<base href> tag. Add a configuration parameter to override the
content of the href attribute, and describe its use.
2019-03-29 22:43:16 +03:00
Oliver Giles
b15166e83b resolves #82: implement /latest endpoint
for run page on webui and archive (via symlink)
2019-02-18 23:06:11 +02:00
Oliver Giles
137f35bdd7 additional fixes for #79: chunked http log
fix a missing js function call that broke log output in the
webui, and replace TextDecoderStream with TextDecoder because
the former isn't supported in Firefox
2019-02-18 23:03:14 +02:00
Oliver Giles
cec4721e52 resolves #79: serve logs over plain chunked http 2019-02-15 19:05:44 +02:00
Oliver Giles
b4df6f5c02 fix job-finished event on run page
fixes regression introduced in 63301c73
2018-10-05 17:53:37 +03:00
Oliver Giles
48854239a5 label per-job build-time graph axes
commonalize some js for configuring time axes
2018-09-30 13:00:23 +03:00
Oliver Giles
63301c73d9 resolves #61: clickable up/downstream triggers
Recognises triggers in build logs and converts them to
hyperlinks. Also separates upstream job from reason string
and allows both to be provided
2018-09-30 09:04:17 +03:00
Oliver Giles
f5e719ac02 improve graph labelling 2018-09-28 15:37:39 +03:00
Oliver Giles
a2d30ad2ea resolves #62: add average line to build time graphs 2018-09-08 21:02:58 +03:00
Oliver Giles
010af57ed4 resolves #45: new graphs
- regressions and recoveries: list of jobs whose run status changed,
  ordered first by currently failing jobs, secondly by count of jobs
  since the status change, descending for currently failing jobs and
  ascending for currently passing jobs
- low pass rates: list of the jobs with the worst pass rates calculated
  over all time
- run time changes: jobs with the largest changes in build time. This
  is calculated as the difference between the range and the standard
  deviation over the past 10 runs.
- average run time distribution: shows the number of jobs in the
  system divided into buckets based on their average runtime
2018-09-08 18:16:30 +03:00
Oliver Giles
1f122518dd resolves #64: graph jumps to previous values
Ensure the old chart is completely removed before loading a new
set of values due to different page or sort options
2018-08-24 13:32:07 +03:00
Oliver Giles
f2bbfd91bb charts: set linear minimum to 0 2018-08-24 13:31:29 +03:00
Oliver Giles
2349791676 resolves #47: jobs don't refresh on jobs page
The computed list of filtered jobs wasn't updated when a notification
was received from the server. Switch to using a method rather than a
computed property to fix this. Also add tags to jobs reported in
job_started and job_completed notifications
2018-08-24 13:10:00 +03:00