Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Side by Side Diff: golden/res/imp/testsummarydetails.html

Issue 1200343002: gold: ByBlame WIP (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « golden/res/imp/commit-panel.html ('k') | golden/templates/blamelist.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- The <test-summary-details-sk> custom element declaration. 1 <!-- The <test-summary-details-sk> custom element declaration.
2 2
3 Displays the details about all the untriaged digests in one test summary. 3 Displays the details about all the untriaged digests in one test summary.
4 4
5 Attributes: 5 Attributes:
6 test - The name of the test. 6 test - The name of the test.
7 digest - The digest we are interested in. 7 digest - The digest we are interested in.
8 limit - The maximum number of digests to display. 8 limit - The maximum number of digests to display.
9 triage - A boolean, if true, then display the triage controls. 9 triage - A boolean, if true, then display the triage controls.
10 data-diff - A read-only attribute that is the size of the difference between 10 data-diff - A read-only attribute that is the size of the difference between
11 this digest and the closest positive digest. Will be set before the 11 this digest and the closest positive digest. Will be set before the
12 'loaded' event. May be set to Infinity if there are no positive digests. 12 'loaded' event. May be set to Infinity if there are no positive digests.
13 data-closest - A read-only attribute that is the digest of the closest image . 13 data-closest - A read-only attribute that is the digest of the closest image .
14 data-diffdigests - A read-only attribute of the digest and the closest posit ive 14 data-diffdigests - A read-only attribute of the digest and the closest posit ive
15 image digest, separated by a dash, ala "abbab-12131>". The digests are in 15 image digest, separated by a dash, ala "abbab-12131>". The digests are in
16 sorted order, so they can be used in /img/diffs/ URLs. 16 sorted order, so they can be used in /img/diffs/ URLs.
17 images - A boolean, if true the images are displayed. 17 images - A boolean, if true the images are displayed.
18 failed - A boolean, true if the request to the server for details failed. 18 failed - A boolean, true if the request to the server for details failed.
19 mailbox - An sk.Mailbox address to subscribe for the data to populate
20 this test-summary-details-sk. If this isn't set then the element will
21 request that data from the server. The data in the mailbox must be a
22 serialized PolyDetailsGUI, which is also the form of the data that's
23 returned from the server.
19 24
20 Events: 25 Events:
21 triage - A triage event is generated when the triage button is pressed. The e.detail 26 triage - A triage event is generated when the triage button is pressed. The e.detail
22 of the event looks like: 27 of the event looks like:
23 28
24 { 29 {
25 digest: ["ba636123..."], 30 digest: ["ba636123..."],
26 status: "positive", 31 status: "positive",
27 test: "blurs" 32 test: "blurs"
28 } 33 }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 value: false, 216 value: false,
212 reflect: true, 217 reflect: true,
213 }, 218 },
214 images: { 219 images: {
215 value: true, 220 value: true,
216 reflect: true, 221 reflect: true,
217 }, 222 },
218 failed: { 223 failed: {
219 value: false, 224 value: false,
220 reflect: true, 225 reflect: true,
226 },
227 mailbox: {
228 value: "",
229 reflect: true,
221 } 230 }
222 }, 231 },
223 232
224 //, Force the template expansion to be in the Light DOM. 233 //, Force the template expansion to be in the Light DOM.
225 parseDeclaration: function(elementElement) { 234 parseDeclaration: function(elementElement) {
226 var template = this.fetchTemplate(elementElement); 235 var template = this.fetchTemplate(elementElement);
227 if (template != null) { 236 if (template != null) {
228 this.lightFromTemplate(template); 237 this.lightFromTemplate(template);
229 }; 238 };
230 }, 239 },
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 reloadData: function() { 318 reloadData: function() {
310 // Don't bother reloading if nothing's changed. 319 // Don't bother reloading if nothing's changed.
311 if (this.test == this.reloadParams.test && this.digest == this.reloadPar ams.digest && this.limit == this.reloadParams.limit) { 320 if (this.test == this.reloadParams.test && this.digest == this.reloadPar ams.digest && this.limit == this.reloadParams.limit) {
312 return 321 return
313 } 322 }
314 this.reloadParams.test = this.test; 323 this.reloadParams.test = this.test;
315 this.reloadParams.digest = this.digest; 324 this.reloadParams.digest = this.digest;
316 this.reloadParams.limit = this.limit; 325 this.reloadParams.limit = this.limit;
317 326
318 var that = this; 327 var that = this;
319 var q = '?test=' + this.test + '&top=' + this.digest+ '&left=' + this.di gest + '&graphs=true&closest=' + this.triage; 328 if (this.mailbox) {
320 sk.get('_/details'+q).then(JSON.parse).then(function(json) { 329 sk.Mailbox.subscribe(this.mailbox, this.dataAvailable.bind(this))
321 if (that.limit && that.limit < json.traces.length) { 330 } else {
322 json.traces = json.traces.slice(0, that.limit); 331 var q = '?test=' + this.test + '&top=' + this.digest+ '&left=' + this. digest + '&graphs=true&closest=' + this.triage;
323 that.isTruncated = true; 332 sk.get('_/details'+q).then(JSON.parse).then(this.dataAvailable.bind(th is)).catch(function() {
333 that.failed = true;
334 that.dispatchEvent(new CustomEvent('details-loaded', {detail: that, bubbles: true}));
335 });
336 }
337 },
338
339 dataAvailable: function(json) {
340 if (this.limit && this.limit < json.traces.length) {
341 json.traces = json.traces.slice(0, this.limit);
342 this.isTruncated = true;
343 }
344 if (this.triage) {
345 json.closest = json.posClosest.diff < json.negClosest.diff ? json.posC losest : json.negClosest;
346 this.negIsClosest = json.negClosest.diff < json.posClosest.diff;
347 }
348 this.details = json;
349 this.$.dots.setValue(this.details);
350 this.$.dots.setCommits(this.details.commits);
351 this.$.blame.value = this.details.blame;
352 this.$.blame.commits = this.details.commits;
353 this.$.dotlegend.digests = this.details.otherDigests;
354
355 if (this.triage) {
356 if (json.closest.digest != "") {
357 this.dataset.diff = json.closest.diff;
358 this.dataset.closest = json.closest.digest;
359 if (json.closest.digest < this.digest) {
360 this.diffDigests = json.closest.digest + "-" + this.digest;
361 } else {
362 this.diffDigests = this.digest + "-" + json.closest.digest;
363 }
364 this.dataset.diffdigests = this.diffDigests;
365 } else {
366 this.dataset.diff = Infinity;
324 } 367 }
325 if (that.triage) { 368 }
326 json.closest = json.posClosest.diff < json.negClosest.diff ? json.po sClosest : json.negClosest; 369 this.dispatchEvent(new CustomEvent('details-loaded', {detail: this, bubb les: true}));
327 that.negIsClosest = json.negClosest.diff < json.posClosest.diff;
328 }
329 that.details = json;
330 that.$.dots.setValue(that.details);
331 that.$.dots.setCommits(that.details.commits);
332 that.$.blame.value = that.details.blame;
333 that.$.blame.commits = that.details.commits;
334 that.$.dotlegend.digests = that.details.otherDigests;
335
336 if (that.triage) {
337 if (json.closest.digest != "") {
338 that.dataset.diff = json.closest.diff;
339 that.dataset.closest = json.closest.digest;
340 if (json.closest.digest < that.digest) {
341 that.diffDigests = json.closest.digest + "-" + that.digest;
342 } else {
343 that.diffDigests = that.digest + "-" + json.closest.digest;
344 }
345 that.dataset.diffdigests = that.diffDigests;
346 } else {
347 that.dataset.diff = Infinity;
348 }
349 }
350 that.dispatchEvent(new CustomEvent('details-loaded', {detail: that, bu bbles: true}));
351 }).catch(function() {
352 that.failed = true;
353 that.dispatchEvent(new CustomEvent('details-loaded', {detail: that, bu bbles: true}));
354 });
355 }, 370 },
356 371
357 testChanged: function() { 372 testChanged: function() {
358 this.reloadData(); 373 this.reloadData();
359 }, 374 },
360 375
361 digestChanged: function() { 376 digestChanged: function() {
362 this.reloadData(); 377 this.reloadData();
363 }, 378 },
364 379
(...skipping 27 matching lines...) Expand all
392 if (showImages) { 407 if (showImages) {
393 return "/img/diffs/"+digest+".png" 408 return "/img/diffs/"+digest+".png"
394 } else { 409 } else {
395 return "" 410 return ""
396 } 411 }
397 }, 412 },
398 413
399 }); 414 });
400 </script> 415 </script>
401 </polymer-element> 416 </polymer-element>
OLDNEW
« no previous file with comments | « golden/res/imp/commit-panel.html ('k') | golden/templates/blamelist.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698