Modified: trunk/Tools/ChangeLog (251400 => 251401)
--- trunk/Tools/ChangeLog 2019-10-22 00:17:50 UTC (rev 251400)
+++ trunk/Tools/ChangeLog 2019-10-22 00:22:09 UTC (rev 251401)
@@ -1,3 +1,14 @@
+2019-10-21 Jonathan Bedard <[email protected]>
+
+ 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.
+
2019-10-21 Dean Jackson <[email protected]>
Dispatch AR event on the originating anchor element
Modified: trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js (251400 => 251401)
--- trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js 2019-10-22 00:17:50 UTC (rev 251400)
+++ trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js 2019-10-22 00:22:09 UTC (rev 251401)
@@ -34,6 +34,7 @@
const DEFAULT_LIMIT = 100;
let willFilterExpected = false;
+let showTestTimes = false;
function minimumUuidForResults(results, limit) {
const now = Math.floor(Date.now() / 10);
@@ -253,6 +254,15 @@
return;
}
+ // Some special combination logic
+ if (key === 'time') {
+ out[key] = Math.max(
+ out[key] ? out[key] : 0,
+ obj[key] ? obj[key] : 0,
+ );
+ return;
+ }
+
// If the key exists, but doesn't match, delete it
if (!(key in obj) || out[key] !== obj[key]) {
delete out[key];
@@ -534,6 +544,9 @@
}
});
}
+ const time = data.time ? Math.round(data.time / 1000) : 0;
+ if (time && showTestTimes)
+ tag = time;
return drawDot(context, x, y, false, tag ? tag : null, symbol, false, color);
},
@@ -858,7 +871,7 @@
</div>`;
if (callback) {
- const swtch = REF.createRef({
+ const filterSwitch = REF.createRef({
onElementMount: (element) => {
element._onchange_ = () => {
if (element.checked)
@@ -872,14 +885,33 @@
};
},
});
+ const showTimesSwitch = REF.createRef({
+ onElementMount: (element) => {
+ element._onchange_ = () => {
+ if (element.checked)
+ showTestTimes = true;
+ else
+ showTestTimes = false;
+ callback();
+ };
+ },
+ });
result += `<div class="input">
<label>Filter expected results</label>
<label class="switch">
- <input type="checkbox"${willFilterExpected ? ' checked': ''} ref="${swtch}">
+ <input type="checkbox"${willFilterExpected ? ' checked': ''} ref="${filterSwitch}">
<span class="slider"></span>
</label>
- </div>`;
+ </div>`
+ if (!plural)
+ result += `<div class="input">
+ <label>Show test times</label>
+ <label class="switch">
+ <input type="checkbox"${showTestTimes ? ' checked': ''} ref="${showTimesSwitch}">
+ <span class="slider"></span>
+ </label>
+ </div>`;
}
return `${result}`;
Modified: trunk/Tools/resultsdbpy/resultsdbpy/view/templates/search.html (251400 => 251401)
--- trunk/Tools/resultsdbpy/resultsdbpy/view/templates/search.html 2019-10-22 00:17:50 UTC (rev 251400)
+++ trunk/Tools/resultsdbpy/resultsdbpy/view/templates/search.html 2019-10-22 00:22:09 UTC (rev 251401)
@@ -229,7 +229,7 @@
${InvestigateDrawer}
${Drawer([
Legend(() => {
- view.children.forEach((child) => {
+ view.ref.state.children.forEach((child) => {
child.timeline.update();
});
}, false),