Changeset 251401 in webkit
- Timestamp:
- Oct 21, 2019 5:22:09 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r251390 r251401 1 2019-10-21 Jonathan Bedard <jbedard@apple.com> 2 3 results.webkit.org: Add ability to display time on bubbles 4 https://bugs.webkit.org/show_bug.cgi?id=203202 5 <rdar://problem/56436621> 6 7 Rubber-stamped by Aakash Jain. 8 9 * resultsdbpy/resultsdbpy/view/static/js/timeline.js: Add switch to show times under each bubble. 10 * resultsdbpy/resultsdbpy/view/templates/search.html: Correctly update timeline on callback. 11 1 12 2019-10-21 Dean Jackson <dino@apple.com> 2 13 -
trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js
r250744 r251401 35 35 36 36 let willFilterExpected = false; 37 let showTestTimes = false; 37 38 38 39 function minimumUuidForResults(results, limit) { … … 254 255 } 255 256 257 // Some special combination logic 258 if (key === 'time') { 259 out[key] = Math.max( 260 out[key] ? out[key] : 0, 261 obj[key] ? obj[key] : 0, 262 ); 263 return; 264 } 265 256 266 // If the key exists, but doesn't match, delete it 257 267 if (!(key in obj) || out[key] !== obj[key]) { … … 535 545 }); 536 546 } 547 const time = data.time ? Math.round(data.time / 1000) : 0; 548 if (time && showTestTimes) 549 tag = time; 537 550 538 551 return drawDot(context, x, y, false, tag ? tag : null, symbol, false, color); … … 859 872 860 873 if (callback) { 861 const swtch = REF.createRef({874 const filterSwitch = REF.createRef({ 862 875 onElementMount: (element) => { 863 876 element.onchange = () => { … … 873 886 }, 874 887 }); 888 const showTimesSwitch = REF.createRef({ 889 onElementMount: (element) => { 890 element.onchange = () => { 891 if (element.checked) 892 showTestTimes = true; 893 else 894 showTestTimes = false; 895 callback(); 896 }; 897 }, 898 }); 875 899 876 900 result += `<div class="input"> 877 901 <label>Filter expected results</label> 878 902 <label class="switch"> 879 <input type="checkbox"${willFilterExpected ? ' checked': ''} ref="${ swtch}">903 <input type="checkbox"${willFilterExpected ? ' checked': ''} ref="${filterSwitch}"> 880 904 <span class="slider"></span> 881 905 </label> 882 </div>`; 906 </div>` 907 if (!plural) 908 result += `<div class="input"> 909 <label>Show test times</label> 910 <label class="switch"> 911 <input type="checkbox"${showTestTimes ? ' checked': ''} ref="${showTimesSwitch}"> 912 <span class="slider"></span> 913 </label> 914 </div>`; 883 915 } 884 916 -
trunk/Tools/resultsdbpy/resultsdbpy/view/templates/search.html
r250396 r251401 230 230 ${Drawer([ 231 231 Legend(() => { 232 view. children.forEach((child) => {232 view.ref.state.children.forEach((child) => { 233 233 child.timeline.update(); 234 234 });
Note: See TracChangeset
for help on using the changeset viewer.