Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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> |
|
nodir
2017/05/22 16:36:38
nit: maybe move label to the next line so it is co
Ryan Tseng
2017/05/22 17:29:46
Done.
| |
| 153 <ol id="steps" class="hide"> | 153 <input type="radio" name="hider" id="showStandard" checked> |
| 154 <label for="showStandard">Standard</label> | |
| 155 <input type="radio" name="hider" id="showInteresting"> | |
| 156 <label for="showInteresting">Interesting Only</label> | |
| 157 <ol id="steps" class="standard"> | |
| 154 | 158 |
| 155 {{ with .Build.Summary }} | 159 {{ with .Build.Summary }} |
| 156 {{ if .SubLink }} | 160 {{ if .SubLink }} |
| 157 <li class="verbosity-{{.Verbosity.String}}"> | 161 <li class="verbosity-{{.Verbosity.String}}"> |
| 158 <div class="status-{{.Status}} result"> | 162 <div class="status-{{.Status}} result"> |
| 159 <b>Steps</b> | 163 <b>Steps</b> |
| 160 {{ if .Duration -}} | 164 {{ if .Duration -}} |
| 161 <span style="float:right" | 165 <span style="float:right" |
| 162 class="duration" | 166 class="duration" |
| 163 data-starttime="{{ .Started | formatTime }}" | 167 data-starttime="{{ .Started | formatTime }}" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 318 | 322 |
| 319 </li> | 323 </li> |
| 320 {{ end }} | 324 {{ end }} |
| 321 </ol> | 325 </ol> |
| 322 </div> | 326 </div> |
| 323 {{ end }} | 327 {{ end }} |
| 324 </div> | 328 </div> |
| 325 </div> | 329 </div> |
| 326 <script language="javascript"> | 330 <script language="javascript"> |
| 327 $(document).ready(function() { | 331 $(document).ready(function() { |
| 328 var check = function(checked) { | 332 |
| 329 var things = $("#steps"); | 333 var check = function(filter) { |
|
nodir
2017/05/22 16:36:38
i think the parameter here is a css class name. fi
Ryan Tseng
2017/05/22 17:29:46
Done.
| |
| 330 if (checked) { | 334 $("#steps").removeClass("all standard interesting").addClass(filter) |
| 331 $("#steps").removeClass("hide"); | 335 } |
| 332 } else { | 336 |
| 333 $("#steps").addClass("hide"); | 337 $("#showInteresting").click(function(e) { |
| 338 check("interesting"); | |
| 339 }); | |
| 340 $("#showStandard").click(function(e) { | |
| 341 check("standard"); | |
| 342 }); | |
| 343 $("#showAll").click(function(e) { | |
| 344 check("all"); | |
| 345 }); | |
| 346 | |
| 347 $("input[name='hider']").each(function(){ | |
| 348 if ($(this).prop("checked") == true) { | |
|
nodir
2017/05/22 16:36:38
why not `if ($(this).prop("checked")) {` ?
Ryan Tseng
2017/05/22 17:29:46
I saw it written the other way in another example
| |
| 349 $(this).click(); | |
| 334 } | 350 } |
| 335 var numHidden = $(".verbosity-Hidden").length; | |
| 336 if (numHidden > 0) { | |
| 337 $("#numHidden").text("(" + numHidden + " hidden)"); | |
| 338 } else { | |
| 339 $("#numHidden").text(""); | |
| 340 } | |
| 341 }; | |
| 342 | |
| 343 check($("#showHidden").is(":checked")); | |
| 344 $("#showHidden").click(function(e) { | |
| 345 check($(this).is(":checked")); | |
| 346 }); | 351 }); |
| 347 }); | 352 }); |
| 348 </script> | 353 </script> |
| 349 {{end}} | 354 {{end}} |
| OLD | NEW |