Fix race condition in service manifest fetching (#2872)

* Fix race condition in service manifest fetching. Fixes #2803

* Set own recon endpoint for Wikidata extension
This commit is contained in:
Antonin Delpeuch 2020-08-21 07:15:02 +02:00 committed by GitHub
parent 92ad819e34
commit 68404abe2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,10 +127,7 @@ SchemaAlignmentDialog.setUpTabs = function() {
// Init the column area // Init the column area
this.updateColumns(); this.updateColumns();
var url = ReconciliationManager.ensureDefaultServicePresent();
SchemaAlignmentDialog._reconService = ReconciliationManager.getServiceFromUrl(url);
/** /**
* Init the issues tab * Init the issues tab
*/ */
@ -148,10 +145,17 @@ SchemaAlignmentDialog.setUpTabs = function() {
this._previewPanes = $(".schema-alignment-dialog-preview"); this._previewPanes = $(".schema-alignment-dialog-preview");
// Load the existing schema var lang = $.i18n('core-recon/wd-recon-lang');
this._reset(theProject.overlayModels.wikibaseSchema); var url = "https://wdreconcile.toolforge.org/"+lang+"/api";
// Perform initial preview ReconciliationManager.getOrRegisterServiceFromUrl(url, function(service) {
this.preview();
// Load the existing schema
SchemaAlignmentDialog._reconService = service;
SchemaAlignmentDialog._reset(theProject.overlayModels.wikibaseSchema);
// Perform initial preview
SchemaAlignmentDialog.preview();
}, false);
} }
SchemaAlignmentDialog.updateColumns = function() { SchemaAlignmentDialog.updateColumns = function() {