Skip to content

Commit fca59b4

Browse files
committed
trying to fix "View morphology" button
1 parent c0086cd commit fca59b4

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

apps/model_catalog/src/ModelDetailContent.jsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
showNotification,
2323
} from "./utils";
2424
import Avatar from "@material-ui/core/Avatar";
25+
import { baseUrl } from "./globals";
2526

2627

2728
function getDownloadURL(source_url) {
@@ -58,12 +59,12 @@ function openBlueNaaS(model_inst_url) {
5859
);
5960
}
6061

61-
function viewMorphology(model_inst_morph_url) {
62-
// var url_collab = encodeURIComponent("https://collab.humanbrainproject.eu/#/collab/" + ids.collab_id + "/nav/" + ids.app_id + "?state=model." + model_id + ",external")
63-
var url =
64-
"https://neuroinformatics.nl/HBP/morphology-viewer-dev/?url=" +
65-
model_inst_morph_url; // + "&referrer=" + url_collab;
66-
window.open(url, "_blank");
62+
function viewMorphology(morphologyUrl) {
63+
const proxyUrl = baseUrl + "/morphology?url=" + encodeURIComponent(morphologyUrl);
64+
window.open(
65+
"https://neuroinformatics.nl/HBP/morphology-viewer-dev/?url=" + encodeURIComponent(proxyUrl),
66+
"_blank"
67+
);
6768
}
6869

6970
function InstanceParameter(props) {

0 commit comments

Comments
 (0)