package webui import ( "github.com/pogo-vcs/pogo/db" "github.com/pogo-vcs/pogo/server/webui/components" "strconv" ) templ CIRunDetail() { if repoId, ok := GetParamI32(ctx, "id"); ok { if runIdStr, ok := GetParam(ctx, "runId"); ok { if runId64, err := strconv.ParseInt(runIdStr, 10, 32); err == nil { {{ runId := int32(runId64) }} if repo, err := db.Q.GetRepository(ctx, repoId); err == nil { {{ hasAccess := repo.Public }} if !hasAccess && IsLoggedIn(ctx) { if user := GetUser(ctx); user != nil { if accessCheck, err := db.Q.CheckUserRepositoryAccess(ctx, repoId, user.ID); err == nil { {{ hasAccess = accessCheck }} } } } if hasAccess { if run, err := db.Q.GetCIRun(ctx, repoId, runId); err == nil { @layout(repo.Name + " - CI Run #" + runIdStr) { @components.Header(GetUser(ctx)) @components.Main() {

{ repo.Name } / CI Runs / #{ runIdStr }

Status
if run.Success { ✓ Success } else { ✗ Failed } ({ strconv.Itoa(int(run.StatusCode)) })
Event Type
{ run.EventType }
Task Type
{ run.TaskType }
Config
{ run.ConfigFilename }
Revision
{ run.Rev }
if run.Pattern != nil {
Pattern
{ *run.Pattern }
}
Started At
{ formatTime(run.StartedAt) }
Finished At
if run.FinishedAt.Valid { { formatTime(run.FinishedAt) } ({ formatDuration(run.StartedAt, run.FinishedAt) }) } else { Not finished }
Reason
{ run.Reason }

Log Output

{ GetSanitizedLog(ctx, repoId, run.Log) }
} } } else { @layout("Not Found") { @components.Header(GetUser(ctx)) @components.Main() {

CI Run Not Found

The requested CI run does not exist or you don't have permission to view it.

} } } } else { @layout("Unauthorized") { @components.Header(GetUser(ctx)) @components.Main() {

Access Denied

You don't have permission to view this repository.

} } } } } } } }