From: Canan Talayhan <canan.t.talayhan@gmail.com>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: [Outreachy] - Guix Data Service - Set a more informative page title
Date: Sun, 18 Apr 2021 23:37:15 +0300 [thread overview]
Message-ID: <CAAosC5+n1NHp-ctOq8QC5jB1oXGMjbBfdC3fZUmy1t4tDcfJFg@mail.gmail.com> (raw)
In-Reply-To: <87wnsziing.fsf@cbaines.net>
[-- Attachment #1: Type: text/plain, Size: 10624 bytes --]
Thanks for your quick response.
>Why's the @ being removed here?
It interprets like an HTML code when I use the page-header like
`,page-header, so I removed it. According to your comment, I reverted
to the original version.
" 'GET repository..." which includes package/package-name in the URL
has not the best titles since I couldn't test them because of the
error that I've mentioned.
I'm open to suggestions.
Could you please re-review the patch that contains all the
modifications you've mentioned in the previous message?
On Sun, Apr 18, 2021 at 8:53 PM Christopher Baines <mail@cbaines.net> wrote:
>
>
> Canan Talayhan <canan.t.talayhan@gmail.com> writes:
>
> > I've updated the patch that contains all the suggestions. I think the patch
> > is ready to merge.
> >
> > One thing that I would like to ask you about the package and package-name
> > in web/repository/controller.scm.
> >
> > When I test the URL below I'm getting this error. (
> > https://pastebin.ubuntu.com/p/HdKShmKqH7/)
> >
> > - ('GET "repository" repository-id "branch" branch-name "package"
> > package-name) ->
> > http://localhost:8765/repository/1/branch/master/package/emacs
> >
> > What do you think? BTW it's accessible on the official server.
> >
> > - https://data.guix.gnu.org/repository/1/branch/master/package/emacs/
>
> Hmm, this could possibly be due to an issue with the small dump of the
> database.
>
> > Could you please review the patch attached?
> > I'm very excited to make my first FOSS contribution. :)
>
> I've had a look though, and I have some more comments:
>
> diff --git a/guix-data-service/web/compare/html.scm b/guix-data-service/web/compare/html.scm
> index 5b5fe0a..170fb12 100644
> --- a/guix-data-service/web/compare/html.scm
> +++ b/guix-data-service/web/compare/html.scm
> @@ -96,7 +96,12 @@
> (unless invalid-query?
> (query-parameters->string query-parameters)))
>
> + (define page-header "Comparing")
> +
> (layout
> + #:title
> + (string-append page-header " " (string-take base-commit 8) " and "
> + (string-take target-commit 8))
> #:body
> `(,(header)
> (div
> @@ -107,7 +112,7 @@
> (@ (class "col-sm-7"))
> ,@(if invalid-query?
> `((h1 "Compare"))
> - `((h1 "Comparing "
> + `((h1 ,page-header ," "
> (a (@ (href ,(string-append "/revision/" base-commit)))
> (samp ,(string-take base-commit 8) "…"))
> " and "
>
> There's a couple of things here. I'd be tempted not to use a variable
> for "Comparing", it's not really the page header, as that's more
> complicated, so I think I'd just use the string in both places.
>
> Second thing, the (if invalid-query? bit when constructing the h1
> element is important. The query parameters being invalid could mean
> anything from the form just hasn't been filled in, to the value isn't
> actually a commit hash, but something else, maybe some HTML/JavaScript
> that is malicious and shouldn't be included in the page. A similar
> approach probably needs taking for the title.
>
> @@ -419,14 +424,18 @@
> '(span (@ (class "text-success glyphicon glyphicon-plus pull-left")
> (style "font-size: 1.5em; padding-right: 0.4em;"))))
>
> + (define page-header "Comparing derivations")
> +
> (layout
> + #:title
> + page-header
> #:body
> `(,(header)
> (div
> (@ (class "container"))
> (div
> (@ (class "row"))
> - (h1 ,@(let ((base-commit (assq-ref query-parameters 'base_commit))
> + (h1 ,(let ((base-commit (assq-ref query-parameters 'base_commit))
>
> Why's the @ being removed here?
>
> @@ -435,7 +444,7 @@
> " and "
> (a (@ (href ,(string-append "/revision/" target-commit)))
> (samp ,(string-take target-commit 8) "…")))
> - '("Comparing derivations")))))
> + `,page-header))))
>
> The quote then immediate unquote here isn't necessary, also, I think
> this should stick to being a list containing a string, as the other part
> of the if returns a list.
>
> diff --git a/guix-data-service/web/dumps/html.scm b/guix-data-service/web/dumps/html.scm
> index 71e69c8..9645f7c 100644
> --- a/guix-data-service/web/dumps/html.scm
> +++ b/guix-data-service/web/dumps/html.scm
> @@ -21,8 +21,13 @@
> #:use-module (guix-data-service web view html)
> #:export (view-dumps))
>
> +(define page-header "Database dumps")
> +
> (define (view-dumps available-dumps)
> +
> (layout
> + #:title
> + page-header
> #:body
> `(,(header)
> (div
> @@ -31,7 +36,7 @@
> (@ (class "row"))
> (div
> (@ (class "col-sm-12"))
> - (h1 "Database dumps")))
> + (h1 ,page-header)))
>
> Like the others, I'd probably put page-header inside the view-dumps
> procedure. Same goes for other places where it's outside.
>
> @@ -267,7 +279,7 @@
> (@ (class "col-sm-12"))
> (a (@ (href "/jobs"))
> (h3 "Jobs"))
> - (h1 "Queued jobs ("
> + (h1 ,page-header"("
> ,(length jobs-and-events)
> ")")))
> (div
>
> I'd suspect the title here would be "Queued jobs(", I'd also put a space
> between ,page-header the bit after it in the code.
>
> @@ -329,8 +341,13 @@
> '())))))
> jobs-and-events)))))))))
>
> +
> (define (view-job job-id query-parameters log)
> + (define page-header (string-append "Job " job-id))
> +
> (layout
> + #:title
> + page-header
> #:body
> `(,(header)
> (div
>
> Most of the procedures are separated by one line, and I wouldn't change
> that here.
>
> @@ -24,7 +24,11 @@
> #:export (view-package))
>
> (define* (view-package name package-version-with-branches)
> + (define page-header "Package")
> +
> (layout
> + #:title
> + (string-append page-header " " name)
> #:body
> `(,(header)
> (div
> @@ -33,7 +37,7 @@
> (@ (class "row"))
> (div
> (@ (class "col-md-12"))
> - (h1 "Package: " ,name)))
> + (h1 ,page-header ," " ,name)))
> ,@(map
> (match-lambda
> ((('version . version)
>
> I'm not that fussed about the colon, but I'd probably keep it.
>
> I'd try to keep the page-header variable meaningful if you're going to
> use it though. "Package" is named as the page-header, but it's not what
> the title is, or the h1 element. They're both better as they include the
> package name, I'd probably just make the page-header the actual string
> used in both places.
>
> @@ -65,7 +69,11 @@
> (define* (view-git-repository git-repository-id
> label url cgit-url-base
> branches-with-most-recent-commits)
> + (define page-header (string-append "Repository " (string-drop url 8)))
> +
> (layout
> + #:title
> + page-header
> #:body
> `(,(header)
> (div
>
> This is really nice, it's good that the pages for different repositories
> won't have the same title.
>
> @@ -197,7 +209,11 @@
> branch-name
> package-name
> versions-by-revision-range)
> + (define page-header (string-append branch-name " " package-name))
> +
> (layout
> + #:title
> + page-header
> #:body
> `(,(header)
> (div
>
> I think you might need some more words for this title to make sense
> though, even just having package-name " on " branch-name would probably
> help people work out what's going on.
>
> @@ -386,6 +402,8 @@
> (map first derivations-by-revision-range))))
>
> (layout
> + #:title
> + (string-append package-name " Package derivations")
> #:body
> `(,(header)
> (div
> @@ -636,6 +654,8 @@
> (map first outputs-by-revision-range))))
>
> (layout
> + #:title
> + (string-append package-name " Package outputs")
> #:body
> `(,(header)
> (div
> @@ -849,6 +869,8 @@
> valid-systems
> system-test-history)
> (layout
> + #:title
> + (string-append system-test-name " History")
> #:body
> `(,(header)
> (div
>
> Given there's something coming first in these titles, I wouldn't
> capitalise the H in History or P in Package, since it's not at the start
> of the title.
>
> @@ -48,7 +48,12 @@
> (define* (view-revision-news commit-hash
> query-parameters
> news-entries)
> + (define page-header "Revision")
> +
> (layout
> + #:title
> + (string-append "Channel News Entries " page-header " "
> + (string-take commit-hash 7))
> #:body
> `(,(header)
> (div
>
> @@ -48,7 +48,12 @@
> (define* (view-revision-news commit-hash
> query-parameters
> news-entries)
> + (define page-header "Revision")
> +
> (layout
> + #:title
> + (string-append "Channel News Entries " page-header " "
> + (string-take commit-hash 7))
> #:body
> `(,(header)
> (div
>
> Same thing here regarding defining a page-header which isn't actually
> used as the header.
>
> I do think it's useful to include both the Channel News Entries bit and
> the revision bit in the title, but I'd probably put a separator (like a
> -) in between them. Same goes for the other changes in this file.
>
> @@ -2314,7 +2386,11 @@ figure {
>
> (define (unknown-revision commit-hash job git-repositories-and-branches
> jobs-and-events)
> + (define page-header "Uknown revision")
> +
> (layout
> + #:title
> + page-header
> #:body
> `(,(header)
> (div
>
> A letter was lost here.
[-- Attachment #2: 0001-Set-a-more-informative-page-title-for-any-page.patch --]
[-- Type: text/x-patch, Size: 20590 bytes --]
From a3c708627df0be4f3b530d2fcd074bb943705aa4 Mon Sep 17 00:00:00 2001
From: Canan Talayhan <canan.t.talayhan@gmail.com>
Date: Sun, 18 Apr 2021 23:27:07 +0300
Subject: [PATCH] Set a more informative page title for any page where the
title is "Guix Data Service"
---
guix-data-service/web/build-server/html.scm | 24 ++++++--
guix-data-service/web/build/html.scm | 6 +-
guix-data-service/web/compare/html.scm | 25 ++++++--
guix-data-service/web/dumps/html.scm | 6 +-
guix-data-service/web/jobs/html.scm | 27 +++++++--
guix-data-service/web/nar/html.scm | 5 +-
guix-data-service/web/package/html.scm | 3 +
guix-data-service/web/repository/html.scm | 30 +++++++++-
guix-data-service/web/revision/html.scm | 65 +++++++++++++++++++--
guix-data-service/web/view/html.scm | 12 ++--
10 files changed, 176 insertions(+), 27 deletions(-)
diff --git a/guix-data-service/web/build-server/html.scm b/guix-data-service/web/build-server/html.scm
index f16a570..541a960 100644
--- a/guix-data-service/web/build-server/html.scm
+++ b/guix-data-service/web/build-server/html.scm
@@ -27,7 +27,11 @@
(define (view-build query-parameters
build
required-failed-builds)
+ (define page-header "Build")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -36,7 +40,7 @@
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h1 "Build")))
+ (h1 ,page-header)))
(div
(@ (class "row"))
,@(match build
@@ -98,7 +102,11 @@
'())))))
(define (view-build-servers build-servers)
+ (define page-header "Build servers")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -107,7 +115,7 @@
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h2 "Build servers")
+ (h2 ,page-header)
,@(map
(match-lambda
((id url lookup-all-derivations? lookup-builds?)
@@ -127,7 +135,11 @@
build-servers)))))))
(define (view-build-server build-server)
+ (define page-header "Build server")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -136,7 +148,7 @@
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h2 "Build server")
+ (h2 ,page-header)
,(match build-server
((url lookup-all-derivations?)
`(dl
@@ -150,7 +162,11 @@
"No")))))))))))
(define (view-signing-key sexp)
+ (define page-header "Signing key")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -159,5 +175,5 @@
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h2 "Signing key")
+ (h2 ,page-header)
,(sexp-div sexp)))))))
diff --git a/guix-data-service/web/build/html.scm b/guix-data-service/web/build/html.scm
index 18d045a..4b758bb 100644
--- a/guix-data-service/web/build/html.scm
+++ b/guix-data-service/web/build/html.scm
@@ -29,7 +29,11 @@
valid-targets
stats
builds)
+ (define page-header "Builds")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -38,7 +42,7 @@
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h1 "Builds")
+ (h1 ,page-header)
(table
(@ (class "table"))
(thead
diff --git a/guix-data-service/web/compare/html.scm b/guix-data-service/web/compare/html.scm
index 5b5fe0a..42ef0ef 100644
--- a/guix-data-service/web/compare/html.scm
+++ b/guix-data-service/web/compare/html.scm
@@ -97,6 +97,8 @@
(query-parameters->string query-parameters)))
(layout
+ #:title
+ "Compare"
#:body
`(,(header)
(div
@@ -420,13 +422,15 @@
(style "font-size: 1.5em; padding-right: 0.4em;"))))
(layout
+ #:title
+ "Comparing derivations"
#:body
`(,(header)
(div
(@ (class "container"))
(div
(@ (class "row"))
- (h1 ,@(let ((base-commit (assq-ref query-parameters 'base_commit))
+ (h1 ,(let ((base-commit (assq-ref query-parameters 'base_commit))
(target-commit (assq-ref query-parameters 'target_commit)))
(if (every string? (list base-commit target-commit))
`("Comparing "
@@ -435,7 +439,7 @@
" and "
(a (@ (href ,(string-append "/revision/" target-commit)))
(samp ,(string-take target-commit 8) "…")))
- '("Comparing derivations")))))
+ '("Comparing derivations")))))
(div
(@ (class "row"))
(div
@@ -685,7 +689,11 @@
(define fields
(assq-ref query-parameters 'field))
+ (define page-header "Package derivation changes")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -835,7 +843,7 @@ enough builds to determine a change")))
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h1 "Package derivation changes")
+ (h1 ,page-header)
,(if
(null? derivation-changes)
'(p "No derivation changes")
@@ -950,7 +958,12 @@ enough builds to determine a change")))
(string-append "?base_commit=" base-commit
"&target_commit=" target-commit))
+ (define page-header (string-append "Comparing "
+ (string-take base-commit 8) " and " (string-take target-commit 8)))
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -1042,7 +1055,11 @@ enough builds to determine a change")))
#:optional
base-revision-details
target-revision-details)
+ (define page-header "System test derivation changes")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -1141,7 +1158,7 @@ enough builds to determine a change")))
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h1 "System test derivation changes")
+ (h1 ,page-header)
,(if
(null? changes)
'(p "No system test derivation changes")
diff --git a/guix-data-service/web/dumps/html.scm b/guix-data-service/web/dumps/html.scm
index 71e69c8..d6d77f9 100644
--- a/guix-data-service/web/dumps/html.scm
+++ b/guix-data-service/web/dumps/html.scm
@@ -22,7 +22,11 @@
#:export (view-dumps))
(define (view-dumps available-dumps)
+ (define page-header "Database dumps")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -31,7 +35,7 @@
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h1 "Database dumps")))
+ (h1 ,page-header)))
,@(map
(match-lambda
((date-string . files)
diff --git a/guix-data-service/web/jobs/html.scm b/guix-data-service/web/jobs/html.scm
index 82734d6..373387d 100644
--- a/guix-data-service/web/jobs/html.scm
+++ b/guix-data-service/web/jobs/html.scm
@@ -30,7 +30,11 @@
jobs-and-events
recent-events
show-next-page?)
+ (define page-header "Jobs")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -40,7 +44,7 @@
(div
(@ (class "col-sm-12"))
(h1 (@ (style "display: inline-block;"))
- "Jobs")
+ ,page-header)
(div
(@ (class "btn-group pull-right")
(style "margin-top: 1.3rem;")
@@ -189,7 +193,11 @@
(define (view-job-events query-parameters
recent-events)
+ (define page-header "Recent events")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -200,7 +208,7 @@
(@ (class "col-sm-12"))
(a (@ (href "/jobs"))
(h3 "Jobs"))
- (h1 "Recent events")))
+ (h1 ,page-header)))
(div
(@ (class "row"))
(div
@@ -256,7 +264,12 @@
recent-events)))))))))
(define (view-job-queue jobs-and-events)
+ (define page-header (string-append "Queued jobs ("
+ (number->string (length jobs-and-events)) ")"))
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -267,9 +280,7 @@
(@ (class "col-sm-12"))
(a (@ (href "/jobs"))
(h3 "Jobs"))
- (h1 "Queued jobs ("
- ,(length jobs-and-events)
- ")")))
+ (h1 ,page-header)))
(div
(@ (class "row"))
(div
@@ -330,7 +341,11 @@
jobs-and-events)))))))))
(define (view-job job-id query-parameters log)
+ (define page-header (string-append "Job " job-id))
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -339,7 +354,7 @@
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h1 "Job " ,job-id)))
+ (h1 ,page-header)))
(div
(@ (class "row"))
(div
diff --git a/guix-data-service/web/nar/html.scm b/guix-data-service/web/nar/html.scm
index 596d16b..063b091 100644
--- a/guix-data-service/web/nar/html.scm
+++ b/guix-data-service/web/nar/html.scm
@@ -22,7 +22,10 @@
#:export (view-substitutes))
(define (view-substitutes narinfo-signing-public-key)
+ (define page-header "Substitutes")
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -31,7 +34,7 @@
(@ (class "row"))
(div
(@ (class "col-sm-12"))
- (h1 "Substitutes")
+ (h1 ,page-header)
,@(if (canonical-sexp? narinfo-signing-public-key)
`((h3 "Public key")
(pre
diff --git a/guix-data-service/web/package/html.scm b/guix-data-service/web/package/html.scm
index 0d9b078..85b33e9 100644
--- a/guix-data-service/web/package/html.scm
+++ b/guix-data-service/web/package/html.scm
@@ -24,7 +24,10 @@
#:export (view-package))
(define* (view-package name package-version-with-branches)
+
(layout
+ #:title
+ (string-append "Package: " name)
#:body
`(,(header)
(div
diff --git a/guix-data-service/web/repository/html.scm b/guix-data-service/web/repository/html.scm
index 88f2632..4bb50db 100644
--- a/guix-data-service/web/repository/html.scm
+++ b/guix-data-service/web/repository/html.scm
@@ -32,7 +32,11 @@
view-no-latest-revision))
(define* (view-git-repositories git-repositories)
+ (define page-header "Git repositories")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -41,7 +45,7 @@
(@ (class "row"))
(div
(@ (class "col-md-12"))
- (h1 "Git repositories")))
+ (h1 ,page-header)))
,@(map
(match-lambda
((id label url cgit-base-url)
@@ -65,7 +69,11 @@
(define* (view-git-repository git-repository-id
label url cgit-url-base
branches-with-most-recent-commits)
+ (define page-header (string-append "Repository " (string-drop url 8)))
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -86,7 +94,11 @@
(define (view-branch git-repository-id
branch-name query-parameters branch-commits)
+ (define page-header (string-append branch-name " branch"))
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -197,7 +209,11 @@
branch-name
package-name
versions-by-revision-range)
+ (define page-header (string-append package-name " on " branch-name))
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -386,6 +402,8 @@
(map first derivations-by-revision-range))))
(layout
+ #:title
+ (string-append package-name " package derivations")
#:body
`(,(header)
(div
@@ -636,6 +654,8 @@
(map first outputs-by-revision-range))))
(layout
+ #:title
+ (string-append package-name " package outputs")
#:body
`(,(header)
(div
@@ -849,6 +869,8 @@
valid-systems
system-test-history)
(layout
+ #:title
+ (string-append system-test-name " history")
#:body
`(,(header)
(div
@@ -1016,12 +1038,16 @@
'(#f))))))))))))
(define (view-no-latest-revision branch-name)
+ (define page-header "No latest revision")
+
(layout
+ #:title
+ (string-append page-header " for " branch-name)
#:body
`(,(header)
(div
(@ (class "container"))
- (h1 "No latest revision")
+ (h1 ,page-header)
(p "No latest revision for "
(strong (samp ,branch-name))
" branch")))))
diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm
index 25b79f4..514129b 100644
--- a/guix-data-service/web/revision/html.scm
+++ b/guix-data-service/web/revision/html.scm
@@ -48,7 +48,11 @@
(define* (view-revision-news commit-hash
query-parameters
news-entries)
+
(layout
+ #:title
+ (string-append "Channel News Entries - Revision "
+ (string-take commit-hash 7))
#:body
`(,(header)
(div
@@ -107,7 +111,11 @@
#:key path-base
header-text
header-link)
+
(layout
+ #:title
+ (string-append "Package: " name " - Revision "
+ (string-take revision-commit-hash 7))
#:body
`(,(header)
(div
@@ -135,7 +143,7 @@
branch-name))))
branches)))
git-repositories-and-branches)
- (h1 "Package " ,name)))
+ (h1 "Package: " ,name)))
(div
(@ (class "row"))
(div
@@ -169,7 +177,11 @@
#:key header-text
header-link
version-history-link)
+
(layout
+ #:title
+ (string-append "Package: " name " @ " version " - Revision "
+ (string-take revision-commit-hash 7))
#:body
`(,(header)
(div
@@ -224,7 +236,7 @@
(role "button"))
"Version history"))
'())
- (h1 "Package " ,name " @ " ,version)))
+ (h1 "Package: " ,name " @ " ,version)))
(div
(@ (class "row"))
(div
@@ -471,7 +483,10 @@
lint-warning-counts
#:key (path-base "/revision/")
header-text)
+
(layout
+ #:title
+ (string-append "Revision " (string-take commit-hash 7))
#:body
`(,(header)
(div
@@ -548,6 +563,9 @@
"Home page" "Location" "Licenses")))
(layout
+ #:title
+ (string-append "Packages - Revision "
+ (string-take revision-commit-hash 7))
#:body
`(,(header)
(div
@@ -756,6 +774,9 @@
package-description-counts))
(layout
+ #:title
+ (string-append "Packages translation availability - Revision "
+ (string-take commit-hash 7))
#:body
`(,(header)
(div
@@ -835,7 +856,10 @@
query-parameters
#:key (path-base "/revision/")
header-text header-link)
+
(layout
+ #:title
+ (string-append "System tests - Revision " (string-take commit-hash 7))
#:body
`(,(header)
(div
@@ -936,7 +960,11 @@
channel-instances
#:key (path-base "/revision/")
header-text header-link)
+
(layout
+ #:title
+ (string-append "Channel instances - Revision "
+ (string-take commit-hash 7))
#:body
`(,(header)
(div
@@ -1217,6 +1245,9 @@ figure {
colours))))))
(layout
+ #:title
+ (string-append "Package substitute availability - Revision "
+ (string-take revision-commit-hash 7))
#:body
`(,(header)
(style ,chart-css)
@@ -1254,7 +1285,11 @@ figure {
#:key (path-base "/revision/")
header-text
header-link)
+
(layout
+ #:title
+ (string-append "Package reproducibility - Revision "
+ (string-take revision-commit-hash 7))
#:body
`(,(header)
(style "
@@ -1522,6 +1557,9 @@ figure {
(assq-ref query-parameters 'field))
(layout
+ #:title
+ (string-append "Package derivations - Revision "
+ (string-take commit-hash 7))
#:body
`(,(header)
(div
@@ -1703,6 +1741,9 @@ figure {
))
(layout
+ #:title
+ (string-append "Fixed output package derivations - Revision "
+ (string-take commit-hash 7))
#:body
`(,(header)
(div
@@ -1843,6 +1884,9 @@ figure {
build-server-urls))
(layout
+ #:title
+ (string-append "Package derivation outputs - Revision "
+ (string-take commit-hash 7))
#:body
`(,(header)
(div
@@ -2021,7 +2065,10 @@ figure {
build-server-options
stats
builds)
+
(layout
+ #:title
+ (string-append "Builds - Revision " (string-take commit-hash 7))
#:body
`(,(header)
(div
@@ -2159,6 +2206,9 @@ figure {
'("Linter" "Message" "Location")))
(layout
+ #:title
+ (string-append "Lint warnings - Revision "
+ (string-take revision-commit-hash 7))
#:body
`(,(header)
(div
@@ -2314,7 +2364,11 @@ figure {
(define (unknown-revision commit-hash job git-repositories-and-branches
jobs-and-events)
+ (define page-header "Unknown revision")
+
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -2347,13 +2401,16 @@ figure {
(strong (@ (class "text-center")
(style "font-size: 2em; display: block;"))
"Unknown"))))
- `((h1 "Unknown revision")
+ `((h1 ,page-header)
(p "No known revision with commit "
(strong (samp ,commit-hash)))))))))
(define (unprocessed-revision commit-hash job git-repositories-and-branches
jobs-and-events)
+ (define page-header "Unknown revision")
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
@@ -2375,6 +2432,6 @@ figure {
git-repositories-and-branches
commit-hash))
,@(view-revision/jobs-and-events jobs-and-events))))
- `((h1 "Unknown revision")
+ `((h1 ,page-header)
(p "No known revision with commit "
(strong (samp ,commit-hash)))))))))
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm
index 8063e17..33535a9 100644
--- a/guix-data-service/web/view/html.scm
+++ b/guix-data-service/web/view/html.scm
@@ -65,13 +65,15 @@
(define* (layout #:key
(head '())
(body '())
- (title "Guix Data Service")
+ title
description)
`((doctype "html")
(html
(@ (lang "en"))
(head
- (title ,title)
+ (title ,(if title
+ (string-append title " — Guix Data Service")
+ "Guix Data Service"))
(meta (@ (http-equiv "Content-Type")
(content "text/html; charset=UTF-8")))
(meta (@ (name "viewport")
@@ -286,8 +288,7 @@
(define (index git-repositories-and-revisions)
(layout
#:description
- "The Guix Data Service processes, stores and provides data about Guix over
-time."
+ "The Guix Data Service processes, stores and provides data about Guix over time."
#:body
`(,(header)
(div
@@ -334,7 +335,10 @@ time."
git-repositories-and-revisions)))))
(define (view-statistics guix-revisions-count derivations-count)
+ (define page-header "Statistics")
(layout
+ #:title
+ page-header
#:body
`(,(header)
(div
--
2.17.1
next prev parent reply other threads:[~2021-04-18 20:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 9:01 [Outreachy] - Guix Data Service - Set a more informative page title Canan Talayhan
2021-04-13 11:57 ` Maxime Devos
2021-04-13 15:56 ` Canan Talayhan
2021-04-13 17:51 ` Maxime Devos
2021-04-15 12:08 ` Canan Talayhan
2021-04-15 21:52 ` Christopher Baines
2021-04-16 9:58 ` Canan Talayhan
2021-04-16 11:11 ` Christopher Baines
2021-04-18 13:42 ` Canan Talayhan
2021-04-18 17:53 ` Christopher Baines
2021-04-18 20:37 ` Canan Talayhan [this message]
2021-04-19 19:16 ` Christopher Baines
2021-04-21 15:43 ` Canan Talayhan
2021-04-22 19:46 ` Christopher Baines
2021-04-23 8:34 ` Canan Talayhan
2021-04-23 12:10 ` Christopher Baines
2021-04-24 11:39 ` Christopher Baines
2021-04-24 15:30 ` Canan Talayhan
2021-04-24 20:21 ` Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAosC5+n1NHp-ctOq8QC5jB1oXGMjbBfdC3fZUmy1t4tDcfJFg@mail.gmail.com \
--to=canan.t.talayhan@gmail.com \
--cc=guix-devel@gnu.org \
--cc=mail@cbaines.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.