Title: [217230] trunk/Websites/perf.webkit.org
- Revision
- 217230
- Author
- [email protected]
- Date
- 2017-05-22 11:29:05 -0700 (Mon, 22 May 2017)
Log Message
Fix the bug that sometimes analysis task results pane is missing.
https://bugs.webkit.org/show_bug.cgi?id=172404
Reviewed by Ryosuke Niwa.
AnalysisTaskPage._didFetchTask and AnalaysisTaskPage._fetchRelatedInfoForTaskId should be called in order.
The race between those two functions causes the analysis task results pane sometimes missing.
* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer.prototype.render): Fix the bug in r217173 that commitSet can be undefined.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype.updateFromSerializedState): Use arrow function to get rid of self variable.
Use `const` instead of var for constant variable. And call _didFetchTask before calling _fetchRelatedInfoForTaskId.
(AnalysisTaskPage.prototype._renderTaskNameAndStatus):
(AnalysisTaskPage.cssTemplate):
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (217229 => 217230)
--- trunk/Websites/perf.webkit.org/ChangeLog 2017-05-22 18:27:34 UTC (rev 217229)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2017-05-22 18:29:05 UTC (rev 217230)
@@ -1,3 +1,21 @@
+2017-05-22 Dewei Zhu <[email protected]>
+
+ Fix the bug that sometimes analysis task results pane is missing.
+ https://bugs.webkit.org/show_bug.cgi?id=172404
+
+ Reviewed by Ryosuke Niwa.
+
+ AnalysisTaskPage._didFetchTask and AnalaysisTaskPage._fetchRelatedInfoForTaskId should be called in order.
+ The race between those two functions causes the analysis task results pane sometimes missing.
+
+ * public/v3/components/analysis-results-viewer.js:
+ (AnalysisResultsViewer.prototype.render): Fix the bug in r217173 that commitSet can be undefined.
+ * public/v3/pages/analysis-task-page.js:
+ (AnalysisTaskPage.prototype.updateFromSerializedState): Use arrow function to get rid of self variable.
+ Use `const` instead of var for constant variable. And call _didFetchTask before calling _fetchRelatedInfoForTaskId.
+ (AnalysisTaskPage.prototype._renderTaskNameAndStatus):
+ (AnalysisTaskPage.cssTemplate):
+
2017-05-19 Ryosuke Niwa <[email protected]>
Add a commit log viewer next to the analysis results viewer
Modified: trunk/Websites/perf.webkit.org/public/v3/components/analysis-results-viewer.js (217229 => 217230)
--- trunk/Websites/perf.webkit.org/public/v3/components/analysis-results-viewer.js 2017-05-22 18:27:34 UTC (rev 217229)
+++ trunk/Websites/perf.webkit.org/public/v3/components/analysis-results-viewer.js 2017-05-22 18:29:05 UTC (rev 217230)
@@ -62,6 +62,8 @@
for (const label of this._rangeSelectorLabels) {
const commitSet = this._selectedRange[label];
+ if (!commitSet)
+ continue;
const list = this._selectorRadioButtonList[label] || [];
for (const item of list) {
if (item.commitSet.equals(commitSet))
Modified: trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js (217229 => 217230)
--- trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js 2017-05-22 18:27:34 UTC (rev 217229)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/analysis-task-page.js 2017-05-22 18:29:05 UTC (rev 217230)
@@ -222,7 +222,7 @@
{
super.render();
}
-
+
static htmlTemplate()
{
return `<custom-configuration-test-group-form id="form"></custom-configuration-test-group-form>`;
@@ -465,21 +465,21 @@
updateFromSerializedState(state)
{
- var self = this;
if (state.remainingRoute) {
- var taskId = parseInt(state.remainingRoute);
- AnalysisTask.fetchById(taskId).then(this._didFetchTask.bind(this), function (error) {
- self._errorMessage = `Failed to fetch the analysis task ${state.remainingRoute}: ${error}`;
- self.enqueueToRender();
+ const taskId = parseInt(state.remainingRoute);
+ AnalysisTask.fetchById(taskId).then(this._didFetchTask.bind(this)).then(() => {
+ this._fetchRelatedInfoForTaskId(taskId);
+ }, (error) => {
+ this._errorMessage = `Failed to fetch the analysis task ${state.remainingRoute}: ${error}`;
+ this.enqueueToRender();
});
- this._fetchRelatedInfoForTaskId(taskId);
} else if (state.buildRequest) {
- var buildRequestId = parseInt(state.buildRequest);
- AnalysisTask.fetchByBuildRequestId(buildRequestId).then(this._didFetchTask.bind(this)).then(function (task) {
- self._fetchRelatedInfoForTaskId(task.id());
- }, function (error) {
- self._errorMessage = `Failed to fetch the analysis task for the build request ${buildRequestId}: ${error}`;
- self.enqueueToRender();
+ const buildRequestId = parseInt(state.buildRequest);
+ AnalysisTask.fetchByBuildRequestId(buildRequestId).then(this._didFetchTask.bind(this)).then((task) => {
+ this._fetchRelatedInfoForTaskId(task.id());
+ }, (error) => {
+ this._errorMessage = `Failed to fetch the analysis task for the build request ${buildRequestId}: ${error}`;
+ this.enqueueToRender();
});
}
}
@@ -647,7 +647,7 @@
const platform = task.platform();
const metric = task.metric();
const subtitle = `${metric.fullName()} on ${platform.label()}`;
- this.renderReplace(this.content('platform-metric-names'),
+ this.renderReplace(this.content('platform-metric-names'),
link(subtitle, this.router().url('charts', ChartsPage.createStateForAnalysisTask(task))));
}
this.content('change-type').value = changeType || 'unconfirmed';
@@ -957,7 +957,7 @@
padding: 0 1rem;
border-bottom: solid 1px #ccc;
}
-
+
#results-pane {
margin-top: 1rem;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes