Skip to content

Commit

Permalink
Fixed issue with loading mappings if mapping file was deleted on server
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasJejkal committed Jul 27, 2023
1 parent 74de485 commit e95523c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private static List<Class<IMappingPlugin>> extractClassesFromJAR(File jar, Class
private static boolean isPluggableClass(Class<?> cls) {
for (Class<?> i : cls.getInterfaces()) {
LOG.trace("Checking {} against {}.", i, IMappingPlugin.class);
LOG.trace("ASSIGN {}", IMappingPlugin.class.isAssignableFrom(cls));
LOG.trace("ASSIGN {}", IMappingPlugin.class.isAssignableFrom(cls));
if (i.equals(IMappingPlugin.class)) {
LOG.trace("IMappingPlugin interface found.");
return true;
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/static/JS/listSchemes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function getRecords() {
http.send();
http.onprogress = () => {
document.getElementById("progress").hidden = false;
}
};
http.onload = (e) => {
const results = JSON.parse(http.responseText);
if (results.length > 0) {
Expand All @@ -19,24 +19,24 @@ function getRecords() {
document.getElementById("progress").hidden = false;
console.log(results[i].mappingId);
const schemaHttp = new XMLHttpRequest();
var schema
//var schema
var ETAG

schemaHttp.open("GET", apiUrl + results[i].mappingId);
schemaHttp.setRequestHeader("Content-Type", "application/json");
schemaHttp.setRequestHeader("Accept", "application/vnd.datamanager.mapping-record+json");
schemaHttp.send();
schemaHttp.onload = (e) => {
schema = JSON.parse(schemaHttp.responseText);
// schema = JSON.parse(schemaHttp.responseText);
ETAG = schemaHttp.getResponseHeader("ETag");
console.log("Received Data:");
console.log({
"record": results[i],
"schema": schema,
//"schema": schema,
"ETAG": ETAG
});
records.set(results[i].mappingId, {
"record": results[i],
"schema": schema,
//"schema": schema,
"ETAG": ETAG
})
console.log(records);
Expand Down

0 comments on commit e95523c

Please sign in to comment.