diff --git a/server/controllers/templates/web_templates.go b/server/controllers/templates/web_templates.go index f5295fcd4..177a6428b 100644 --- a/server/controllers/templates/web_templates.go +++ b/server/controllers/templates/web_templates.go @@ -17,6 +17,8 @@ import ( "html/template" "io" "time" + + "github.com/runatlantis/atlantis/server/jobs" ) //go:generate pegomock generate --package mocks -o mocks/mock_template_writer.go TemplateWriter @@ -50,7 +52,9 @@ type ApplyLockData struct { // IndexData holds the data for rendering the index page type IndexData struct { - Locks []LockIndexData + Locks []LockIndexData + PullToJobMapping []jobs.PullInfoWithJobIDs + ApplyLock ApplyLockData AtlantisVersion string // CleanedBasePath is the path Atlantis is accessible at externally. If @@ -113,8 +117,8 @@ var IndexTemplate = template.Must(template.New("index.html.tmpl").Parse(`

Locks

- {{ if .Locks }} {{ $basePath := .CleanedBasePath }} + {{ if .Locks }}
Repository @@ -151,6 +155,36 @@ var IndexTemplate = template.Must(template.New("index.html.tmpl").Parse(`

No locks found.

{{ end }}
+
+
+
+
+

Jobs

+ {{ if .PullToJobMapping }} +
+
+ Repository + Project + Workspace + Jobs +
+ {{ range .PullToJobMapping }} +
+ {{.Pull.RepoFullName}} #{{.Pull.PullNum}} + {{.Pull.Path}} + {{.Pull.Workspace}} + + {{ range .JobIDInfos }} +
{{ .TimeFormatted }}
+ {{ end }} +
+
+ {{ end }} +
+ {{ else }} +

No jobs found.

+ {{ end }} +