Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(901)

Side by Side Diff: milo/appengine/swarming/html.go

Issue 2257643002: Milo-Swarmbucket: Add indication for incomplete logs (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « milo/appengine/swarming/buildLog.go ('k') | milo/appengine/swarming/html_data.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package swarming 5 package swarming
6 6
7 import ( 7 import (
8 "net/http" 8 "net/http"
9 "os" 9 "os"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 } 53 }
54 logname := p.ByName("logname") 54 logname := p.ByName("logname")
55 if logname == "" { 55 if logname == "" {
56 return nil, &miloerror.Error{ 56 return nil, &miloerror.Error{
57 Message: "No log name", 57 Message: "No log name",
58 Code: http.StatusBadRequest, 58 Code: http.StatusBadRequest,
59 } 59 }
60 } 60 }
61 61
62 » log, err := swarmingBuildLogImpl(c, getServer(r), id, logname) 62 » log, closed, err := swarmingBuildLogImpl(c, getServer(r), id, logname)
63 if err != nil { 63 if err != nil {
64 return nil, convertErr(err) 64 return nil, convertErr(err)
65 } 65 }
66 66
67 args := &templates.Args{ 67 args := &templates.Args{
68 » » "Log": log, 68 » » "Log": log,
69 » » "Closed": closed,
69 } 70 }
70 return args, nil 71 return args, nil
71 } 72 }
72 73
73 // GetTemplateName for Build returns the template name for build pages. 74 // GetTemplateName for Build returns the template name for build pages.
74 func (b Build) GetTemplateName(t settings.Theme) string { 75 func (b Build) GetTemplateName(t settings.Theme) string {
75 return "build.html" 76 return "build.html"
76 } 77 }
77 78
78 // Render renders both the build page and the log. 79 // Render renders both the build page and the log.
(...skipping 30 matching lines...) Expand all
109 } 110 }
110 111
111 // isAPINotFound returns true if err is a HTTP 404 API response. 112 // isAPINotFound returns true if err is a HTTP 404 API response.
112 func isAPINotFound(err error) bool { 113 func isAPINotFound(err error) bool {
113 if apiErr, ok := err.(*googleapi.Error); ok && apiErr.Code == http.Statu sNotFound { 114 if apiErr, ok := err.(*googleapi.Error); ok && apiErr.Code == http.Statu sNotFound {
114 return true 115 return true
115 } 116 }
116 117
117 return false 118 return false
118 } 119 }
OLDNEW
« no previous file with comments | « milo/appengine/swarming/buildLog.go ('k') | milo/appengine/swarming/html_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698