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

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

Issue 2886353002: Milo: Add an option to hide green steps (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 {{define "title"}} 1 {{define "title"}}
2 {{ with .Build.Summary -}} 2 {{ with .Build.Summary -}}
3 {{ if eq .Status.String "InfraFailure" }} 3 {{ if eq .Status.String "InfraFailure" }}
4 Infra Failure 4 Infra Failure
5 {{ else if eq .Status.String "Exception" }} 5 {{ else if eq .Status.String "Exception" }}
6 Exception 6 Exception
7 {{ else if eq .Status.String "Failure" }} 7 {{ else if eq .Status.String "Failure" }}
8 Failed 8 Failed
9 {{ else if eq .Status.String "NotRun" }} 9 {{ else if eq .Status.String "NotRun" }}
10 Pending 10 Pending
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 {{ if .Build.SourceStamp }} 142 {{ if .Build.SourceStamp }}
143 {{ if .Build.SourceStamp.Source }} 143 {{ if .Build.SourceStamp.Source }}
144 <h2>Reason:</h2> 144 <h2>Reason:</h2>
145 <p>{{ .Source }}</p> 145 <p>{{ .Source }}</p>
146 {{ end }} 146 {{ end }}
147 {{ end }} 147 {{ end }}
148 148
149 {{ if or .Build.Components .Build.Summary.SubLink }} 149 {{ if or .Build.Components .Build.Summary.SubLink }}
150 <h2>Steps and Logfiles:</h2> 150 <h2>Steps and Logfiles:</h2>
151 <input type="checkbox" id="showHidden"> 151 Show:
152 <label for="showHidden">Show hidden <span id="numHidden"></span></label> 152 <input type="radio" name="hider" id="showAll"><label for="showAll">All</ label>
153 <ol id="steps" class="hide"> 153 <input type="radio" name="hider" id="showStandard" checked><label for="s howStandard">Standard</label>
154 <input type="radio" name="hider" id="showFail"><label for="showFail">Fai lure</label>
nodir 2017/05/18 02:41:04 "Failures"? Since there may be multiple failures
Ryan Tseng 2017/05/18 22:52:49 Actually i'll say "Interesting Only". A bit verbo
155 <ol id="steps" class="standard">
154 156
155 {{ with .Build.Summary }} 157 {{ with .Build.Summary }}
156 {{ if .SubLink }} 158 {{ if .SubLink }}
157 <li class="verbosity-{{.Verbosity.String}}"> 159 <li class="verbosity-{{.Verbosity.String}}">
158 <div class="status-{{.Status}} result"> 160 <div class="status-{{.Status}} result">
159 <b>Steps</b> 161 <b>Steps</b>
160 {{ if .Duration -}} 162 {{ if .Duration -}}
161 <span style="float:right" 163 <span style="float:right"
162 class="duration" 164 class="duration"
163 data-starttime="{{ .Started | formatTime }}" 165 data-starttime="{{ .Started | formatTime }}"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 320
319 </li> 321 </li>
320 {{ end }} 322 {{ end }}
321 </ol> 323 </ol>
322 </div> 324 </div>
323 {{ end }} 325 {{ end }}
324 </div> 326 </div>
325 </div> 327 </div>
326 <script language="javascript"> 328 <script language="javascript">
327 $(document).ready(function() { 329 $(document).ready(function() {
328 var check = function(checked) { 330
331 var check = function(filter) {
329 var things = $("#steps"); 332 var things = $("#steps");
nodir 2017/05/18 02:41:04 not used
Ryan Tseng 2017/05/18 22:52:48 Done.
330 if (checked) { 333 if (filter == "fail") {
331 $("#steps").removeClass("hide"); 334 $("#steps").removeClass("standard");
335 $("#steps").removeClass("all");
336 $("#steps").addClass("fail");
337 } else if (filter == "all") {
338 $("#steps").removeClass("standard");
339 $("#steps").addClass("all");
340 $("#steps").removeClass("fail");
332 } else { 341 } else {
333 $("#steps").addClass("hide"); 342 // Default to standard.
334 } 343 $("#steps").removeClass("all");
335 var numHidden = $(".verbosity-Hidden").length; 344 $("#steps").addClass("standard");
336 if (numHidden > 0) { 345 $("#steps").removeClass("fail");
337 $("#numHidden").text("(" + numHidden + " hidden)");
338 } else {
339 $("#numHidden").text("");
340 } 346 }
nodir 2017/05/18 02:41:04 I think this entire function can be implemented in
Ryan Tseng 2017/05/18 22:52:48 That works, that's awesome.
341 }; 347 };
342 348
343 check($("#showHidden").is(":checked")); 349 check($("#showFail").is(":checked"), "standard");
nodir 2017/05/18 02:41:04 i think you meant check("standard")
nodir 2017/05/18 03:36:16 i recommend reviewing code yourself before sending
Ryan Tseng 2017/05/18 22:52:48 Done.
Ryan Tseng 2017/05/18 22:52:48 Acknowledged.
344 $("#showHidden").click(function(e) { 350
345 check($(this).is(":checked")); 351 $("#showFail").click(function(e) {
352 check("fail");
353 });
354 $("#showStandard").click(function(e) {
355 check("standard");
356 });
357 $("#showAll").click(function(e) {
358 check("all");
346 }); 359 });
347 }); 360 });
348 </script> 361 </script>
349 {{end}} 362 {{end}}
OLDNEW
« milo/appengine/buildbot/build.go ('K') | « 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