Skip to content

Commit

Permalink
Merge branch 'release-2.12.x' into TASK-5487
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes authored Jan 30, 2024
2 parents 32c466a + b90d93a commit 2faa907
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 78 deletions.
38 changes: 24 additions & 14 deletions src/core/clients/cellbase/cellbase-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,31 @@ export class CellBaseClient {
detail: value
}));
};
this.getMeta("about")
.then(response => {
const result = response?.response?.[0]?.result[0];
// Older versions of cellbase are using 'Version: ' as the key instead of 'Version' (Issue #185).
// To keep compatibility, we will check for both keys, but in the future only the newest key will be used.
globalEvent("hostInit", {
host: "cellbase",
value: "v" + (result["Version"] || result["Version: "]),
});
})
.catch(e => {
console.error(e);
// globalEvent("signingInError", {value: "Cellbase host not available."});
globalEvent("hostInit", {host: "cellbase", value: "NOT AVAILABLE"});
if (!this._config?.host) {
globalEvent("hostInit", {
host: "cellbase",
value: "NOT DEFINED"
});
} else {
this.getMeta("about")
.then(response => {
const result = response?.response?.[0]?.result[0];
// Older versions of cellbase are using 'Version: ' as the key instead of 'Version' (Issue #185).
// To keep compatibility, we will check for both keys, but in the future only the newest key will be used.
globalEvent("hostInit", {
host: "cellbase",
value: "v" + (result["Version"] || result["Version: "]),
});
})
.catch(e => {
console.error(e);
// globalEvent("signingInError", {value: "Cellbase host not available."});
globalEvent("hostInit", {
host: "cellbase",
value: "NOT AVAILABLE"
});
});
}
}

_initCache() {
Expand Down
5 changes: 3 additions & 2 deletions src/sites/iva/iva-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -988,9 +988,10 @@ class IvaApp extends LitElement {
} else {
// Josemi 20220216 NOTE: we keep this old way to be backward compatible with OpenCGA 2.1
// But this should be removed in future releases
this.config.cellbase = null;
this.cellbaseClient = new CellBaseClient({
host: this.config.cellbase.host,
version: this.config.cellbase.version,
host: this.config.cellbase?.host,
version: this.config.cellbase?.version,
species: "hsapiens",
});
}
Expand Down
Loading

0 comments on commit 2faa907

Please sign in to comment.