Chromium Code Reviews| Index: milo/appengine/frontend/templates/pages/build.html |
| diff --git a/milo/appengine/frontend/templates/pages/build.html b/milo/appengine/frontend/templates/pages/build.html |
| index 93b22a0163042f8ccccc2826f8e4a2f034d0a3e8..1fb86a9fd26fd91fb131a5895cafb99fb392b9c6 100644 |
| --- a/milo/appengine/frontend/templates/pages/build.html |
| +++ b/milo/appengine/frontend/templates/pages/build.html |
| @@ -148,9 +148,11 @@ |
| {{ if or .Build.Components .Build.Summary.SubLink }} |
| <h2>Steps and Logfiles:</h2> |
| - <input type="checkbox" id="showHidden"> |
| - <label for="showHidden">Show hidden <span id="numHidden"></span></label> |
| - <ol id="steps" class="hide"> |
| + Show: |
| + <input type="radio" name="hider" id="showAll"><label for="showAll">All</label> |
| + <input type="radio" name="hider" id="showStandard" checked><label for="showStandard">Standard</label> |
| + <input type="radio" name="hider" id="showFail"><label for="showFail">Failure</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
|
| + <ol id="steps" class="standard"> |
| {{ with .Build.Summary }} |
| {{ if .SubLink }} |
| @@ -325,24 +327,35 @@ |
| </div> |
| <script language="javascript"> |
| $(document).ready(function() { |
| - var check = function(checked) { |
| + |
| + var check = function(filter) { |
| var things = $("#steps"); |
|
nodir
2017/05/18 02:41:04
not used
Ryan Tseng
2017/05/18 22:52:48
Done.
|
| - if (checked) { |
| - $("#steps").removeClass("hide"); |
| - } else { |
| - $("#steps").addClass("hide"); |
| - } |
| - var numHidden = $(".verbosity-Hidden").length; |
| - if (numHidden > 0) { |
| - $("#numHidden").text("(" + numHidden + " hidden)"); |
| + if (filter == "fail") { |
| + $("#steps").removeClass("standard"); |
| + $("#steps").removeClass("all"); |
| + $("#steps").addClass("fail"); |
| + } else if (filter == "all") { |
| + $("#steps").removeClass("standard"); |
| + $("#steps").addClass("all"); |
| + $("#steps").removeClass("fail"); |
| } else { |
| - $("#numHidden").text(""); |
| + // Default to standard. |
| + $("#steps").removeClass("all"); |
| + $("#steps").addClass("standard"); |
| + $("#steps").removeClass("fail"); |
| } |
|
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.
|
| }; |
| - check($("#showHidden").is(":checked")); |
| - $("#showHidden").click(function(e) { |
| - check($(this).is(":checked")); |
| + 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.
|
| + |
| + $("#showFail").click(function(e) { |
| + check("fail"); |
| + }); |
| + $("#showStandard").click(function(e) { |
| + check("standard"); |
| + }); |
| + $("#showAll").click(function(e) { |
| + check("all"); |
| }); |
| }); |
| </script> |