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

Side by Side Diff: milo/appengine/frontend/templates/pages/builder.html

Issue 2931773004: Milo: Add machine pool info for buildbot builder view. (Closed)
Patch Set: Review Created 3 years, 6 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/frontend/static/buildbot/css/default.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {{define "title"}}Builder {{ .Builder.Name }}{{end}} 1 {{define "title"}}Builder {{ .Builder.Name }}{{end}}
2 2
3 {{define "head"}} 3 {{define "head"}}
4 <link id="favicon" rel="shortcut icon" 4 <link id="favicon" rel="shortcut icon"
5 type="image/png" href="/static/common/favicon/milo-32.png"> 5 type="image/png" href="/static/common/favicon/milo-32.png">
6 {{end}} 6 {{end}}
7 7
8 {{define "blamelist"}}
9 {{ if . }}
10 {{ $nb := len . }}
11 {{ if lt $nb 4 }}
12 {{ range $i, $c := . -}}
13 {{- if gt $i 0 }}, {{ end -}}
14 {{- if .Changelist -}}
15 {{- .Changelist | linkify -}}
16 {{- if .AuthorEmail -}}
17 by {{- .AuthorEmail -}}
18 {{- end -}}
19 {{- else if .AuthorEmail -}}
20 (<a href="{{ .CommitURL }}">{{ .AuthorEmail }}</a>)
21 {{- else -}}
22 (<a href="{{ .CommitURL }}">Unknown Author</a>)
23 {{- end -}}
24 {{- end -}}
25 {{- else -}}
26 ({{ $nb }} changes)
27 {{- end }}
28 {{ end }}
29 {{end}}
30
8 {{define "body"}} 31 {{define "body"}}
9 <h1>Builder <a href="{{ pagedURL .Request -1 "EMPTY" }}">{{.Builder.Name}}</a></ h1> 32 <h1>Builder <a href="{{ pagedURL .Request -1 "EMPTY" }}">{{.Builder.Name}}</a></ h1>
10 33
11 {{ if .Builder.CurrentBuilds }} 34 <div class="prelude">
12 <h2>Current Builds ({{len .Builder.CurrentBuilds}}):</h2> 35 <div class="column">
13 <ul> 36 {{ if .Builder.MachinePool }}
14 {{ range .Builder.CurrentBuilds }} 37 {{ with .Builder.MachinePool }}
15 <li>{{ .Link | linkify }} 38 <h2>Machine Pool:</h2>
16 {{ $nb := len .Blame }} 39 <table>
17 {{ if lt $nb 4 }} 40 <tr>
18 {{ range $i, $c := .Blame }} 41 <td>Idle</td><td>{{ .Idle }}</td>
19 {{ if gt $i 0 }},{{ end }} 42 <td class="graph">
20 {{ if .Changelist }} 43 {{ if gt .Idle 0 }}
21 {{ .Changelist | linkify }} 44 <div class="bar idle" style="width: {{ percent .Idle .Total }}%">< /div>
22 {{ if .AuthorEmail }}
23 by {{ .AuthorEmail }}
24 {{ end }} 45 {{ end }}
46 </td>
47 </tr><tr>
48 <td>Busy</td><td>{{ .Busy }}</td>
49 <td class="graph">
50 {{ if gt .Busy 0 }}
51 <div class="bar busy" style="width: {{ percent .Busy .Total }}%">< /div>
52 {{ end }}
53 </td>
54 </tr><tr>
55 <td>Disconnected</td><td>{{ .Disconnected }}</td>
56 <td class="graph">
57 {{ if gt .Disconnected 0 }}
58 <div class="bar disconnected"
59 style="width: {{ percent .Disconnected .Total }}%"></div>
60 {{ end }}
61 </td>
62 </tr>
63 </table>
64 <details>
65 <summary>{{ .Total }} bots</summary>
66 <table class="info">
67 <tr><th>Name</th><th>Status</th></tr>
68 {{ range .Bots }}
69 <tr>
70 <td>{{ .Name | linkify }}</td>
71 <td class="status-{{ .Status.String }}">{{ .Status.String }}</td>
72 </tr>
73 {{ end }}
74 </table>
75 </details>
76 {{ end }}
77 {{ end }}
78 </div>
79
80 <div class="column">
81 {{ if .Builder.CurrentBuilds }}
82 <h2>Current Builds ({{len .Builder.CurrentBuilds}}):</h2>
83 <ul>
84 {{ range .Builder.CurrentBuilds }}
85 <li>{{ .Link | linkify }}
86 {{ with .Blame }}{{ template "blamelist" }}{{ end }}
87 [Running for: {{ .ExecutionTime.Duration | humanDuration }}]
88 {{ range .Text }} {{ . }}{{ end }}
89 </li>
90 {{ end }}
91 </ul>
92 {{ else }}
93 <h2>No current builds</h2>
94 {{ end }}
95 </div>
96
97 <div class="column">
98 {{ if .Builder.PendingBuilds -}}
99 <h2>Pending Build Requests ({{len .Builder.PendingBuilds}}):</h2>
100 <ul>
101 {{- range .Builder.PendingBuilds -}}
102 <li>
103 <small>({{- .PendingTime.Started | localTime "" }}, waiting {{ .PendingT ime.Duration | humanDuration -}})</small>
104 {{- with .Blame }}{{- template "blamelist" -}}{{- end -}}
105 </li>
106 {{- end -}}
107 </ul>
108 {{ else }}
109 <h2>No Pending Build Requests</h2>
110 {{ end }}
111 </div>
112 </div>
113
114 <div class="main">
115 {{ if .Builder.FinishedBuilds }}
116 <h2>Recent Builds:</h2>
117
118 <table class="info">
119 <tr>
120 <th>Time</th>
121 <th>Revision</th>
122 <th>Result</th>
123 <th>Build #</th>
124 <th>Changes</th>
125 <th>Info</th>
126 </tr>
127
128 {{ range .Builder.FinishedBuilds }}
129 <tr>
130 <td>{{ .ExecutionTime.Finished | localTime "" }}</td>
131 <td class="revision">{{ .Revision }}</td>
132 {{ if eq .Status.String "Success" }}
133 <td class="status-Success">Success</td>
134 {{ else if eq .Status.String "Failure" }}
135 <td class="status-Failure">Failed</td>
136 {{ else if eq .Status.String "InfraFailure" }}
137 <td class="status-Exception">Infra Failure</td>
138 {{ else if eq .Status.String "Exception" }}
139 <td class="status-Exception">Exception</td>
25 {{ else }} 140 {{ else }}
26 (<a href="{{ .CommitURL }}">{{ .AuthorEmail }}</a>) 141 <td> {{ .Status.String }} </td>
27 {{ end }} 142 {{ end }}
28 {{ end }} 143 <td>{{ .Link | linkify }}</td>
29 {{ else }} 144 <td>
30 ({{ $nb }} changes) 145 {{ $nb := len .Blame }}
146 {{ if lt $nb 4 }}
147 {{ range $i, $c := .Blame }}
148 {{ if gt $i 0 }},{{ end }}
149 {{ if .Changelist }}
150 {{ .Changelist | linkify }}
151 {{ if .AuthorEmail }}
152 by {{ .AuthorEmail }}
153 {{ end }}
154 {{ else }}
155 (<a href="{{ .CommitURL }}">{{ .AuthorEmail }}</a>)
156 {{ end }}
157 {{ end }}
158 {{ else }}
159 ({{ $nb }} changes)
160 {{ end }}
161 </td>
162 <td class="left">
163 {{ range $i, $value := .Text }}
164 {{ if gt $i 0 }}<br>{{ end }}
165 {{ . }}
166 {{ end }}
167 </td>
168 </tr>
31 {{ end }} 169 {{ end }}
32 [Running for: {{ .ExecutionTime.Duration | humanDuration }}] 170 </table>
33 {{ range .Text }} {{ . }}{{ end }} 171 {{ else }}
34 </li> 172 <h2>No Recent Builds</h2>
35 {{ end }} 173 {{ end }}
36 </ul> 174 </div>
37 {{ else }}
38 <h2>No current builds</h2>
39 {{ end }}
40 175
41 {{ if .Builder.PendingBuilds }} 176 <div class="epiloge">
42 <h2>Pending Build Requests ({{len .Builder.PendingBuilds}}):</h2> 177 {{ if .Builder.PrevCursor }}<a href="{{ pagedURL .Request 0 .Builder.PrevCurso r }}">Prev</a>{{ end }}
43 <ul> 178 (Show:
44 {{ range .Builder.PendingBuilds }} 179 <a href="{{ pagedURL .Request -1 "" }}">default</a>
45 <li><small>({{ .PendingTime.Started | localTime "" }}, waiting {{ .PendingTi me.Duration | humanDuration }})</small> 180 <a href="{{ pagedURL .Request 25 "" }}">25</a>
46 181 <a href="{{ pagedURL .Request 50 "" }}">50</a>
47 {{ $nb := len .Blame }} 182 <a href="{{ pagedURL .Request 100 "" }}">100</a>
48 {{ if lt $nb 4 }} 183 <a href="{{ pagedURL .Request 200 "" }}">200</a>
49 {{ range $i, $c := .Blame }} 184 )
50 (<a href="{{ .CommitURL }}">{{ .AuthorEmail }}</a>) 185 {{ if .Builder.NextCursor }}
51 {{ if ne $i (sub $nb 1) }},{{ end }} 186 <a href="{{ pagedURL .Request 0 .Builder.NextCursor}}">Next</a>
52 {{ end }}
53 {{ else }}
54 ({{ $nb }} changes)
55 {{ end }}
56
57 </li>
58 {{ end }} 187 {{ end }}
59 </ul> 188 </div>
60 {{ else }}
61 <h2>No Pending Build Requests</h2>
62 {{ end }}
63
64 {{ if .Builder.FinishedBuilds }}
65 <h2>Recent Builds:</h2>
66
67 <table class="info">
68 <tr>
69 <th>Time</th>
70 <th>Revision</th>
71 <th>Result</th>
72 <th>Build #</th>
73 <th>Changes</th>
74 <th>Info</th>
75 </tr>
76
77 {{ range .Builder.FinishedBuilds }}
78 <tr>
79 <td>{{ .ExecutionTime.Finished | localTime "" }}</td>
80 <td class="revision">{{ .Revision }}</td>
81 {{ if eq .Status.String "Success" }}
82 <td class="status-Success">Success</td>
83 {{ else if eq .Status.String "Failure" }}
84 <td class="status-Failure">Failed</td>
85 {{ else if eq .Status.String "InfraFailure" }}
86 <td class="status-Exception">Infra Failure</td>
87 {{ else if eq .Status.String "Exception" }}
88 <td class="status-Exception">Exception</td>
89 {{ else }}
90 <td> {{ .Status.String }} </td>
91 {{ end }}
92 <td>{{ .Link | linkify }}</td>
93 <td>
94 {{ $nb := len .Blame }}
95 {{ if lt $nb 4 }}
96 {{ range $i, $c := .Blame }}
97 {{ if gt $i 0 }},{{ end }}
98 {{ if .Changelist }}
99 {{ .Changelist | linkify }}
100 {{ if .AuthorEmail }}
101 by {{ .AuthorEmail }}
102 {{ end }}
103 {{ else }}
104 (<a href="{{ .CommitURL }}">{{ .AuthorEmail }}</a>)
105 {{ end }}
106 {{ end }}
107 {{ else }}
108 ({{ $nb }} changes)
109 {{ end }}
110 </td>
111 <td class="left">
112 {{ range $i, $value := .Text }}
113 {{ if gt $i 0 }}<br>{{ end }}
114 {{ . }}
115 {{ end }}
116 </td>
117 </tr>
118 {{ end }}
119 </table>
120 {{ else }}
121 <h2>No Recent Builds</h2>
122 {{ end }}
123
124 {{ if .Builder.PrevCursor }}<a href="{{ pagedURL .Request 0 .Builder.PrevCursor }}">Prev</a>{{ end }}
125 (Show:
126 <a href="{{ pagedURL .Request -1 "" }}">default</a>
127 <a href="{{ pagedURL .Request 25 "" }}">25</a>
128 <a href="{{ pagedURL .Request 50 "" }}">50</a>
129 <a href="{{ pagedURL .Request 100 "" }}">100</a>
130 <a href="{{ pagedURL .Request 200 "" }}">200</a>
131 )
132 {{ if .Builder.NextCursor }}<a href="{{ pagedURL .Request 0 .Builder.NextCursor} }">Next</a>{{ end }}
133 189
134 {{end}} 190 {{end}}
OLDNEW
« no previous file with comments | « milo/appengine/frontend/static/buildbot/css/default.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698