Modified: trunk/Websites/perf.webkit.org/ChangeLog (194187 => 194188)
--- trunk/Websites/perf.webkit.org/ChangeLog 2015-12-17 00:31:15 UTC (rev 194187)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2015-12-17 00:37:50 UTC (rev 194188)
@@ -1,5 +1,23 @@
2015-12-16 Ryosuke Niwa <[email protected]>
+ v3 UI should show and link the build number on charts page
+ https://bugs.webkit.org/show_bug.cgi?id=152359
+
+ Reviewed by Chris Dumez.
+
+ Show the hyperlinked build number in the v3 UI.
+
+ * public/v3/models/builder.js:
+ (Builder): Renamed _buildURL to _buildUrlTemplate.
+ (Builder.prototype.urlForBuild): Added.
+ * public/v3/pages/chart-pane-status-view.js:
+ (ChartPaneStatusView):
+ (ChartPaneStatusView.prototype.render): Added the code to render hyperlinked build number when one is available.
+ (ChartPaneStatusView.prototype.computeChartStatusLabels): Store currentPoint's measurement object as _buildInfo
+ if the current point is set by an indicator (not by a selection).
+
+2015-12-16 Ryosuke Niwa <[email protected]>
+
v3 dashboard doesn't stretch charts to fill the screen
https://bugs.webkit.org/show_bug.cgi?id=152354
Modified: trunk/Websites/perf.webkit.org/public/v3/models/builder.js (194187 => 194188)
--- trunk/Websites/perf.webkit.org/public/v3/models/builder.js 2015-12-17 00:31:15 UTC (rev 194187)
+++ trunk/Websites/perf.webkit.org/public/v3/models/builder.js 2015-12-17 00:37:50 UTC (rev 194188)
@@ -3,6 +3,13 @@
constructor(id, object)
{
super(id, object);
- this._buildURL = object.buildUrl;
+ this._buildUrlTemplate = object.buildUrl;
}
+
+ urlForBuild(buildNumber)
+ {
+ if (!this._buildUrlTemplate)
+ return null;
+ return this._buildUrlTemplate.replace(/\$builderName/g, this.name()).replace(/\$buildNumber/g, buildNumber);
+ }
}
Modified: trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane-status-view.js (194187 => 194188)
--- trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane-status-view.js 2015-12-17 00:31:15 UTC (rev 194187)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/chart-pane-status-view.js 2015-12-17 00:37:50 UTC (rev 194188)
@@ -6,6 +6,10 @@
super(metric, chart);
this._router = router;
+
+ this._buildLabel = null;
+ this._buildUrl = null;
+
this._revisionList = [];
this._currentRepository = null;
this._revisionCallback = revisionCallback;
@@ -31,8 +35,8 @@
var element = ComponentBase.createElement;
var link = ComponentBase.createLink;
var self = this;
- this.renderReplace(this.content().querySelector('.chart-pane-revisions'),
- this._revisionList.map(function (info, rowIndex) {
+ var buildInfo = this._buildInfo;
+ var tableContent = this._revisionList.map(function (info, rowIndex) {
var selected = info.repository == self._currentRepository;
var action = "" () {
if (self._currentRepository == info.repository)
@@ -46,7 +50,25 @@
element('td', info.url ? link(info.label, info.label, info.url, true) : info.label),
element('td', {class: 'commit-viewer-opener'}, link('\u00BB', action)),
]);
- }));
+ });
+
+ if (this._buildInfo) {
+ var number = this._buildInfo.buildNumber();
+ var builder = Builder.findById(this._buildInfo.builderId());
+ var url = ""
+ if (builder)
+ url = ""
+ var buildTime = this._buildInfo.formattedBuildTime();
+
+ tableContent.unshift(element('tr', [
+ element('td', 'Build'),
+ element('td', {colspan: 2}, [
+ url ? link(number, `Build ${number} on "${builder.name()}"`, url, true) : number,
+ ` (${buildTime})`]),
+ ]));
+ }
+
+ this.renderReplace(this.content().querySelector('.chart-pane-revisions'), tableContent);
}
setCurrentRepository(repository)
@@ -102,26 +124,31 @@
{
super.computeChartStatusLabels(currentPoint, previousPoint);
- if (!currentPoint || !currentPoint.measurement) {
- this._revisionList = [];
- this._analyzeData = null;
+ this._buildInfo = null;
+ this._revisionList = [];
+ this._analyzeData = null;
+
+ if (!currentPoint)
return;
- }
-
+
+ var currentMeasurement = currentPoint.measurement();
+ if (!currentMeasurement)
+ return;
+
+ if (!this._chart.currentSelection() && currentMeasurement)
+ this._buildInfo = currentMeasurement;
+
if (currentPoint && previousPoint && this._chart.currentSelection()) {
this._analyzeData = {
startPointId: previousPoint.id,
endPointId: currentPoint.id,
};
- } else
- this._analyzeData = null;
+ }
// FIXME: Rewrite the interface to obtain the list of revision changes.
var previousMeasurement = previousPoint ? previousPoint.measurement() : null;
- var currentMeasurement = currentPoint.measurement();
var revisions = currentMeasurement.formattedRevisions(previousMeasurement);
-
var revisionList = [];
for (var repositoryId in revisions) {
var repository = Repository.findById(repositoryId);