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