fixed link to stage

pull/1/head
Brad Rydzewski 5 years ago
parent 07f47eebd6
commit d66f466286

@ -59,7 +59,7 @@ func HandleStage(t *history.History) http.HandlerFunc {
for _, e := range t.Entries() {
if e.Stage.ID == id {
nocache(w)
render(w, "stage.tmpl", d)
render(w, "stage.tmpl", e)
return
}
}

@ -36,7 +36,7 @@ func New(tracer *history.History, history *hook.Hook, config Config) http.Handle
mux.Handle("/static/", http.StripPrefix("/static/", fs))
mux.HandleFunc("/healthz", handler.HandleHealth(tracer))
mux.Handle("/logs", auth(handler.HandleLogHistory(history)))
mux.Handle("/stage", auth(handler.HandleStage(tracer)))
mux.Handle("/view", auth(handler.HandleStage(tracer)))
mux.Handle("/", auth(handler.HandleIndex(tracer)))
return mux
}

@ -39,7 +39,7 @@
</div>
{{ end }}
{{ range .Items }}
<a href="/stage/{{ .Stage.ID }}" class="card stage">
<a href="/view?id={{ .Stage.ID }}" class="card stage">
<h2>{{ .Repo.Slug }}</h2>
<img src="{{ .Build.AuthorAvatar }}" />
<span class="connector"></span>

@ -77,7 +77,7 @@ var index = `<!DOCTYPE html>
</div>
{{ end }}
{{ range .Items }}
<a href="/stage/{{ .Stage.ID }}" class="card stage">
<a href="/view?id={{ .Stage.ID }}" class="card stage">
<h2>{{ .Repo.Slug }}</h2>
<img src="{{ .Build.AuthorAvatar }}" />
<span class="connector"></span>

@ -1,36 +1,4 @@
{
"Logs": [
{
"Level": "trace",
"Message": "this is a test trace message",
"Data": { "foo": "bar", "baz": "boo" },
"Unix": 1563058875
},
{
"Level": "debug",
"Message": "this is a test debug message",
"Data": { "foo": "bar", "baz": "boo" },
"Unix": 1563058875
},
{
"Level": "info",
"Message": "this is an info trace message",
"Data": { "foo": "bar", "baz": "boo" },
"Unix": 1563058975
},
{
"Level": "warn",
"Message": "this is a test warning message",
"Data": { "foo": "bar", "baz": "boo" },
"Unix": 1563058977
},
{
"Level": "error",
"Message": "this is a test error message",
"Data": { "foo": "bar", "baz": "boo" },
"Unix": 1563059000
}
],
"Repo": {
"Slug": "octocat/hello-world"
},

Loading…
Cancel
Save