Changeset 251401 in webkit


Ignore:
Timestamp:
Oct 21, 2019 5:22:09 PM (5 years ago)
Author:
Jonathan Bedard
Message:

results.webkit.org: Add ability to display time on bubbles
https://bugs.webkit.org/show_bug.cgi?id=203202
<rdar://problem/56436621>

Rubber-stamped by Aakash Jain.

  • resultsdbpy/resultsdbpy/view/static/js/timeline.js: Add switch to show times under each bubble.
  • resultsdbpy/resultsdbpy/view/templates/search.html: Correctly update timeline on callback.
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r251390 r251401  
     12019-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
    1122019-10-21  Dean Jackson  <dino@apple.com>
    213
  • trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js

    r250744 r251401  
    3535
    3636let willFilterExpected = false;
     37let showTestTimes = false;
    3738
    3839function minimumUuidForResults(results, limit) {
     
    254255            }
    255256
     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
    256266            // If the key exists, but doesn't match, delete it
    257267            if (!(key in obj) || out[key] !== obj[key]) {
     
    535545                    });
    536546                }
     547                const time = data.time ? Math.round(data.time / 1000) : 0;
     548                if (time && showTestTimes)
     549                    tag = time;
    537550
    538551                return drawDot(context, x, y, false, tag ? tag : null, symbol, false, color);
     
    859872
    860873    if (callback) {
    861         const swtch = REF.createRef({
     874        const filterSwitch = REF.createRef({
    862875            onElementMount: (element) => {
    863876                element.onchange = () => {
     
    873886            },
    874887        });
     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        });
    875899
    876900        result += `<div class="input">
    877901            <label>Filter expected results</label>
    878902            <label class="switch">
    879                 <input type="checkbox"${willFilterExpected ? ' checked': ''} ref="${swtch}">
     903                <input type="checkbox"${willFilterExpected ? ' checked': ''} ref="${filterSwitch}">
    880904                <span class="slider"></span>
    881905            </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>`;
    883915    }
    884916
  • trunk/Tools/resultsdbpy/resultsdbpy/view/templates/search.html

    r250396 r251401  
    230230    ${Drawer([
    231231        Legend(() => {
    232             view.children.forEach((child) => {
     232            view.ref.state.children.forEach((child) => {
    233233                child.timeline.update();
    234234            });
Note: See TracChangeset for help on using the changeset viewer.