Title: [250001] trunk/Tools
Revision
250001
Author
[email protected]
Date
2019-09-17 16:48:49 -0700 (Tue, 17 Sep 2019)

Log Message

results.webkit.org results bubbles' tooltips should include SDK information
https://bugs.webkit.org/show_bug.cgi?id=201823

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/static/js/configuration.js:
(Configuration.prototype.compare): Like the Python instance of this class,
support using null as a wildcard.
(Configuration.prototype.compareSDKs): Ditto.
* resultsdbpy/resultsdbpy/view/static/js/timeline.js:
(TimelineFromEndpoint.prototype.render.onDotEnterFactory): Construct a configuration
object from all bits of data used to construct a given bubble.
(TimelineFromEndpoint.prototype.render):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (250000 => 250001)


--- trunk/Tools/ChangeLog	2019-09-17 22:57:05 UTC (rev 250000)
+++ trunk/Tools/ChangeLog	2019-09-17 23:48:49 UTC (rev 250001)
@@ -1,3 +1,19 @@
+2019-09-17  Jonathan Bedard  <[email protected]>
+
+        results.webkit.org results bubbles' tooltips should include SDK information
+        https://bugs.webkit.org/show_bug.cgi?id=201823
+
+        Rubber-stamped by Aakash Jain.
+
+        * resultsdbpy/resultsdbpy/view/static/js/configuration.js:
+        (Configuration.prototype.compare): Like the Python instance of this class,
+        support using null as a wildcard.
+        (Configuration.prototype.compareSDKs): Ditto.
+        * resultsdbpy/resultsdbpy/view/static/js/timeline.js:
+        (TimelineFromEndpoint.prototype.render.onDotEnterFactory): Construct a configuration
+        object from all bits of data used to construct a given bubble.
+        (TimelineFromEndpoint.prototype.render):
+
 2019-09-17  Keith Rollin  <[email protected]>
 
         Remove some support for < iOS 12

Modified: trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/configuration.js (250000 => 250001)


--- trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/configuration.js	2019-09-17 22:57:05 UTC (rev 250000)
+++ trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/configuration.js	2019-09-17 23:48:49 UTC (rev 250001)
@@ -169,11 +169,7 @@
             if (result != 0)
                 return;
 
-            if (this[key] === null && configuration[key] !== null)
-                result = -1;
-            else if (this[key] !== null && configuration[key] === null)
-                result = 1;
-            else if (this[key] !== null && configuration[key] !== null) {
+            if (this[key] !== null && configuration[key] !== null) {
                 if (typeof this[key] === 'string')
                     result = this[key].localeCompare(configuration[key]);
                 else if (typeof this[key] === 'number' || typeof this[key] === 'boolean')
@@ -185,12 +181,8 @@
         return result;
     }
     compareSDKs(configuration) {
-        if (this.sdk === null && configuration.sdk === null)
+        if (this.sdk === null || configuration.sdk === null)
             return 0;
-        if (this.sdk === null && configuration.sdk !== null)
-            return -1;
-        if (this.sdk !== null && configuration.sdk === null)
-            return 1;
 
         const sdkRegex = /(\d+)([A-Z])(\d+)(.*)/;
         const myMatch = this.sdk.match(sdkRegex);

Modified: trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js (250000 => 250001)


--- trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js	2019-09-17 22:57:05 UTC (rev 250000)
+++ trunk/Tools/resultsdbpy/resultsdbpy/view/static/js/timeline.js	2019-09-17 23:48:49 UTC (rev 250001)
@@ -607,6 +607,33 @@
 
         function onDotEnterFactory(configuration) {
             return (data, event, canvas) => {
+                let partialConfiguration = {};
+                self.configurations.forEach(configurationKey => {
+                    if (configurationKey.compare(configuration) || configurationKey.compareSDKs(configuration))
+                        return;
+                    self.results[configurationKey.toKey()].forEach(pair => {
+                        const computedConfiguration = new Configuration(pair.configuration);
+                        if (computedConfiguration.compare(configuration) || computedConfiguration.compareSDKs(configuration))
+                            return;
+                        let doesMatch = false;
+                        pair.results.forEach(node => {
+                            if (doesMatch)
+                                return;
+                            if (node.uuid == data.uuid)
+                                doesMatch = true;
+                        });
+                        if (doesMatch) {
+                            Configuration.members().forEach(member => {
+                                if (member in partialConfiguration) {
+                                    if (partialConfiguration[member] !== null && partialConfiguration[member] !== computedConfiguration[member])
+                                        partialConfiguration[member] = null;
+                                } else if (computedConfiguration[member] !== null)
+                                    partialConfiguration[member] = computedConfiguration[member];
+                            });
+                        }
+                    });
+                });
+                partialConfiguration = new Configuration(partialConfiguration);
                 const scrollDelta = document.documentElement.scrollTop || document.body.scrollTop;
                 ToolTip.set(
                     `<div class="content">
@@ -631,6 +658,8 @@
                             return `<a href="" target="_blank">${commit.id.substring(0,12)}</a>`;
                         }).join(', ')}
                         <br>
+                        ${partialConfiguration}
+                        <br>
 
                         ${data.expected ? `Expected: ${data.expected}<br>` : ''}
                         ${data.actual ? `Actual: ${data.actual}<br>` : ''}
@@ -667,7 +696,7 @@
             this.results[configuration.toKey()].forEach(pair => {
                 const strippedConfig = new Configuration(pair.configuration);
                 resultsByKey[strippedConfig.toKey()] = combineResults([], [...pair.results].sort(function(a, b) {return b.uuid - a.uuid;}));
-                delete strippedConfig.sdk;
+                strippedConfig.sdk = null;
                 mappedChildrenConfigs[strippedConfig.toKey()] = strippedConfig;
                 if (!childrenConfigsBySDK[strippedConfig.toKey()])
                     childrenConfigsBySDK[strippedConfig.toKey()] = [];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to