WebKit Bugzilla
Attachment 373442 Details for
Bug 199483
: Test freshness page should expose revision information for latest build on tooltip.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199483-20190703172746.patch (text/plain), 10.52 KB, created by
dewei_zhu
on 2019-07-03 17:27:47 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
dewei_zhu
Created:
2019-07-03 17:27:47 PDT
Size:
10.52 KB
patch
obsolete
>Subversion Revision: 247118 >diff --git a/Websites/perf.webkit.org/ChangeLog b/Websites/perf.webkit.org/ChangeLog >index b61419bc6954357d9d3bbca8e000838cc0be18a8..27834f9bb9f1d5aa0006f1828afbdc8ce33cae33 100644 >--- a/Websites/perf.webkit.org/ChangeLog >+++ b/Websites/perf.webkit.org/ChangeLog >@@ -1,3 +1,19 @@ >+2019-07-03 Dewei Zhu <dewei_zhu@apple.com> >+ >+ Test freshness page should expose revision information for latest build on tooltip. >+ https://bugs.webkit.org/show_bug.cgi?id=199483 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added latest build revision information on test freshness page tooltip. >+ >+ * public/v3/pages/test-freshness-page.js: Add build revision information on tooltip. >+ (TestFreshnessPage.prototype.didConstructShadowTree): >+ (TestFreshnessPage.prototype._fetchTestResults): >+ (TestFreshnessPage.prototype.render): >+ (TestFreshnessPage.prototype._renderTooltip): >+ (TestFreshnessPage.cssTemplate): >+ > 2019-06-26 Dewei Zhu <dewei_zhu@apple.com> > > commit api should not return 'AmbiguousRevisionPrefix' if there is an exact revision match >diff --git a/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js b/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js >index 5ed433d309885498f67bfd2077b7868776048580..370007048fceeb65e8775d4ab6564dae9628dcba 100644 >--- a/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js >+++ b/Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js >@@ -19,12 +19,12 @@ class TestFreshnessPage extends PageWithHeading { > > didConstructShadowTree() > { >- const tooltipContainer = this.content('tooltip-container'); >- tooltipContainer.addEventListener('mouseenter', () => { >+ const tooltipTable = this.content('tooltip-table'); >+ tooltipTable.addEventListener('mouseenter', () => { > this._hoveringTooltip = true; > this.enqueueToRender(); > }); >- tooltipContainer.addEventListener('mouseleave', () => { >+ tooltipTable.addEventListener('mouseleave', () => { > this._hoveringTooltip = false; > this.enqueueToRender(); > }); >@@ -89,8 +89,9 @@ class TestFreshnessPage extends PageWithHeading { > const currentTimeSeries = measurementSet.fetchedTimeSeries('current', false, false); > > let timeForLatestBuild = startTime; >- let lastBuildLink = null; >+ let lastBuild = null; > let builder = null; >+ let commitSet = null; > const lastPoint = currentTimeSeries.lastPoint(); > if (lastPoint) { > timeForLatestBuild = lastPoint.build().buildTime().getTime(); >@@ -101,14 +102,15 @@ class TestFreshnessPage extends PageWithHeading { > continue; > if (build.buildTime().getTime() >= timeForLatestBuild) { > timeForLatestBuild = build.buildTime().getTime(); >- lastBuildLink = build.url(); >+ lastBuild = build; > builder = build.builder(); > } > } >+ commitSet = lastPoint.commitSet(); > } > > lastDataPointByMetric.set(metric, {time: timeForLatestBuild, hasCurrentDataPoint: !!lastPoint, >- lastBuildLink, builder}); >+ lastBuild, builder, commitSet}); > this.enqueueToRender(); > }); > } >@@ -122,7 +124,8 @@ class TestFreshnessPage extends PageWithHeading { > this._renderTableLazily.evaluate(this._platforms, this._metrics); > > let buildSummaryForCurrentlyHighlightedIndicator = null; >- let buildLinkForCurrentlyHighlightedIndicator = null; >+ let buildForCurrentlyHighlightedIndicator = null; >+ let commitSetForCurrentHighlightedIndicator = null; > const builderForCurrentlyHighlightedIndicator = this._currentlyHighlightedIndicator ? this._builderByIndicator.get(this._currentlyHighlightedIndicator) : null; > for (const [platform, lastDataPointByMetric] of this._lastDataPointByConfiguration.entries()) { > for (const [metric, lastDataPoint] of lastDataPointByMetric.entries()) { >@@ -136,36 +139,60 @@ class TestFreshnessPage extends PageWithHeading { > const indicator = this._indicatorByConfiguration.get(platform).get(metric); > if (this._currentlyHighlightedIndicator && this._currentlyHighlightedIndicator === indicator) { > buildSummaryForCurrentlyHighlightedIndicator = summary; >- buildLinkForCurrentlyHighlightedIndicator = lastDataPoint.lastBuildLink; >+ buildForCurrentlyHighlightedIndicator = lastDataPoint.lastBuild; >+ commitSetForCurrentHighlightedIndicator = lastDataPoint.commitSet; > } > this._builderByIndicator.set(indicator, lastDataPoint.builder); > indicator.update(timeDuration, this._testAgeTolerance, url, builderForCurrentlyHighlightedIndicator && builderForCurrentlyHighlightedIndicator === lastDataPoint.builder); > } > } >- this._renderTooltipLazily.evaluate(this._currentlyHighlightedIndicator, this._hoveringTooltip, buildSummaryForCurrentlyHighlightedIndicator, buildLinkForCurrentlyHighlightedIndicator); >+ this._renderTooltipLazily.evaluate(this._currentlyHighlightedIndicator, this._hoveringTooltip, buildSummaryForCurrentlyHighlightedIndicator, buildForCurrentlyHighlightedIndicator, commitSetForCurrentHighlightedIndicator); > } > >- _renderTooltip(indicator, hoveringTooltip, buildSummary, buildLink) >+ _renderTooltip(indicator, hoveringTooltip, buildSummary, build, commitSet) > { > if (!indicator || !buildSummary) { >- this.content('tooltip-container').style.display = hoveringTooltip ? null : 'none'; >+ this.content('tooltip-table').style.display = hoveringTooltip ? null : 'none'; > return; > } > const element = ComponentBase.createElement; >+ const link = ComponentBase.createLink; > > const rect = indicator.element().getBoundingClientRect(); >- const tooltipContainer = this.content('tooltip-container'); >- tooltipContainer.style.display = null; >+ const tooltipTable = this.content('tooltip-table'); >+ tooltipTable.style.display = null; > >- const tooltipContainerComputedStyle = getComputedStyle(tooltipContainer); >+ const tooltipContainerComputedStyle = getComputedStyle(tooltipTable); > const containerMarginTop = parseFloat(tooltipContainerComputedStyle.paddingTop); > const containerMarginLeft = parseFloat(tooltipContainerComputedStyle.marginLeft); > >- tooltipContainer.style.position = 'absolute'; >- tooltipContainer.style.top = rect.top - (tooltipContainer.offsetHeight + containerMarginTop) + 'px'; >- tooltipContainer.style.left = rect.left + rect.width / 2 - tooltipContainer.offsetWidth / 2 + containerMarginLeft + 'px'; >+ tooltipTable.style.position = 'absolute'; >+ tooltipTable.style.top = rect.top - (tooltipTable.offsetHeight + containerMarginTop) + 'px'; >+ tooltipTable.style.left = rect.left + rect.width / 2 - tooltipTable.offsetWidth / 2 + containerMarginLeft + 'px'; >+ >+ let tableContent = [element('tr', element('td', {colspan: 2}, buildSummary))]; >+ if (commitSet.repositories().size) >+ tableContent = element('tr', element('th', {colspan: 2}, 'Latest build information')); >+ for (const repository of Repository.sortByNamePreferringOnesWithURL(commitSet.repositories())) { >+ const commit = commitSet.commitForRepository(repository); >+ tableContent.push(element('tr', [ >+ element('td', repository.name()), >+ element('td', commit.url() ? link(commit.label(), commit.label(), commit.url(), true) : commit.label()) >+ ])) >+ } >+ >+ if (build) { >+ const url = build.url(); >+ const buildNumber = build.buildNumber(); >+ tableContent.push(element('tr', [ >+ element('td', 'Build'), >+ element('td', {colspan: 2}, [ >+ url ? link(buildNumber, build.label(), url, true) : buildNumber >+ ]), >+ ])); >+ } > >- this.renderReplace(tooltipContainer, [element('p', buildSummary), buildLink ? element('a', {href: buildLink}, 'Latest Build') : []]); >+ this.renderReplace(tooltipTable, tableContent); > } > > _renderTable(platforms, metrics) >@@ -217,7 +244,7 @@ class TestFreshnessPage extends PageWithHeading { > > static htmlTemplate() > { >- return `<section class="page-with-heading"><div id="tooltip-container"></div><table id="test-health"></table></section>`; >+ return `<section class="page-with-heading"><table id="tooltip-table"></table><table id="test-health"></table></section>`; > } > > static cssTemplate() >@@ -308,9 +335,8 @@ class TestFreshnessPage extends PageWithHeading { > border-right: calc(1.6rem - 1px) solid #F9F9F9; > border-top: calc(1.6rem - 1px) solid transparent; > } >- #tooltip-container { >+ #tooltip-table { > width: 22rem; >- height: 2rem; > background-color: #34495E; > opacity: 0.9; > margin: 0.3rem; >@@ -318,8 +344,15 @@ class TestFreshnessPage extends PageWithHeading { > border-radius: 0.4rem; > z-index: 1; > text-align: center; >+ display: inline-table; >+ color: white; > } >- #tooltip-container::after { >+ #tooltip-table td { >+ overflow: hidden; >+ max-width: 22rem; >+ text-overflow: ellipsis; >+ } >+ #tooltip-table::after { > content: " "; > position: absolute; > top: 100%; >@@ -329,11 +362,7 @@ class TestFreshnessPage extends PageWithHeading { > border-style: solid; > border-color: #34495E transparent transparent transparent; > } >- #tooltip-container p { >- color: white; >- margin: 0; >- } >- #tooltip-container a { >+ #tooltip-table a { > color: #B03A2E; > font-weight: bold; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
rniwa
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199483
:
373440
| 373442