BlueGit

timfa bluegit

fix: laat popovers zweven en breek joblogs standaard af

De vaste hoogte van .ci-stage is weg; de editor blijft met een grid
uitgelijnd. Popovers en tooltips hangen in de top-layer, zodat een
tabel ze niet afknipt. Joblogs breken standaard af en Wrap zet dat uit.
Duurbadges blijven in de sectiekop. Steve logt het image met digest en,
in Preparing environment, de runner, de host, de werkmap en de ids.

Co-authored-by: tim <tim@timfalken.com>

timfa project_87923614_bot_3aff574f6f98414b945a8799374f9092 · pushed by timfa

Authored 2026-10-22 · 3 weeks ago

Hash
f8889dcf1ba065c8d4f7e1e20337ff31b9215f13
Parent
5638c5e4
10 files changed +520 −68
cmd/bluegit/main.go +3 −2
@@ -111,8 +111,9 @@ func serve(args []string) error {
111 111 if cfg.CI.Enabled {
112 112 rn = &runner.Runner{
113 113 Store: st, GitBin: cfg.Git.Binary, Docker: cfg.CI.Docker, Storage: dataPath,
114 BaseURL: cfg.BaseURL, Network: cfg.CI.Network, Timeout: time.Duration(cfg.CI.TimeoutSec) * time.Second,
115 Log: log, OnEvent: srv.Dispatch,
114 BaseURL: cfg.BaseURL, Network: cfg.CI.Network, Name: cfg.Runner.Name,
115 Timeout: time.Duration(cfg.CI.TimeoutSec) * time.Second,
116 Log: log, OnEvent: srv.Dispatch,
116 117 }
117 118 srv.Runner = rn
118 119 go rn.Loop(ctx, cfg.CI.Concurrency)
@@ -111,8 +111,9 @@ func serve(args []string) error {
111 if cfg.CI.Enabled {
111 if cfg.CI.Enabled {
112 rn = &runner.Runner{
112 rn = &runner.Runner{
113 Store: st, GitBin: cfg.Git.Binary, Docker: cfg.CI.Docker, Storage: dataPath,
113 Store: st, GitBin: cfg.Git.Binary, Docker: cfg.CI.Docker, Storage: dataPath,
114 BaseURL: cfg.BaseURL, Network: cfg.CI.Network, Timeout: time.Duration(cfg.CI.TimeoutSec) * time.Second,
114 BaseURL: cfg.BaseURL, Network: cfg.CI.Network, Name: cfg.Runner.Name,
115 Log: log, OnEvent: srv.Dispatch,
115 Timeout: time.Duration(cfg.CI.TimeoutSec) * time.Second,
116 Log: log, OnEvent: srv.Dispatch,
116 }
117 }
117 srv.Runner = rn
118 srv.Runner = rn
118 go rn.Loop(ctx, cfg.CI.Concurrency)
119 go rn.Loop(ctx, cfg.CI.Concurrency)
docs/CI.md +1 −1
@@ -80,7 +80,7 @@ Een merge-request-pipeline start bij het openen van de merge request, bij elke p
80 80
81 81 ## Bewust niet
82 82
83 `pages`, `spec`, een include van een ander project of van een URL, trigger- en child-pipelines, `coverage`, `id_tokens`, `inherit` en `hooks`. Die sleutels geven een waarschuwing in de editor en houden de rest van het bestand niet tegen. Er is één runner, in het BlueGit-proces, die Docker op dezelfde host aanroept. Zijn naam is `runner.name` in de configuratie, standaard Steve. Die naam staat bij de runner op de jobpagina, op de pipelinedetails en boven het joblog. `tags` kiezen die runner niet. `services` delen één netwerk met de job; er is geen healthcheck verder dan een gestarte container.
83 `pages`, `spec`, een include van een ander project of van een URL, trigger- en child-pipelines, `coverage`, `id_tokens`, `inherit` en `hooks`. Die sleutels geven een waarschuwing in de editor en houden de rest van het bestand niet tegen. Er is één runner, in het BlueGit-proces, die Docker op dezelfde host aanroept. Zijn naam is `runner.name` in de configuratie, standaard Steve. In `Preparing the docker executor` staat altijd `Using docker image …`, en de image-id met digest als het image al lokaal aanwezig is. In `Preparing environment` staan de runnernaam, de host, de werkmap `/workspace` en het pipeline- en jobnummer. Die naam staat bij de runner op de jobpagina, op de pipelinedetails en boven het joblog. `tags` kiezen die runner niet. `services` delen één netwerk met de job; er is geen healthcheck verder dan een gestarte container.
84 84
85 85 ## Editor
86 86
@@ -80,7 +80,7 @@ Een merge-request-pipeline start bij het openen van de merge request, bij elke p
80
80
81## Bewust niet
81## Bewust niet
82
82
83`pages`, `spec`, een include van een ander project of van een URL, trigger- en child-pipelines, `coverage`, `id_tokens`, `inherit` en `hooks`. Die sleutels geven een waarschuwing in de editor en houden de rest van het bestand niet tegen. Er is één runner, in het BlueGit-proces, die Docker op dezelfde host aanroept. Zijn naam is `runner.name` in de configuratie, standaard Steve. Die naam staat bij de runner op de jobpagina, op de pipelinedetails en boven het joblog. `tags` kiezen die runner niet. `services` delen één netwerk met de job; er is geen healthcheck verder dan een gestarte container.
83`pages`, `spec`, een include van een ander project of van een URL, trigger- en child-pipelines, `coverage`, `id_tokens`, `inherit` en `hooks`. Die sleutels geven een waarschuwing in de editor en houden de rest van het bestand niet tegen. Er is één runner, in het BlueGit-proces, die Docker op dezelfde host aanroept. Zijn naam is `runner.name` in de configuratie, standaard Steve. In `Preparing the docker executor` staat altijd `Using docker image …`, en de image-id met digest als het image al lokaal aanwezig is. In `Preparing environment` staan de runnernaam, de host, de werkmap `/workspace` en het pipeline- en jobnummer. Die naam staat bij de runner op de jobpagina, op de pipelinedetails en boven het joblog. `tags` kiezen die runner niet. `services` delen één netwerk met de job; er is geen healthcheck verder dan een gestarte container.
84
84
85## Editor
85## Editor
86
86
internal/runner/prepare_log_test.go added +80 −0
@@ -0,0 +1,80 @@
1 package runner
2
3 import (
4 "os/exec"
5 "strings"
6 "testing"
7
8 "gitlab.com/Timfa/bluegit/internal/store"
9 )
10
11 func TestShellScriptNotesStayInEnvironmentSection(t *testing.T) {
12 job := store.Job{Before: "echo before\n", Script: "echo run\n", After: "echo after\n"}
13 note := placeNote{
14 Runner: "O'Hara $(touch /tmp/pwn)", Host: "build.example",
15 WorkDir: "/workspace", PipelineID: 12, JobID: 34,
16 }
17 script := shellScript(job, note)
18 start := strings.Index(script, "section_start:before:Preparing environment")
19 end := strings.Index(script, "section_end:before:Preparing environment")
20 if start < 0 || end < start {
21 t.Fatalf("sectie: %s", script)
22 }
23 body := script[start:end]
24 for _, want := range []string{
25 "echo " + shSingle("Running on O'Hara $(touch /tmp/pwn) via build.example..."),
26 "Working directory: /workspace",
27 "Pipeline #12, job #34",
28 } {
29 if !strings.Contains(body, want) {
30 t.Fatalf("ontbreekt %q in %s", want, body)
31 }
32 }
33 if strings.Index(body, "Pipeline #12") > strings.Index(body, "echo before") {
34 t.Fatal("info staat na before_script")
35 }
36 cmd := exec.Command("sh", "-n")
37 cmd.Stdin = strings.NewReader(script)
38 if out, err := cmd.CombinedOutput(); err != nil {
39 t.Fatalf("sh -n: %v %s\n%s", err, out, script)
40 }
41 }
42
43 func TestPlaceNoteDefaults(t *testing.T) {
44 lines := (placeNote{PipelineID: 7, JobID: 8}).lines()
45 if len(lines) != 3 || lines[0] != "Running on Steve via localhost..." || lines[1] != "Working directory: /workspace" || lines[2] != "Pipeline #7, job #8" {
46 t.Fatalf("%q", lines)
47 }
48 }
49
50 func TestDockerImageLines(t *testing.T) {
51 only := dockerImageLines("alpine:latest", "", nil)
52 if len(only) != 1 || only[0] != "Using docker image alpine:latest ..." {
53 t.Fatalf("zonder lokaal image: %q", only)
54 }
55 idOnly := dockerImageLines("alpine:latest", "sha256:abc", nil)
56 if len(idOnly) != 2 || idOnly[1] != "Using docker image sha256:abc for alpine:latest ..." {
57 t.Fatalf("alleen id: %q", idOnly)
58 }
59 full := dockerImageLines("alpine:latest", "sha256:abc", []string{
60 "other@sha256:nope",
61 "docker.io/library/alpine@sha256:def",
62 })
63 want := "Using docker image sha256:abc for alpine:latest with digest docker.io/library/alpine@sha256:def ..."
64 if len(full) != 2 || full[0] != "Using docker image alpine:latest ..." || full[1] != want {
65 t.Fatalf("digest: %q", full)
66 }
67 reg := dockerImageLines("localhost:5000/team/app:1", "sha256:fff", []string{
68 "localhost:5000/team/app@sha256:999",
69 })
70 if !strings.Contains(reg[1], "digest localhost:5000/team/app@sha256:999") {
71 t.Fatalf("registry: %q", reg)
72 }
73 }
74
75 func TestParseImageInspect(t *testing.T) {
76 id, digests := parseImageInspect("sha256:abc\nalpine@sha256:def\n\n")
77 if id != "sha256:abc" || len(digests) != 1 || digests[0] != "alpine@sha256:def" {
78 t.Fatalf("%s %q", id, digests)
79 }
80 }
@@ -0,0 +1,80 @@
1package runner
2
3import (
4 "os/exec"
5 "strings"
6 "testing"
7
8 "gitlab.com/Timfa/bluegit/internal/store"
9)
10
11func TestShellScriptNotesStayInEnvironmentSection(t *testing.T) {
12 job := store.Job{Before: "echo before\n", Script: "echo run\n", After: "echo after\n"}
13 note := placeNote{
14 Runner: "O'Hara $(touch /tmp/pwn)", Host: "build.example",
15 WorkDir: "/workspace", PipelineID: 12, JobID: 34,
16 }
17 script := shellScript(job, note)
18 start := strings.Index(script, "section_start:before:Preparing environment")
19 end := strings.Index(script, "section_end:before:Preparing environment")
20 if start < 0 || end < start {
21 t.Fatalf("sectie: %s", script)
22 }
23 body := script[start:end]
24 for _, want := range []string{
25 "echo " + shSingle("Running on O'Hara $(touch /tmp/pwn) via build.example..."),
26 "Working directory: /workspace",
27 "Pipeline #12, job #34",
28 } {
29 if !strings.Contains(body, want) {
30 t.Fatalf("ontbreekt %q in %s", want, body)
31 }
32 }
33 if strings.Index(body, "Pipeline #12") > strings.Index(body, "echo before") {
34 t.Fatal("info staat na before_script")
35 }
36 cmd := exec.Command("sh", "-n")
37 cmd.Stdin = strings.NewReader(script)
38 if out, err := cmd.CombinedOutput(); err != nil {
39 t.Fatalf("sh -n: %v %s\n%s", err, out, script)
40 }
41}
42
43func TestPlaceNoteDefaults(t *testing.T) {
44 lines := (placeNote{PipelineID: 7, JobID: 8}).lines()
45 if len(lines) != 3 || lines[0] != "Running on Steve via localhost..." || lines[1] != "Working directory: /workspace" || lines[2] != "Pipeline #7, job #8" {
46 t.Fatalf("%q", lines)
47 }
48}
49
50func TestDockerImageLines(t *testing.T) {
51 only := dockerImageLines("alpine:latest", "", nil)
52 if len(only) != 1 || only[0] != "Using docker image alpine:latest ..." {
53 t.Fatalf("zonder lokaal image: %q", only)
54 }
55 idOnly := dockerImageLines("alpine:latest", "sha256:abc", nil)
56 if len(idOnly) != 2 || idOnly[1] != "Using docker image sha256:abc for alpine:latest ..." {
57 t.Fatalf("alleen id: %q", idOnly)
58 }
59 full := dockerImageLines("alpine:latest", "sha256:abc", []string{
60 "other@sha256:nope",
61 "docker.io/library/alpine@sha256:def",
62 })
63 want := "Using docker image sha256:abc for alpine:latest with digest docker.io/library/alpine@sha256:def ..."
64 if len(full) != 2 || full[0] != "Using docker image alpine:latest ..." || full[1] != want {
65 t.Fatalf("digest: %q", full)
66 }
67 reg := dockerImageLines("localhost:5000/team/app:1", "sha256:fff", []string{
68 "localhost:5000/team/app@sha256:999",
69 })
70 if !strings.Contains(reg[1], "digest localhost:5000/team/app@sha256:999") {
71 t.Fatalf("registry: %q", reg)
72 }
73}
74
75func TestParseImageInspect(t *testing.T) {
76 id, digests := parseImageInspect("sha256:abc\nalpine@sha256:def\n\n")
77 if id != "sha256:abc" || len(digests) != 1 || digests[0] != "alpine@sha256:def" {
78 t.Fatalf("%s %q", id, digests)
79 }
80}
internal/runner/runner.go +134 −2
@@ -30,6 +30,7 @@ type Runner struct {
30 30 Storage string
31 31 BaseURL string
32 32 Network string
33 Name string
33 34 Timeout time.Duration
34 35 Log *slog.Logger
35 36 OnEvent func(repoID int64, ev webhook.Event)
@@ -328,7 +329,12 @@ func (r *Runner) runOne(ctx context.Context, p store.Pipeline, job store.Job) ([
328 329 return nil, err
329 330 }
330 331 scriptPath := filepath.Join(work, ".bluegit-job.sh")
331 if err := os.WriteFile(scriptPath, []byte(shellScript(job)), 0o755); err != nil {
332 host, _ := os.Hostname()
333 script := shellScript(job, placeNote{
334 Runner: r.Name, Host: host, WorkDir: "/workspace",
335 PipelineID: p.ID, JobID: job.ID,
336 })
337 if err := os.WriteFile(scriptPath, []byte(script), 0o755); err != nil {
332 338 sink.closeSection()
333 339 return nil, err
334 340 }
@@ -344,9 +350,13 @@ func (r *Runner) runOne(ctx context.Context, p store.Pipeline, job store.Job) ([
344 350 }
345 351 sink.secrets = mask
346 352 if _, err := exec.LookPath(r.Docker); err != nil {
353 for _, line := range dockerImageLines(job.Image, "", nil) {
354 sink.emit(line)
355 }
347 356 sink.closeSection()
348 357 return mask, fmt.Errorf("runner_system_failure: docker (%s) is not available; the job only runs in a container", r.Docker)
349 358 }
359 r.logImage(ctx, sink, job.Image)
350 360 network := r.Network
351 361 if len(job.Services) > 0 {
352 362 net, cleanup, serr := r.startServices(ctx, job)
@@ -386,10 +396,46 @@ func (r *Runner) runOne(ctx context.Context, p store.Pipeline, job store.Job) ([
386 396 return mask, nil
387 397 }
388 398
389 func shellScript(job store.Job) string {
399 // placeNote zijn de vaste regels in de sectie Preparing environment.
400 type placeNote struct {
401 Runner string
402 Host string
403 WorkDir string
404 PipelineID int64
405 JobID int64
406 }
407
408 func (n placeNote) lines() []string {
409 runner := strings.TrimSpace(n.Runner)
410 if runner == "" {
411 runner = "Steve"
412 }
413 host := strings.TrimSpace(n.Host)
414 if host == "" {
415 host = "localhost"
416 }
417 dir := strings.TrimSpace(n.WorkDir)
418 if dir == "" {
419 dir = "/workspace"
420 }
421 return []string{
422 fmt.Sprintf("Running on %s via %s...", runner, host),
423 fmt.Sprintf("Working directory: %s", dir),
424 fmt.Sprintf("Pipeline #%d, job #%d", n.PipelineID, n.JobID),
425 }
426 }
427
428 func shSingle(s string) string {
429 return "'" + strings.ReplaceAll(s, "'", `'"'"'`) + "'"
430 }
431
432 func shellScript(job store.Job, note placeNote) string {
390 433 var b strings.Builder
391 434 b.WriteString("#!/bin/sh\ncd /workspace\nrc=0\n")
392 435 fmt.Fprintf(&b, "echo \"section_start:before:Preparing environment\"\n")
436 for _, line := range note.lines() {
437 fmt.Fprintf(&b, "echo %s\n", shSingle(line))
438 }
393 439 if strings.TrimSpace(job.Before) != "" {
394 440 b.WriteString("(\nset -e\n")
395 441 b.WriteString(job.Before)
@@ -422,6 +468,92 @@ func shellScript(job store.Job) string {
422 468 return b.String()
423 469 }
424 470
471 func (r *Runner) logImage(ctx context.Context, sink *logSink, image string) {
472 id, digests := r.inspectImage(ctx, image)
473 for _, line := range dockerImageLines(image, id, digests) {
474 sink.emit(line)
475 }
476 }
477
478 func (r *Runner) inspectImage(ctx context.Context, image string) (string, []string) {
479 if strings.TrimSpace(image) == "" || r.Docker == "" {
480 return "", nil
481 }
482 out, err := execOut(ctx, r.Docker, "image", "inspect", "--format", "{{.Id}}\n{{range .RepoDigests}}{{.}}\n{{end}}", image)
483 if err != nil {
484 return "", nil
485 }
486 return parseImageInspect(out)
487 }
488
489 func parseImageInspect(out string) (string, []string) {
490 lines := strings.Split(out, "\n")
491 id := ""
492 if len(lines) > 0 {
493 id = strings.TrimSpace(lines[0])
494 }
495 var digests []string
496 for _, line := range lines[1:] {
497 line = strings.TrimSpace(line)
498 if line != "" {
499 digests = append(digests, line)
500 }
501 }
502 return id, digests
503 }
504
505 func dockerImageLines(image, id string, digests []string) []string {
506 image = strings.TrimSpace(image)
507 lines := []string{fmt.Sprintf("Using docker image %s ...", image)}
508 id = strings.TrimSpace(id)
509 digest := matchingDigest(image, digests)
510 switch {
511 case id != "" && digest != "":
512 lines = append(lines, fmt.Sprintf("Using docker image %s for %s with digest %s ...", id, image, digest))
513 case digest != "":
514 lines = append(lines, fmt.Sprintf("Using digest %s for %s ...", digest, image))
515 case id != "":
516 lines = append(lines, fmt.Sprintf("Using docker image %s for %s ...", id, image))
517 }
518 return lines
519 }
520
521 func matchingDigest(image string, digests []string) string {
522 name := imageName(image)
523 fallback := ""
524 for _, digest := range digests {
525 digest = strings.TrimSpace(digest)
526 at := strings.LastIndex(digest, "@")
527 if digest == "" || at <= 0 {
528 continue
529 }
530 if fallback == "" {
531 fallback = digest
532 }
533 repo := digest[:at]
534 if repo == name || strings.HasSuffix(repo, "/"+name) || imageName(repo) == name {
535 return digest
536 }
537 }
538 return fallback
539 }
540
541 func imageName(image string) string {
542 image = strings.TrimSpace(image)
543 if i := strings.LastIndex(image, "@"); i >= 0 {
544 image = image[:i]
545 }
546 slash := strings.LastIndex(image, "/")
547 name := image
548 if slash >= 0 {
549 name = image[slash+1:]
550 }
551 if i := strings.Index(name, ":"); i >= 0 {
552 name = name[:i]
553 }
554 return name
555 }
556
425 557 func (r *Runner) materialize(ctx context.Context, p store.Pipeline, job store.Job, work string) error {
426 558 jobs, err := r.Store.JobsByPipeline(ctx, p.ID)
427 559 if err != nil {
@@ -30,6 +30,7 @@ type Runner struct {
30 Storage string
30 Storage string
31 BaseURL string
31 BaseURL string
32 Network string
32 Network string
33 Name string
33 Timeout time.Duration
34 Timeout time.Duration
34 Log *slog.Logger
35 Log *slog.Logger
35 OnEvent func(repoID int64, ev webhook.Event)
36 OnEvent func(repoID int64, ev webhook.Event)
@@ -328,7 +329,12 @@ func (r *Runner) runOne(ctx context.Context, p store.Pipeline, job store.Job) ([
328 return nil, err
329 return nil, err
329 }
330 }
330 scriptPath := filepath.Join(work, ".bluegit-job.sh")
331 scriptPath := filepath.Join(work, ".bluegit-job.sh")
331 if err := os.WriteFile(scriptPath, []byte(shellScript(job)), 0o755); err != nil {
332 host, _ := os.Hostname()
333 script := shellScript(job, placeNote{
334 Runner: r.Name, Host: host, WorkDir: "/workspace",
335 PipelineID: p.ID, JobID: job.ID,
336 })
337 if err := os.WriteFile(scriptPath, []byte(script), 0o755); err != nil {
332 sink.closeSection()
338 sink.closeSection()
333 return nil, err
339 return nil, err
334 }
340 }
@@ -344,9 +350,13 @@ func (r *Runner) runOne(ctx context.Context, p store.Pipeline, job store.Job) ([
344 }
350 }
345 sink.secrets = mask
351 sink.secrets = mask
346 if _, err := exec.LookPath(r.Docker); err != nil {
352 if _, err := exec.LookPath(r.Docker); err != nil {
353 for _, line := range dockerImageLines(job.Image, "", nil) {
354 sink.emit(line)
355 }
347 sink.closeSection()
356 sink.closeSection()
348 return mask, fmt.Errorf("runner_system_failure: docker (%s) is not available; the job only runs in a container", r.Docker)
357 return mask, fmt.Errorf("runner_system_failure: docker (%s) is not available; the job only runs in a container", r.Docker)
349 }
358 }
359 r.logImage(ctx, sink, job.Image)
350 network := r.Network
360 network := r.Network
351 if len(job.Services) > 0 {
361 if len(job.Services) > 0 {
352 net, cleanup, serr := r.startServices(ctx, job)
362 net, cleanup, serr := r.startServices(ctx, job)
@@ -386,10 +396,46 @@ func (r *Runner) runOne(ctx context.Context, p store.Pipeline, job store.Job) ([
386 return mask, nil
396 return mask, nil
387}
397}
388
398
389func shellScript(job store.Job) string {
399// placeNote zijn de vaste regels in de sectie Preparing environment.
400type placeNote struct {
401 Runner string
402 Host string
403 WorkDir string
404 PipelineID int64
405 JobID int64
406}
407
408func (n placeNote) lines() []string {
409 runner := strings.TrimSpace(n.Runner)
410 if runner == "" {
411 runner = "Steve"
412 }
413 host := strings.TrimSpace(n.Host)
414 if host == "" {
415 host = "localhost"
416 }
417 dir := strings.TrimSpace(n.WorkDir)
418 if dir == "" {
419 dir = "/workspace"
420 }
421 return []string{
422 fmt.Sprintf("Running on %s via %s...", runner, host),
423 fmt.Sprintf("Working directory: %s", dir),
424 fmt.Sprintf("Pipeline #%d, job #%d", n.PipelineID, n.JobID),
425 }
426}
427
428func shSingle(s string) string {
429 return "'" + strings.ReplaceAll(s, "'", `'"'"'`) + "'"
430}
431
432func shellScript(job store.Job, note placeNote) string {
390 var b strings.Builder
433 var b strings.Builder
391 b.WriteString("#!/bin/sh\ncd /workspace\nrc=0\n")
434 b.WriteString("#!/bin/sh\ncd /workspace\nrc=0\n")
392 fmt.Fprintf(&b, "echo \"section_start:before:Preparing environment\"\n")
435 fmt.Fprintf(&b, "echo \"section_start:before:Preparing environment\"\n")
436 for _, line := range note.lines() {
437 fmt.Fprintf(&b, "echo %s\n", shSingle(line))
438 }
393 if strings.TrimSpace(job.Before) != "" {
439 if strings.TrimSpace(job.Before) != "" {
394 b.WriteString("(\nset -e\n")
440 b.WriteString("(\nset -e\n")
395 b.WriteString(job.Before)
441 b.WriteString(job.Before)
@@ -422,6 +468,92 @@ func shellScript(job store.Job) string {
422 return b.String()
468 return b.String()
423}
469}
424
470
471func (r *Runner) logImage(ctx context.Context, sink *logSink, image string) {
472 id, digests := r.inspectImage(ctx, image)
473 for _, line := range dockerImageLines(image, id, digests) {
474 sink.emit(line)
475 }
476}
477
478func (r *Runner) inspectImage(ctx context.Context, image string) (string, []string) {
479 if strings.TrimSpace(image) == "" || r.Docker == "" {
480 return "", nil
481 }
482 out, err := execOut(ctx, r.Docker, "image", "inspect", "--format", "{{.Id}}\n{{range .RepoDigests}}{{.}}\n{{end}}", image)
483 if err != nil {
484 return "", nil
485 }
486 return parseImageInspect(out)
487}
488
489func parseImageInspect(out string) (string, []string) {
490 lines := strings.Split(out, "\n")
491 id := ""
492 if len(lines) > 0 {
493 id = strings.TrimSpace(lines[0])
494 }
495 var digests []string
496 for _, line := range lines[1:] {
497 line = strings.TrimSpace(line)
498 if line != "" {
499 digests = append(digests, line)
500 }
501 }
502 return id, digests
503}
504
505func dockerImageLines(image, id string, digests []string) []string {
506 image = strings.TrimSpace(image)
507 lines := []string{fmt.Sprintf("Using docker image %s ...", image)}
508 id = strings.TrimSpace(id)
509 digest := matchingDigest(image, digests)
510 switch {
511 case id != "" && digest != "":
512 lines = append(lines, fmt.Sprintf("Using docker image %s for %s with digest %s ...", id, image, digest))
513 case digest != "":
514 lines = append(lines, fmt.Sprintf("Using digest %s for %s ...", digest, image))
515 case id != "":
516 lines = append(lines, fmt.Sprintf("Using docker image %s for %s ...", id, image))
517 }
518 return lines
519}
520
521func matchingDigest(image string, digests []string) string {
522 name := imageName(image)
523 fallback := ""
524 for _, digest := range digests {
525 digest = strings.TrimSpace(digest)
526 at := strings.LastIndex(digest, "@")
527 if digest == "" || at <= 0 {
528 continue
529 }
530 if fallback == "" {
531 fallback = digest
532 }
533 repo := digest[:at]
534 if repo == name || strings.HasSuffix(repo, "/"+name) || imageName(repo) == name {
535 return digest
536 }
537 }
538 return fallback
539}
540
541func imageName(image string) string {
542 image = strings.TrimSpace(image)
543 if i := strings.LastIndex(image, "@"); i >= 0 {
544 image = image[:i]
545 }
546 slash := strings.LastIndex(image, "/")
547 name := image
548 if slash >= 0 {
549 name = image[slash+1:]
550 }
551 if i := strings.Index(name, ":"); i >= 0 {
552 name = name[:i]
553 }
554 return name
555}
556
425func (r *Runner) materialize(ctx context.Context, p store.Pipeline, job store.Job, work string) error {
557func (r *Runner) materialize(ctx context.Context, p store.Pipeline, job store.Job, work string) error {
426 jobs, err := r.Store.JobsByPipeline(ctx, p.ID)
558 jobs, err := r.Store.JobsByPipeline(ctx, p.ID)
427 if err != nil {
559 if err != nil {
internal/server/pipeline_page_test.go +1 −1
@@ -139,7 +139,7 @@ func TestPipelinePages(t *testing.T) {
139 139 for _, want := range []string{
140 140 "Filter pipelines", "Show Pipeline ID", "Created by", "Stages",
141 141 "Warning", "Failed", "v0.0.26", "feat: groene run",
142 `data-tip="test: warning"`, `data-tip="deploy: skipped"`,
142 `data-tip="test: warning"`, `data-tip="deploy: skipped"`, `popover="manual"`,
143 143 "class=\"stage-dot failed\"", "flake", "build",
144 144 } {
145 145 if !strings.Contains(page, want) {
@@ -139,7 +139,7 @@ func TestPipelinePages(t *testing.T) {
139 for _, want := range []string{
139 for _, want := range []string{
140 "Filter pipelines", "Show Pipeline ID", "Created by", "Stages",
140 "Filter pipelines", "Show Pipeline ID", "Created by", "Stages",
141 "Warning", "Failed", "v0.0.26", "feat: groene run",
141 "Warning", "Failed", "v0.0.26", "feat: groene run",
142 `data-tip="test: warning"`, `data-tip="deploy: skipped"`,
142 `data-tip="test: warning"`, `data-tip="deploy: skipped"`, `popover="manual"`,
143 "class=\"stage-dot failed\"", "flake", "build",
143 "class=\"stage-dot failed\"", "flake", "build",
144 } {
144 } {
145 if !strings.Contains(page, want) {
145 if !strings.Contains(page, want) {
internal/server/static/float.js added +259 −0
@@ -0,0 +1,259 @@
1 (function () {
2 var GAP = 8;
3 var tracked = [];
4
5 function layer(el) {
6 return el && typeof el.showPopover === "function";
7 }
8
9 function openLayer(el) {
10 if (!el) {
11 return;
12 }
13 if (layer(el)) {
14 if (!el.hasAttribute("popover")) {
15 el.setAttribute("popover", "manual");
16 }
17 if (!el.matches(":popover-open")) {
18 el.showPopover();
19 }
20 return;
21 }
22 if (el.parentNode !== document.body) {
23 el._home = el.parentNode;
24 document.body.appendChild(el);
25 }
26 el.hidden = false;
27 }
28
29 function closeLayer(el) {
30 if (!el) {
31 return;
32 }
33 if (layer(el) && el.hasAttribute("popover")) {
34 if (el.matches(":popover-open")) {
35 el.hidePopover();
36 }
37 return;
38 }
39 el.hidden = true;
40 }
41
42 function isOpen(el) {
43 if (!el) {
44 return false;
45 }
46 if (el.hasAttribute("popover")) {
47 return el.matches(":popover-open");
48 }
49 return !el.hidden;
50 }
51
52 function place(el, anchor, mode) {
53 var rect = anchor.getBoundingClientRect();
54 el.style.left = "0px";
55 el.style.top = "0px";
56 var w = el.offsetWidth;
57 var h = el.offsetHeight;
58 var vw = document.documentElement.clientWidth;
59 var vh = document.documentElement.clientHeight;
60 var left;
61 var top;
62 if (mode === "above-center") {
63 left = rect.left + (rect.width - w) / 2;
64 top = rect.top - GAP - h;
65 if (top < GAP) {
66 top = rect.bottom + GAP;
67 }
68 } else if (mode === "below-end") {
69 left = rect.right - w;
70 top = rect.bottom + GAP;
71 if (top + h > vh - GAP && rect.top - GAP - h >= GAP) {
72 top = rect.top - GAP - h;
73 }
74 } else {
75 left = rect.left;
76 top = rect.bottom + GAP;
77 if (top + h > vh - GAP && rect.top - GAP - h >= GAP) {
78 top = rect.top - GAP - h;
79 }
80 }
81 if (left + w > vw - GAP) {
82 left = vw - GAP - w;
83 }
84 if (left < GAP) {
85 left = GAP;
86 }
87 if (top + h > vh - GAP) {
88 top = Math.max(GAP, vh - GAP - h);
89 }
90 if (top < GAP) {
91 top = GAP;
92 }
93 el.style.left = Math.round(left) + "px";
94 el.style.top = Math.round(top) + "px";
95 }
96
97 function track(el, anchor, mode) {
98 tracked = tracked.filter(function (item) { return item.el !== el; });
99 tracked.push({ el: el, anchor: anchor, mode: mode });
100 place(el, anchor, mode);
101 }
102
103 function untrack(el) {
104 tracked = tracked.filter(function (item) { return item.el !== el; });
105 }
106
107 function reposition() {
108 tracked.forEach(function (item) {
109 if (isOpen(item.el)) {
110 place(item.el, item.anchor, item.mode);
111 }
112 });
113 }
114 window.addEventListener("scroll", reposition, true);
115 window.addEventListener("resize", reposition);
116
117 var tip = document.createElement("div");
118 tip.className = "float-tip";
119 tip.setAttribute("role", "tooltip");
120 tip.setAttribute("popover", "manual");
121 document.body.appendChild(tip);
122 var tipAnchor = null;
123
124 function restoreTitle(el) {
125 if (el && el.hasAttribute("data-native-title")) {
126 el.setAttribute("title", el.getAttribute("data-native-title"));
127 el.removeAttribute("data-native-title");
128 }
129 }
130
131 function hideTip() {
132 restoreTitle(tipAnchor);
133 tipAnchor = null;
134 closeLayer(tip);
135 untrack(tip);
136 }
137
138 function showTip(el) {
139 if (!el || el.closest(".stage-pop, .float-tip")) {
140 return;
141 }
142 var stage = el.closest(".stage");
143 if (stage && stage.classList.contains("open") && el.matches(".stage-dot")) {
144 return;
145 }
146 var text = el.getAttribute("data-tip") || "";
147 if (!text && (el.hasAttribute("title") || el.hasAttribute("data-native-title"))) {
148 text = el.getAttribute("data-native-title") || el.getAttribute("title") || "";
149 if (el.hasAttribute("title")) {
150 el.setAttribute("data-native-title", text);
151 el.removeAttribute("title");
152 }
153 }
154 if (!text) {
155 return;
156 }
157 if (tipAnchor && tipAnchor !== el) {
158 restoreTitle(tipAnchor);
159 }
160 tipAnchor = el;
161 tip.textContent = text;
162 tip.classList.toggle("heat", el.classList.contains("sq"));
163 openLayer(tip);
164 track(tip, el, "above-center");
165 }
166
167 document.addEventListener("pointerover", function (ev) {
168 var el = ev.target.closest("[data-tip], .sq[title], .sq[data-native-title]");
169 if (el) {
170 showTip(el);
171 }
172 });
173 document.addEventListener("pointerout", function (ev) {
174 if (!tipAnchor) {
175 return;
176 }
177 if (ev.target === tipAnchor || tipAnchor.contains(ev.target)) {
178 if (!tipAnchor.contains(ev.relatedTarget)) {
179 hideTip();
180 }
181 }
182 });
183 document.addEventListener("focusin", function (ev) {
184 var el = ev.target.closest("[data-tip], .sq[title], .sq[data-native-title]");
185 if (el) {
186 showTip(el);
187 }
188 });
189 document.addEventListener("focusout", function (ev) {
190 if (tipAnchor && (ev.target === tipAnchor || tipAnchor.contains(ev.target))) {
191 hideTip();
192 }
193 });
194
195 function popOf(stage) {
196 return stage.querySelector(".stage-pop") || stage._pop || null;
197 }
198
199 function closeStages() {
200 document.querySelectorAll(".stage.open").forEach(function (stage) {
201 stage.classList.remove("open");
202 var pop = popOf(stage);
203 closeLayer(pop);
204 untrack(pop);
205 });
206 }
207
208 document.addEventListener("click", function (ev) {
209 var btn = ev.target.closest("button.stage-dot[data-tip]");
210 if (btn) {
211 ev.stopPropagation();
212 var stage = btn.parentElement;
213 var pop = popOf(stage);
214 if (pop) {
215 stage._pop = pop;
216 }
217 var was = stage.classList.contains("open");
218 hideTip();
219 closeStages();
220 if (!was && pop) {
221 stage.classList.add("open");
222 openLayer(pop);
223 track(pop, btn, "below-start");
224 }
225 return;
226 }
227 if (ev.target.closest(".stage-pop")) {
228 return;
229 }
230 closeStages();
231 });
232 document.addEventListener("keydown", function (ev) {
233 if (ev.key === "Escape") {
234 hideTip();
235 closeStages();
236 }
237 });
238
239 document.querySelectorAll("details").forEach(function (det) {
240 var panel = det.querySelector(":scope > .menu-panel, :scope > form");
241 if (!panel) {
242 return;
243 }
244 if (!panel.classList.contains("menu-panel") && !det.classList.contains("showid")) {
245 return;
246 }
247 panel.setAttribute("popover", "manual");
248 det.addEventListener("toggle", function () {
249 var summary = det.querySelector("summary");
250 if (det.open && summary) {
251 openLayer(panel);
252 track(panel, summary, "below-end");
253 } else {
254 closeLayer(panel);
255 untrack(panel);
256 }
257 });
258 });
259 })();
@@ -0,0 +1,259 @@
1(function () {
2 var GAP = 8;
3 var tracked = [];
4
5 function layer(el) {
6 return el && typeof el.showPopover === "function";
7 }
8
9 function openLayer(el) {
10 if (!el) {
11 return;
12 }
13 if (layer(el)) {
14 if (!el.hasAttribute("popover")) {
15 el.setAttribute("popover", "manual");
16 }
17 if (!el.matches(":popover-open")) {
18 el.showPopover();
19 }
20 return;
21 }
22 if (el.parentNode !== document.body) {
23 el._home = el.parentNode;
24 document.body.appendChild(el);
25 }
26 el.hidden = false;
27 }
28
29 function closeLayer(el) {
30 if (!el) {
31 return;
32 }
33 if (layer(el) && el.hasAttribute("popover")) {
34 if (el.matches(":popover-open")) {
35 el.hidePopover();
36 }
37 return;
38 }
39 el.hidden = true;
40 }
41
42 function isOpen(el) {
43 if (!el) {
44 return false;
45 }
46 if (el.hasAttribute("popover")) {
47 return el.matches(":popover-open");
48 }
49 return !el.hidden;
50 }
51
52 function place(el, anchor, mode) {
53 var rect = anchor.getBoundingClientRect();
54 el.style.left = "0px";
55 el.style.top = "0px";
56 var w = el.offsetWidth;
57 var h = el.offsetHeight;
58 var vw = document.documentElement.clientWidth;
59 var vh = document.documentElement.clientHeight;
60 var left;
61 var top;
62 if (mode === "above-center") {
63 left = rect.left + (rect.width - w) / 2;
64 top = rect.top - GAP - h;
65 if (top < GAP) {
66 top = rect.bottom + GAP;
67 }
68 } else if (mode === "below-end") {
69 left = rect.right - w;
70 top = rect.bottom + GAP;
71 if (top + h > vh - GAP && rect.top - GAP - h >= GAP) {
72 top = rect.top - GAP - h;
73 }
74 } else {
75 left = rect.left;
76 top = rect.bottom + GAP;
77 if (top + h > vh - GAP && rect.top - GAP - h >= GAP) {
78 top = rect.top - GAP - h;
79 }
80 }
81 if (left + w > vw - GAP) {
82 left = vw - GAP - w;
83 }
84 if (left < GAP) {
85 left = GAP;
86 }
87 if (top + h > vh - GAP) {
88 top = Math.max(GAP, vh - GAP - h);
89 }
90 if (top < GAP) {
91 top = GAP;
92 }
93 el.style.left = Math.round(left) + "px";
94 el.style.top = Math.round(top) + "px";
95 }
96
97 function track(el, anchor, mode) {
98 tracked = tracked.filter(function (item) { return item.el !== el; });
99 tracked.push({ el: el, anchor: anchor, mode: mode });
100 place(el, anchor, mode);
101 }
102
103 function untrack(el) {
104 tracked = tracked.filter(function (item) { return item.el !== el; });
105 }
106
107 function reposition() {
108 tracked.forEach(function (item) {
109 if (isOpen(item.el)) {
110 place(item.el, item.anchor, item.mode);
111 }
112 });
113 }
114 window.addEventListener("scroll", reposition, true);
115 window.addEventListener("resize", reposition);
116
117 var tip = document.createElement("div");
118 tip.className = "float-tip";
119 tip.setAttribute("role", "tooltip");
120 tip.setAttribute("popover", "manual");
121 document.body.appendChild(tip);
122 var tipAnchor = null;
123
124 function restoreTitle(el) {
125 if (el && el.hasAttribute("data-native-title")) {
126 el.setAttribute("title", el.getAttribute("data-native-title"));
127 el.removeAttribute("data-native-title");
128 }
129 }
130
131 function hideTip() {
132 restoreTitle(tipAnchor);
133 tipAnchor = null;
134 closeLayer(tip);
135 untrack(tip);
136 }
137
138 function showTip(el) {
139 if (!el || el.closest(".stage-pop, .float-tip")) {
140 return;
141 }
142 var stage = el.closest(".stage");
143 if (stage && stage.classList.contains("open") && el.matches(".stage-dot")) {
144 return;
145 }
146 var text = el.getAttribute("data-tip") || "";
147 if (!text && (el.hasAttribute("title") || el.hasAttribute("data-native-title"))) {
148 text = el.getAttribute("data-native-title") || el.getAttribute("title") || "";
149 if (el.hasAttribute("title")) {
150 el.setAttribute("data-native-title", text);
151 el.removeAttribute("title");
152 }
153 }
154 if (!text) {
155 return;
156 }
157 if (tipAnchor && tipAnchor !== el) {
158 restoreTitle(tipAnchor);
159 }
160 tipAnchor = el;
161 tip.textContent = text;
162 tip.classList.toggle("heat", el.classList.contains("sq"));
163 openLayer(tip);
164 track(tip, el, "above-center");
165 }
166
167 document.addEventListener("pointerover", function (ev) {
168 var el = ev.target.closest("[data-tip], .sq[title], .sq[data-native-title]");
169 if (el) {
170 showTip(el);
171 }
172 });
173 document.addEventListener("pointerout", function (ev) {
174 if (!tipAnchor) {
175 return;
176 }
177 if (ev.target === tipAnchor || tipAnchor.contains(ev.target)) {
178 if (!tipAnchor.contains(ev.relatedTarget)) {
179 hideTip();
180 }
181 }
182 });
183 document.addEventListener("focusin", function (ev) {
184 var el = ev.target.closest("[data-tip], .sq[title], .sq[data-native-title]");
185 if (el) {
186 showTip(el);
187 }
188 });
189 document.addEventListener("focusout", function (ev) {
190 if (tipAnchor && (ev.target === tipAnchor || tipAnchor.contains(ev.target))) {
191 hideTip();
192 }
193 });
194
195 function popOf(stage) {
196 return stage.querySelector(".stage-pop") || stage._pop || null;
197 }
198
199 function closeStages() {
200 document.querySelectorAll(".stage.open").forEach(function (stage) {
201 stage.classList.remove("open");
202 var pop = popOf(stage);
203 closeLayer(pop);
204 untrack(pop);
205 });
206 }
207
208 document.addEventListener("click", function (ev) {
209 var btn = ev.target.closest("button.stage-dot[data-tip]");
210 if (btn) {
211 ev.stopPropagation();
212 var stage = btn.parentElement;
213 var pop = popOf(stage);
214 if (pop) {
215 stage._pop = pop;
216 }
217 var was = stage.classList.contains("open");
218 hideTip();
219 closeStages();
220 if (!was && pop) {
221 stage.classList.add("open");
222 openLayer(pop);
223 track(pop, btn, "below-start");
224 }
225 return;
226 }
227 if (ev.target.closest(".stage-pop")) {
228 return;
229 }
230 closeStages();
231 });
232 document.addEventListener("keydown", function (ev) {
233 if (ev.key === "Escape") {
234 hideTip();
235 closeStages();
236 }
237 });
238
239 document.querySelectorAll("details").forEach(function (det) {
240 var panel = det.querySelector(":scope > .menu-panel, :scope > form");
241 if (!panel) {
242 return;
243 }
244 if (!panel.classList.contains("menu-panel") && !det.classList.contains("showid")) {
245 return;
246 }
247 panel.setAttribute("popover", "manual");
248 det.addEventListener("toggle", function () {
249 var summary = det.querySelector("summary");
250 if (det.open && summary) {
251 openLayer(panel);
252 track(panel, summary, "below-end");
253 } else {
254 closeLayer(panel);
255 untrack(panel);
256 }
257 });
258 });
259})();
internal/server/static/pipeline.js +3 −37
@@ -1,40 +1,4 @@
1 1 (function () {
2 function closeStages(except) {
3 document.querySelectorAll(".stage.open").forEach(function (stage) {
4 if (stage === except) {
5 return;
6 }
7 stage.classList.remove("open");
8 var pop = stage.querySelector(".stage-pop");
9 if (pop) {
10 pop.hidden = true;
11 }
12 });
13 }
14
15 document.querySelectorAll(".stage-dot[data-tip]").forEach(function (btn) {
16 btn.addEventListener("click", function (ev) {
17 ev.stopPropagation();
18 var stage = btn.parentElement;
19 var pop = stage.querySelector(".stage-pop");
20 var open = stage.classList.contains("open");
21 closeStages(null);
22 if (!open && pop) {
23 stage.classList.add("open");
24 pop.hidden = false;
25 }
26 });
27 });
28
29 document.addEventListener("click", function () {
30 closeStages(null);
31 });
32 document.addEventListener("keydown", function (ev) {
33 if (ev.key === "Escape") {
34 closeStages(null);
35 }
36 });
37
38 2 document.querySelectorAll(".section-toggle").forEach(function (btn) {
39 3 btn.addEventListener("click", function () {
40 4 var sec = btn.parentElement;
@@ -103,8 +67,10 @@
103 67 }
104 68 var wrapBtn = document.querySelector("[data-log-wrap]");
105 69 if (wrapBtn && log) {
70 wrapBtn.setAttribute("aria-pressed", log.classList.contains("nowrap") ? "false" : "true");
106 71 wrapBtn.addEventListener("click", function () {
107 log.classList.toggle("wrap");
72 var off = log.classList.toggle("nowrap");
73 wrapBtn.setAttribute("aria-pressed", off ? "false" : "true");
108 74 });
109 75 }
110 76 var topBtn = document.querySelector("[data-log-top]");
@@ -1,40 +1,4 @@
1(function () {
1(function () {
2 function closeStages(except) {
3 document.querySelectorAll(".stage.open").forEach(function (stage) {
4 if (stage === except) {
5 return;
6 }
7 stage.classList.remove("open");
8 var pop = stage.querySelector(".stage-pop");
9 if (pop) {
10 pop.hidden = true;
11 }
12 });
13 }
14
15 document.querySelectorAll(".stage-dot[data-tip]").forEach(function (btn) {
16 btn.addEventListener("click", function (ev) {
17 ev.stopPropagation();
18 var stage = btn.parentElement;
19 var pop = stage.querySelector(".stage-pop");
20 var open = stage.classList.contains("open");
21 closeStages(null);
22 if (!open && pop) {
23 stage.classList.add("open");
24 pop.hidden = false;
25 }
26 });
27 });
28
29 document.addEventListener("click", function () {
30 closeStages(null);
31 });
32 document.addEventListener("keydown", function (ev) {
33 if (ev.key === "Escape") {
34 closeStages(null);
35 }
36 });
37
38 document.querySelectorAll(".section-toggle").forEach(function (btn) {
2 document.querySelectorAll(".section-toggle").forEach(function (btn) {
39 btn.addEventListener("click", function () {
3 btn.addEventListener("click", function () {
40 var sec = btn.parentElement;
4 var sec = btn.parentElement;
@@ -103,8 +67,10 @@
103 }
67 }
104 var wrapBtn = document.querySelector("[data-log-wrap]");
68 var wrapBtn = document.querySelector("[data-log-wrap]");
105 if (wrapBtn && log) {
69 if (wrapBtn && log) {
70 wrapBtn.setAttribute("aria-pressed", log.classList.contains("nowrap") ? "false" : "true");
106 wrapBtn.addEventListener("click", function () {
71 wrapBtn.addEventListener("click", function () {
107 log.classList.toggle("wrap");
72 var off = log.classList.toggle("nowrap");
73 wrapBtn.setAttribute("aria-pressed", off ? "false" : "true");
108 });
74 });
109 }
75 }
110 var topBtn = document.querySelector("[data-log-top]");
76 var topBtn = document.querySelector("[data-log-top]");
internal/server/static/style.css +35 −22
@@ -186,6 +186,18 @@ td, th { text-align: left; padding: var(--sp-2) var(--sp-3); border-bottom: 1px
186 186 background: white; border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem;
187 187 box-shadow: var(--shadow);
188 188 }
189 .menu-panel[popover]:popover-open,
190 .showid form[popover]:popover-open,
191 .stage-pop:popover-open,
192 .float-tip:popover-open {
193 position: fixed;
194 inset: auto;
195 margin: 0;
196 width: max-content;
197 max-width: min(420px, calc(100vw - 16px));
198 height: auto;
199 }
200 .menu-panel[popover]:popover-open { width: min(420px, calc(100vw - 16px)); }
189 201 .copyline { display: flex; gap: 0.4rem; }
190 202 .copyline input { font-family: ui-monospace, monospace; font-size: 0.85rem; }
191 203 .commitbar {
@@ -267,12 +279,6 @@ table.code td.src { white-space: pre; }
267 279 }
268 280 .heat-col { display: grid; grid-auto-rows: 11px; row-gap: 3px; }
269 281 .sq { width: 11px; height: 11px; border-radius: 2px; display: block; position: relative; }
270 .sq[title]:hover::after, .sq[title]:focus::after {
271 content: attr(title);
272 position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%);
273 background: #142033; color: white; padding: 0.28rem 0.5rem; border-radius: 6px;
274 font-size: 0.78rem; line-height: 1.2; white-space: nowrap; z-index: 5; pointer-events: none;
275 }
276 282 .sq.off { background: transparent; }
277 283 .sq.lv0 { background: #e6edf5; }
278 284 .sq.lv1 { background: #b9d4f6; }
@@ -409,6 +415,8 @@ label.sugcheck input { width: auto; }
409 415 display: flex; gap: 0.4rem; width: 18rem; padding: 0.6rem;
410 416 background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
411 417 }
418 .showid form[popover]:not(:popover-open) { display: none; }
419 .showid form[popover]:popover-open { display: flex; width: min(18rem, calc(100vw - 16px)); }
412 420 .showid form input { width: auto; flex: 1; }
413 421 table.pipes td { padding: var(--sp-2) var(--sp-3); }
414 422 table.pipes .pipeid { font-weight: 700; }
@@ -480,19 +488,18 @@ button.stage-dot {
480 488 width: 26px; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
481 489 background: transparent; display: grid; place-items: center; position: relative;
482 490 }
483 button.stage-dot:hover::after, button.stage-dot:focus-visible::after {
484 content: attr(data-tip);
485 position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
491 .stage.open button.stage-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1f75cb; }
492 .float-tip {
493 border: 0; padding: 0.28rem 0.5rem; border-radius: 6px;
486 494 background: #24292f; color: white; font-size: 0.75rem; font-weight: 600;
487 padding: 0.28rem 0.5rem; border-radius: 6px; white-space: nowrap; z-index: 7;
495 line-height: 1.2; white-space: nowrap; pointer-events: none;
488 496 }
489 .stage.open button.stage-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1f75cb; }
497 .float-tip.heat { background: #142033; font-size: 0.78rem; font-weight: 400; }
490 498 .stage-pop {
491 position: absolute; top: calc(100% + 10px); left: 0; z-index: 8; min-width: 220px;
499 min-width: min(220px, calc(100vw - 16px));
492 500 background: white; border: 1px solid var(--line); border-radius: 8px;
493 501 box-shadow: var(--shadow); padding: 0.7rem 0.85rem;
494 502 }
495 .stage-pop[hidden] { display: none; }
496 503 .stage-pop ul { list-style: none; margin: 0.35rem 0 0; padding: 0; }
497 504 .stage-pop a, .related a { display: flex; align-items: center; gap: 0.4rem; text-decoration: none; padding: 0.22rem 0; color: var(--ink); }
498 505 .stage-dot.sm { width: 16px; height: 16px; display: inline-grid; place-items: center; }
@@ -510,10 +517,11 @@ button.stage-dot:hover::after, button.stage-dot:focus-visible::after {
510 517 .contools .ghost, .contools a.ghost { padding: 0.3rem 0.55rem; background: white; }
511 518 .console {
512 519 color: #e6edf3; font-family: ui-monospace, monospace; font-size: 0.82rem;
513 max-height: 68vh; overflow: auto; padding: 0.35rem 0 0.8rem;
520 max-height: 68vh; overflow-x: hidden; overflow-y: auto; padding: 0.35rem 0 0.8rem;
514 521 }
515 .console.wrap code { white-space: pre-wrap; word-break: break-word; }
516 .console code { white-space: pre; }
522 .console.nowrap { overflow-x: auto; }
523 .console code { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
524 .console.nowrap code { white-space: pre; overflow-wrap: normal; }
517 525 .ansi-bold { font-weight: 700; }
518 526 .ansi-dim { opacity: 0.65; }
519 527 .ansi-italic { font-style: italic; }
@@ -553,7 +561,7 @@ button.stage-dot:hover::after, button.stage-dot:focus-visible::after {
553 561 .lognote { margin: 0.2rem 0.8rem 0.45rem; color: #8b949e; font-family: inherit; }
554 562 .logline, .logsec ol li {
555 563 display: grid; grid-template-columns: 3rem 5.4rem minmax(0, 1fr);
556 gap: 0.45rem; padding: 0 0.7rem; line-height: 1.45;
564 gap: 0.45rem; padding: 0 0.7rem; line-height: 1.45; min-width: 0;
557 565 }
558 566 .logsec ol { list-style: none; margin: 0; padding: 0; display: none; }
559 567 .logsec.open ol { display: block; }
@@ -562,10 +570,14 @@ button.stage-dot:hover::after, button.stage-dot:focus-visible::after {
562 570 .logline.hit, .logsec li.hit { background: #3d3416; }
563 571 .logline.hit.on, .logsec li.hit.on { background: #6b5710; }
564 572 button.section-toggle {
565 width: 100%; min-height: 0; background: transparent; color: #9ecbff; border: 0; border-radius: 0;
573 position: sticky; left: 0; z-index: 2; box-sizing: border-box;
574 width: 100%; max-width: 100%;
575 min-height: 0; background: #1e1e1e; color: #9ecbff; border: 0; border-radius: 0;
566 576 display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.7rem; text-align: left; font-weight: 650;
567 577 }
568 .section-toggle .pill { margin-left: auto; background: #2d333b; color: #d0d7de; border-color: #444c56; }
578 .section-toggle .sectitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
579 .section-toggle .pill { flex: none; margin-left: auto; background: #2d333b; color: #d0d7de; border-color: #444c56; }
580 .contools .ghost[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue-deep); border-color: var(--blue); }
569 581 .chev {
570 582 width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
571 583 border-left: 6px solid currentColor; display: inline-block;
@@ -598,16 +610,17 @@ button.section-toggle {
598 610 }
599 611 .ci-gutter span { display: block; }
600 612 .ci-gutter span.bad { background: #fde8e8; color: var(--bad); font-weight: 700; }
601 .ci-stage { position: relative; height: 24rem; }
613 .ci-stage { position: relative; display: grid; align-items: stretch; }
602 614 .ci-back, .ciedit textarea {
615 grid-area: 1 / 1;
603 616 font-family: ui-monospace, monospace; font-size: 0.86rem; line-height: 1.45;
604 617 padding: 0.55rem 0.7rem; margin: 0; white-space: pre; tab-size: 2;
605 618 }
606 .ci-back { position: absolute; inset: 0; overflow: hidden; color: var(--ink); pointer-events: none; }
619 .ci-back { position: relative; overflow: hidden; color: var(--ink); pointer-events: none; }
607 620 .codeline { min-height: 1.45em; }
608 621 .codeline.bad { background: #fff5f5; }
609 622 .ciedit textarea {
610 position: relative; width: 100%; height: 100%; border: 0; border-radius: 0;
623 position: relative; width: 100%; height: auto; align-self: stretch; border: 0; border-radius: 0;
611 624 background: transparent; color: transparent; caret-color: var(--ink); resize: none; overflow: auto;
612 625 }
613 626 .ciedit textarea::selection { background: rgba(31, 111, 235, 0.25); }
@@ -186,6 +186,18 @@ td, th { text-align: left; padding: var(--sp-2) var(--sp-3); border-bottom: 1px
186 background: white; border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem;
186 background: white; border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem;
187 box-shadow: var(--shadow);
187 box-shadow: var(--shadow);
188}
188}
189.menu-panel[popover]:popover-open,
190.showid form[popover]:popover-open,
191.stage-pop:popover-open,
192.float-tip:popover-open {
193 position: fixed;
194 inset: auto;
195 margin: 0;
196 width: max-content;
197 max-width: min(420px, calc(100vw - 16px));
198 height: auto;
199}
200.menu-panel[popover]:popover-open { width: min(420px, calc(100vw - 16px)); }
189.copyline { display: flex; gap: 0.4rem; }
201.copyline { display: flex; gap: 0.4rem; }
190.copyline input { font-family: ui-monospace, monospace; font-size: 0.85rem; }
202.copyline input { font-family: ui-monospace, monospace; font-size: 0.85rem; }
191.commitbar {
203.commitbar {
@@ -267,12 +279,6 @@ table.code td.src { white-space: pre; }
267}
279}
268.heat-col { display: grid; grid-auto-rows: 11px; row-gap: 3px; }
280.heat-col { display: grid; grid-auto-rows: 11px; row-gap: 3px; }
269.sq { width: 11px; height: 11px; border-radius: 2px; display: block; position: relative; }
281.sq { width: 11px; height: 11px; border-radius: 2px; display: block; position: relative; }
270.sq[title]:hover::after, .sq[title]:focus::after {
271 content: attr(title);
272 position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%);
273 background: #142033; color: white; padding: 0.28rem 0.5rem; border-radius: 6px;
274 font-size: 0.78rem; line-height: 1.2; white-space: nowrap; z-index: 5; pointer-events: none;
275}
276.sq.off { background: transparent; }
282.sq.off { background: transparent; }
277.sq.lv0 { background: #e6edf5; }
283.sq.lv0 { background: #e6edf5; }
278.sq.lv1 { background: #b9d4f6; }
284.sq.lv1 { background: #b9d4f6; }
@@ -409,6 +415,8 @@ label.sugcheck input { width: auto; }
409 display: flex; gap: 0.4rem; width: 18rem; padding: 0.6rem;
415 display: flex; gap: 0.4rem; width: 18rem; padding: 0.6rem;
410 background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
416 background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
411}
417}
418.showid form[popover]:not(:popover-open) { display: none; }
419.showid form[popover]:popover-open { display: flex; width: min(18rem, calc(100vw - 16px)); }
412.showid form input { width: auto; flex: 1; }
420.showid form input { width: auto; flex: 1; }
413table.pipes td { padding: var(--sp-2) var(--sp-3); }
421table.pipes td { padding: var(--sp-2) var(--sp-3); }
414table.pipes .pipeid { font-weight: 700; }
422table.pipes .pipeid { font-weight: 700; }
@@ -480,19 +488,18 @@ button.stage-dot {
480 width: 26px; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
488 width: 26px; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
481 background: transparent; display: grid; place-items: center; position: relative;
489 background: transparent; display: grid; place-items: center; position: relative;
482}
490}
483button.stage-dot:hover::after, button.stage-dot:focus-visible::after {
491.stage.open button.stage-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1f75cb; }
484 content: attr(data-tip);
492.float-tip {
485 position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
493 border: 0; padding: 0.28rem 0.5rem; border-radius: 6px;
486 background: #24292f; color: white; font-size: 0.75rem; font-weight: 600;
494 background: #24292f; color: white; font-size: 0.75rem; font-weight: 600;
487 padding: 0.28rem 0.5rem; border-radius: 6px; white-space: nowrap; z-index: 7;
495 line-height: 1.2; white-space: nowrap; pointer-events: none;
488}
496}
489.stage.open button.stage-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1f75cb; }
497.float-tip.heat { background: #142033; font-size: 0.78rem; font-weight: 400; }
490.stage-pop {
498.stage-pop {
491 position: absolute; top: calc(100% + 10px); left: 0; z-index: 8; min-width: 220px;
499 min-width: min(220px, calc(100vw - 16px));
492 background: white; border: 1px solid var(--line); border-radius: 8px;
500 background: white; border: 1px solid var(--line); border-radius: 8px;
493 box-shadow: var(--shadow); padding: 0.7rem 0.85rem;
501 box-shadow: var(--shadow); padding: 0.7rem 0.85rem;
494}
502}
495.stage-pop[hidden] { display: none; }
496.stage-pop ul { list-style: none; margin: 0.35rem 0 0; padding: 0; }
503.stage-pop ul { list-style: none; margin: 0.35rem 0 0; padding: 0; }
497.stage-pop a, .related a { display: flex; align-items: center; gap: 0.4rem; text-decoration: none; padding: 0.22rem 0; color: var(--ink); }
504.stage-pop a, .related a { display: flex; align-items: center; gap: 0.4rem; text-decoration: none; padding: 0.22rem 0; color: var(--ink); }
498.stage-dot.sm { width: 16px; height: 16px; display: inline-grid; place-items: center; }
505.stage-dot.sm { width: 16px; height: 16px; display: inline-grid; place-items: center; }
@@ -510,10 +517,11 @@ button.stage-dot:hover::after, button.stage-dot:focus-visible::after {
510.contools .ghost, .contools a.ghost { padding: 0.3rem 0.55rem; background: white; }
517.contools .ghost, .contools a.ghost { padding: 0.3rem 0.55rem; background: white; }
511.console {
518.console {
512 color: #e6edf3; font-family: ui-monospace, monospace; font-size: 0.82rem;
519 color: #e6edf3; font-family: ui-monospace, monospace; font-size: 0.82rem;
513 max-height: 68vh; overflow: auto; padding: 0.35rem 0 0.8rem;
520 max-height: 68vh; overflow-x: hidden; overflow-y: auto; padding: 0.35rem 0 0.8rem;
514}
521}
515.console.wrap code { white-space: pre-wrap; word-break: break-word; }
522.console.nowrap { overflow-x: auto; }
516.console code { white-space: pre; }
523.console code { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
524.console.nowrap code { white-space: pre; overflow-wrap: normal; }
517.ansi-bold { font-weight: 700; }
525.ansi-bold { font-weight: 700; }
518.ansi-dim { opacity: 0.65; }
526.ansi-dim { opacity: 0.65; }
519.ansi-italic { font-style: italic; }
527.ansi-italic { font-style: italic; }
@@ -553,7 +561,7 @@ button.stage-dot:hover::after, button.stage-dot:focus-visible::after {
553.lognote { margin: 0.2rem 0.8rem 0.45rem; color: #8b949e; font-family: inherit; }
561.lognote { margin: 0.2rem 0.8rem 0.45rem; color: #8b949e; font-family: inherit; }
554.logline, .logsec ol li {
562.logline, .logsec ol li {
555 display: grid; grid-template-columns: 3rem 5.4rem minmax(0, 1fr);
563 display: grid; grid-template-columns: 3rem 5.4rem minmax(0, 1fr);
556 gap: 0.45rem; padding: 0 0.7rem; line-height: 1.45;
564 gap: 0.45rem; padding: 0 0.7rem; line-height: 1.45; min-width: 0;
557}
565}
558.logsec ol { list-style: none; margin: 0; padding: 0; display: none; }
566.logsec ol { list-style: none; margin: 0; padding: 0; display: none; }
559.logsec.open ol { display: block; }
567.logsec.open ol { display: block; }
@@ -562,10 +570,14 @@ button.stage-dot:hover::after, button.stage-dot:focus-visible::after {
562.logline.hit, .logsec li.hit { background: #3d3416; }
570.logline.hit, .logsec li.hit { background: #3d3416; }
563.logline.hit.on, .logsec li.hit.on { background: #6b5710; }
571.logline.hit.on, .logsec li.hit.on { background: #6b5710; }
564button.section-toggle {
572button.section-toggle {
565 width: 100%; min-height: 0; background: transparent; color: #9ecbff; border: 0; border-radius: 0;
573 position: sticky; left: 0; z-index: 2; box-sizing: border-box;
574 width: 100%; max-width: 100%;
575 min-height: 0; background: #1e1e1e; color: #9ecbff; border: 0; border-radius: 0;
566 display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.7rem; text-align: left; font-weight: 650;
576 display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.7rem; text-align: left; font-weight: 650;
567}
577}
568.section-toggle .pill { margin-left: auto; background: #2d333b; color: #d0d7de; border-color: #444c56; }
578.section-toggle .sectitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
579.section-toggle .pill { flex: none; margin-left: auto; background: #2d333b; color: #d0d7de; border-color: #444c56; }
580.contools .ghost[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue-deep); border-color: var(--blue); }
569.chev {
581.chev {
570 width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
582 width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
571 border-left: 6px solid currentColor; display: inline-block;
583 border-left: 6px solid currentColor; display: inline-block;
@@ -598,16 +610,17 @@ button.section-toggle {
598}
610}
599.ci-gutter span { display: block; }
611.ci-gutter span { display: block; }
600.ci-gutter span.bad { background: #fde8e8; color: var(--bad); font-weight: 700; }
612.ci-gutter span.bad { background: #fde8e8; color: var(--bad); font-weight: 700; }
601.ci-stage { position: relative; height: 24rem; }
613.ci-stage { position: relative; display: grid; align-items: stretch; }
602.ci-back, .ciedit textarea {
614.ci-back, .ciedit textarea {
615 grid-area: 1 / 1;
603 font-family: ui-monospace, monospace; font-size: 0.86rem; line-height: 1.45;
616 font-family: ui-monospace, monospace; font-size: 0.86rem; line-height: 1.45;
604 padding: 0.55rem 0.7rem; margin: 0; white-space: pre; tab-size: 2;
617 padding: 0.55rem 0.7rem; margin: 0; white-space: pre; tab-size: 2;
605}
618}
606.ci-back { position: absolute; inset: 0; overflow: hidden; color: var(--ink); pointer-events: none; }
619.ci-back { position: relative; overflow: hidden; color: var(--ink); pointer-events: none; }
607.codeline { min-height: 1.45em; }
620.codeline { min-height: 1.45em; }
608.codeline.bad { background: #fff5f5; }
621.codeline.bad { background: #fff5f5; }
609.ciedit textarea {
622.ciedit textarea {
610 position: relative; width: 100%; height: 100%; border: 0; border-radius: 0;
623 position: relative; width: 100%; height: auto; align-self: stretch; border: 0; border-radius: 0;
611 background: transparent; color: transparent; caret-color: var(--ink); resize: none; overflow: auto;
624 background: transparent; color: transparent; caret-color: var(--ink); resize: none; overflow: auto;
612}
625}
613.ciedit textarea::selection { background: rgba(31, 111, 235, 0.25); }
626.ciedit textarea::selection { background: rgba(31, 111, 235, 0.25); }
internal/server/templates/collab.html +3 −3
@@ -33,7 +33,7 @@
33 33 {{range $pipe.Stages}}
34 34 <span class="stage">
35 35 <button type="button" class="stage-dot {{.Status}}" data-tip="{{.Tip}}" aria-label="{{.Tip}}"><span class="mark"></span></button>
36 <div class="stage-pop" hidden>
36 <div class="stage-pop" popover="manual">
37 37 <strong>{{t "pipe.stage"}}: {{.Name}}</strong>
38 38 <ul>
39 39 {{range .Jobs}}<li><a href="/{{$.Repo.FullPath}}/-/pipelines/{{$pipe.ID}}/jobs/{{.ID}}"><span class="stage-dot sm {{.Status}}"><span class="mark"></span></span>{{.Name}}</a></li>{{end}}
@@ -212,7 +212,7 @@
212 212 {{range .Stages}}
213 213 <span class="stage">
214 214 <button type="button" class="stage-dot {{.Status}}" data-tip="{{.Tip}}" aria-label="{{.Tip}}"><span class="mark"></span></button>
215 <div class="stage-pop" hidden>
215 <div class="stage-pop" popover="manual">
216 216 <strong>{{t "pipe.stage"}}: {{.Name}}</strong>
217 217 <ul>
218 218 {{range .Jobs}}<li><a href="/{{$.Repo.FullPath}}/-/pipelines/{{$pipe.ID}}/jobs/{{.ID}}"><span class="stage-dot sm {{.Status}}"><span class="mark"></span></span>{{.Name}}</a></li>{{end}}
@@ -262,7 +262,7 @@
262 262 <button type="button" class="ghost" data-log-prev aria-label="{{t "pipe.prev"}}">↑</button>
263 263 <button type="button" class="ghost" data-log-next aria-label="{{t "pipe.next"}}">↓</button>
264 264 <a class="ghost" href="/{{$.Repo.FullPath}}/-/pipelines/{{.Pipe.ID}}/jobs/{{.Job.ID}}/log?raw=1">{{t "pipe.raw"}}</a>
265 <button type="button" class="ghost" data-log-wrap>{{t "pipe.wrap"}}</button>
265 <button type="button" class="ghost" data-log-wrap aria-pressed="true">{{t "pipe.wrap"}}</button>
266 266 <button type="button" class="ghost" data-log-top>{{t "pipe.top"}}</button>
267 267 <button type="button" class="ghost" data-log-bottom>{{t "pipe.bottom"}}</button>
268 268 <button type="button" class="ghost" data-log-full>{{t "pipe.full"}}</button>
@@ -33,7 +33,7 @@
33 {{range $pipe.Stages}}
33 {{range $pipe.Stages}}
34 <span class="stage">
34 <span class="stage">
35 <button type="button" class="stage-dot {{.Status}}" data-tip="{{.Tip}}" aria-label="{{.Tip}}"><span class="mark"></span></button>
35 <button type="button" class="stage-dot {{.Status}}" data-tip="{{.Tip}}" aria-label="{{.Tip}}"><span class="mark"></span></button>
36 <div class="stage-pop" hidden>
36 <div class="stage-pop" popover="manual">
37 <strong>{{t "pipe.stage"}}: {{.Name}}</strong>
37 <strong>{{t "pipe.stage"}}: {{.Name}}</strong>
38 <ul>
38 <ul>
39 {{range .Jobs}}<li><a href="/{{$.Repo.FullPath}}/-/pipelines/{{$pipe.ID}}/jobs/{{.ID}}"><span class="stage-dot sm {{.Status}}"><span class="mark"></span></span>{{.Name}}</a></li>{{end}}
39 {{range .Jobs}}<li><a href="/{{$.Repo.FullPath}}/-/pipelines/{{$pipe.ID}}/jobs/{{.ID}}"><span class="stage-dot sm {{.Status}}"><span class="mark"></span></span>{{.Name}}</a></li>{{end}}
@@ -212,7 +212,7 @@
212 {{range .Stages}}
212 {{range .Stages}}
213 <span class="stage">
213 <span class="stage">
214 <button type="button" class="stage-dot {{.Status}}" data-tip="{{.Tip}}" aria-label="{{.Tip}}"><span class="mark"></span></button>
214 <button type="button" class="stage-dot {{.Status}}" data-tip="{{.Tip}}" aria-label="{{.Tip}}"><span class="mark"></span></button>
215 <div class="stage-pop" hidden>
215 <div class="stage-pop" popover="manual">
216 <strong>{{t "pipe.stage"}}: {{.Name}}</strong>
216 <strong>{{t "pipe.stage"}}: {{.Name}}</strong>
217 <ul>
217 <ul>
218 {{range .Jobs}}<li><a href="/{{$.Repo.FullPath}}/-/pipelines/{{$pipe.ID}}/jobs/{{.ID}}"><span class="stage-dot sm {{.Status}}"><span class="mark"></span></span>{{.Name}}</a></li>{{end}}
218 {{range .Jobs}}<li><a href="/{{$.Repo.FullPath}}/-/pipelines/{{$pipe.ID}}/jobs/{{.ID}}"><span class="stage-dot sm {{.Status}}"><span class="mark"></span></span>{{.Name}}</a></li>{{end}}
@@ -262,7 +262,7 @@
262 <button type="button" class="ghost" data-log-prev aria-label="{{t "pipe.prev"}}">↑</button>
262 <button type="button" class="ghost" data-log-prev aria-label="{{t "pipe.prev"}}">↑</button>
263 <button type="button" class="ghost" data-log-next aria-label="{{t "pipe.next"}}">↓</button>
263 <button type="button" class="ghost" data-log-next aria-label="{{t "pipe.next"}}">↓</button>
264 <a class="ghost" href="/{{$.Repo.FullPath}}/-/pipelines/{{.Pipe.ID}}/jobs/{{.Job.ID}}/log?raw=1">{{t "pipe.raw"}}</a>
264 <a class="ghost" href="/{{$.Repo.FullPath}}/-/pipelines/{{.Pipe.ID}}/jobs/{{.Job.ID}}/log?raw=1">{{t "pipe.raw"}}</a>
265 <button type="button" class="ghost" data-log-wrap>{{t "pipe.wrap"}}</button>
265 <button type="button" class="ghost" data-log-wrap aria-pressed="true">{{t "pipe.wrap"}}</button>
266 <button type="button" class="ghost" data-log-top>{{t "pipe.top"}}</button>
266 <button type="button" class="ghost" data-log-top>{{t "pipe.top"}}</button>
267 <button type="button" class="ghost" data-log-bottom>{{t "pipe.bottom"}}</button>
267 <button type="button" class="ghost" data-log-bottom>{{t "pipe.bottom"}}</button>
268 <button type="button" class="ghost" data-log-full>{{t "pipe.full"}}</button>
268 <button type="button" class="ghost" data-log-full>{{t "pipe.full"}}</button>
internal/server/templates/layout.html +1 −0
@@ -44,6 +44,7 @@
44 44 </main>
45 45 </div>
46 46 </div>
47 <script src="/assets/float.js"></script>
47 48 </body>
48 49 </html>
49 50 {{end}}
@@ -44,6 +44,7 @@
44</main>
44</main>
45</div>
45</div>
46</div>
46</div>
47<script src="/assets/float.js"></script>
47</body>
48</body>
48</html>
49</html>
49{{end}}
50{{end}}