Commit Graph

113 Commits

Author SHA1 Message Date
Christopher Baines be25e487f1 Support filtering lint warnings by linter 2019-09-01 18:32:09 +01:00
Christopher Baines 609c5cf4f0 Add a page to show the lint warnings for a revision 2019-09-01 17:40:16 +01:00
Christopher Baines 3a79449974 Display counts of lint warnings on the revision page 2019-09-01 13:12:10 +01:00
Christopher Baines 3849bb79c5 Support filtering by systems and targets when comparing derivations 2019-08-06 10:22:57 +01:00
Christopher Baines 36a16d356f Improve derivation comparison to show more changes
In cases where the version is changed for example, the relevant derivations
will now show up, whereas previously they did not.
2019-08-06 09:55:03 +01:00
Christopher Baines 4b59108fdd Properly handle not finding a matching derivation 2019-08-05 19:45:10 +01:00
Christopher Baines 91e0527b4d Link to cgit on the comparison page 2019-07-29 20:40:56 +01:00
Christopher Baines f2c7cc83ed Fix the JSON compare output 2019-07-29 19:48:57 +01:00
Christopher Baines 75226a1499 Fix the latest-processed-revision pages 2019-07-27 09:12:25 +01:00
Christopher Baines 05db0a87f9 Switch the index page to show branches for a repository
As that's probably more useful than recent revisions and jobs.
2019-07-22 20:51:54 +01:00
Christopher Baines 91be72df03 Display the jobs related to a revision on the revision page 2019-07-22 20:00:11 +01:00
Christopher Baines 1f977f6c12 Improve how repositories and branches are handled
Make the link between repositories and branches clearer, replacing the
/branches and /branch pages by /repository/ and /repository/*/branch/* pages.
2019-07-19 21:22:15 +01:00
Christopher Baines dab984b1d5 Fix match expression
Specify 'GET rather than GET, to actually match the method, rather than
binding it to GET.
2019-07-19 20:20:52 +01:00
Christopher Baines 743cec7cb6 Associate a name with database connections
This helps when working out which connection to the database is doing what.
2019-07-12 19:49:26 +01:00
Christopher Baines c00405e232 Add some missing arguments to view-revision-packages 2019-07-07 16:42:00 +01:00
Christopher Baines 54b9922466 Iterate the log viewing
Replace the Guile-side HTML escaping with a less complete, but hopefully
faster PostgreSQL side HTML escaping approach.

Also, allow reading part of the log, by default, the last 1,000,000
characters, as this should render quickly.
2019-06-24 20:30:47 +01:00
Christopher Baines e2c9709c7d Add a job page
Which shows the output for that job.
2019-06-22 01:51:49 +02:00
Christopher Baines d07e3d9ba8 Move the derivations off the compare page
To the compare/derivations page. Previously, the compare/derivations page was
comparing more than the derivations, notably the package metadata. This change
avoids that, and also reduces the information overload on the compare page.
2019-06-20 14:29:56 +02:00
Christopher Baines ea80311c49 Use revision labels on the index page as well
Also flip the branch and revision columns around, and add date information to
the branch column.
2019-06-19 23:39:53 +01:00
Christopher Baines e93b8f948e Improve the Unknown revision page
Make it similar to the revision page, as some of the information, like the
link to the relevant CGit instance might be available.
2019-06-19 22:03:55 +01:00
Christopher Baines ed0745096a Add a new page listing jobs 2019-06-17 11:21:58 +01:00
Christopher Baines b1c0ec6c97 Remove some peek calls that have crept in 2019-06-16 14:21:34 +01:00
Christopher Baines de8858c274 Make some pages around revisions more generic
So that they can also be used for the /branch/foo/latest-processed-revision
pages. The content is the same, but the title, link, and some of the links on
the page are different.
2019-06-16 10:27:14 +01:00
Christopher Baines 13e2f87555 Support accessing the latest processed revision for a branch
This makes is easier to get the latest data for a branch in a single request,
rather than making one request to find the latest revision, then another to
get the data.
2019-06-13 23:14:04 +01:00
Christopher Baines 33cf8d66f6 Add a healthcheck endpoint
This indicates currently if the database is accessible and a simple query can
be performed. I'm mostly looking at using this when writing a system test for
this service.
2019-06-06 21:08:34 +01:00
Christopher Baines aad2c9d9e8 Extract the database connection handling from the server
Previously, one of the first things that happened when responding to a request
was a database connection was made, even when serving the CSS. This is
unnecessary, so move the database connection handling in to the controller.

Also, to allow for separating it out from the assets, separate the assets out
from the parts of the controller that require a database connection.
2019-06-06 20:43:54 +01:00
Christopher Baines 9c23451482 Handle the 404 case when viewing store items 2019-05-20 08:17:56 +01:00
Christopher Baines 6add08b109 Add missing revision handling
As previously the pages would render, but with no data.
2019-05-19 22:31:07 +01:00
Christopher Baines e92e095ee9 Add an all results option to the packages page 2019-05-19 21:28:01 +01:00
Christopher Baines d4b23f81c1 Cache the pages which don't really change for a day 2019-05-18 20:25:34 +01:00
Christopher Baines 03faff5da0 Remove the HTTP headers from the html module
Given that the headers may be the same, regardless whether it's HTML or JSON
being sent in the body of the response, I think it makes more sense to handle
the headers in the controller.
2019-05-18 20:08:34 +01:00
Christopher Baines ed19764bc3 Show the branches for a revision 2019-05-18 12:36:03 +01:00
Christopher Baines 83012b101b Allow specifying the fields on the packages page
This is mostly for the JSON output, as it allows much more information to be
included.
2019-05-16 22:28:16 +01:00
Christopher Baines 7341d17254 Store and display the location of packages
Store the location a package can be found at, and display this on the package
page.

If available, link off to the git repository containing the package.
2019-05-13 21:07:48 +01:00
Christopher Baines 9aaab6b751 Add a textual search to the packages page 2019-05-12 21:17:08 +01:00
Christopher Baines 0bdc555ff8 Add some basic pagination to the packages page
Lower powered devices will have problems displaying all ~9000+ packages, so
return a smaller number by default.
2019-05-12 20:45:33 +01:00
Christopher Baines de76f89cb3 Add initial JSON output for the package page 2019-05-12 10:11:14 +01:00
Christopher Baines e64fc090cd Add a JSON variant of the packages page 2019-05-12 09:56:24 +01:00
Christopher Baines b3f2aab8c9 Add a JSON variant of the revision page 2019-05-12 09:51:28 +01:00
Christopher Baines 658a1a20b2 Improve the content negotiation handling in general
Previously, the routing layer handled the content negotiation, and the Accept
header was ignored. Now, the extension if one is provided in the URL is still
used, and more widely than before, but the Accept header is also taken in to
account.

This all now happens before the routing decisions are made, so the routing is
now pretty much extension independant (with the exception of the
/gnu/store/... routes).
2019-05-11 22:56:25 +01:00
Christopher Baines 640fb8a2ad Update the derivation comparison implementation
This adds more query parameter validation, and uses form-horizontal-control to
neaten up the view code.
2019-05-11 20:38:16 +01:00
Christopher Baines 3611f7b122 Add some options to the branch page
Add handling for some query parameters to the branch page. This takes
advantage of the improvements for building forms and query parameter
validation.
2019-05-11 16:49:18 +01:00
Christopher Baines f2e123b7ac Add a new query-parameters module
The query parameters feed in to the results shown, but also forms on
pages. Validation is important to avoid errors and security issues, but it's
also important to provide appropriate feedback to the user.

This module provides some utilities and structure around handling query
parameters.
2019-05-11 16:45:59 +01:00
Christopher Baines 5028dfe706 Start to handle information about Git branches
Add some new pages /branches and /branch/... as well as a new git_branches
table. Also extend the email processing to enter the branch information in to
the database.
2019-05-05 20:06:28 +01:00
Christopher Baines ce4c3c6ed3 Switch to storing Git repositories in a table
Rather than just storing the URL in the guix_revisions and
load_new_guix_revision_jobs tables. This will help when storing more
information like tags and branches in the future.
2019-05-05 14:36:52 +01:00
Christopher Baines 6022edd074 Add a statistics page
To show the total number of derivations, and guix revisions.
2019-04-08 21:04:12 +01:00
Christopher Baines f4c159d9de
Fix comparison in render-compare/derivations 2019-03-17 23:13:57 +00:00
Christopher Baines 189014f3bc
Improve the compare derivations page
Add support for filtering the results, and add the system and target
to the output.
2019-03-17 22:44:09 +00:00
Christopher Baines 5325cf0234
Fix the JSON responses for the comparison pages 2019-03-16 22:20:55 +00:00
Christopher Baines e117bb1d87
Many changes
A large proportion of these changes relate to changing the way
packages relate to derivations. Previously, a package at a given
revision had a single derivation. This was OK, but didn't account for
multiple architectures.

Therefore, these changes mean that a package has multiple derivations,
depending on the system of the derivation, and the target system.

There are multiple changes, small and large to the web interface as
well. More pages link to each other, and the visual display has been
improved somewhat.
2019-03-11 22:11:14 +00:00
Christopher Baines a1e481cc4d
Continue improving pages and linking things together 2019-03-07 23:50:51 +00:00
Christopher Baines 8f4da3c872
Start to visualise derivations 2019-03-07 08:43:16 +00:00
Christopher Baines b0eaf9cf7a
Add a few new pages
For showing more information about builds, revisions and derivations.
2019-03-06 22:59:27 +00:00
Christopher Baines e656b0967b
Include the status of derivations
On the comparison page.
2019-03-06 22:58:05 +00:00
Christopher Baines 623347d835
Add a list of the queued revisions to the index page 2019-03-03 18:15:29 +00:00
Christopher Baines 6d0eaab4e7
Make the unknown JSON a bit more sensible 2019-02-28 21:53:26 +00:00
Christopher Baines 2836a848cb
Add a packages comparison page
The primary use I have in mind for this is producing a list of strings
suitable for building a limited Cuirass job with.
2019-02-25 23:44:32 +00:00
Christopher Baines 31737d32f9
Add some super crude JSON pages
Provide JSON versions of the existing HTML compare and
compare/derivations pages. Refactor the code and extract some
functions to make this a little less painful.
2019-02-25 22:07:26 +00:00
Christopher Baines b8543859c9
Show when revisions are missing, but queued for processing 2019-02-24 16:52:45 +00:00
Christopher Baines e68142cf91
Add a new page comparing the derivations of two revisions 2019-02-24 15:38:08 +00:00
Christopher Baines 552723cef1
Add an error page for unknown commits 2019-02-08 11:27:07 +00:00
Christopher Baines 0a49c0a84a
Actually close database connections
Previously, the connections were not closed, so eventually PostgreSQL
would run out. Using a pool of connections would be better, but as a
short term solution, just close the connection after each request.
2019-02-08 11:19:12 +00:00
Christopher Baines 5a9262b38d
Initial commit
This is a service designed to provide information about Guix. At the
moment, this initial prototype gathers up information about packages,
the associated metadata and derivations.

The initial primary use case is to compare two different revisions of
Guix, detecting which packages are new, no longer present, updated or
otherwise different.

It's based on the Mumi project.

[1]: https://git.elephly.net/software/mumi.git
2019-02-07 22:26:57 +00:00