# HG changeset patch # User Sebastien Jodogne # Date 1561110701 -7200 # Node ID d74e12cfeba3ceae320b73f6938b6fa50c9e21fe # Parent e694970cd263dcabc6d063f2fdc1dbea8d76bf25# Parent 39dd8b84b20f911d3a776ab670099bf4b10c77f8 integration refactoring->mainline diff -r e694970cd263 -r d74e12cfeba3 Plugin/DicomWebClient.cpp --- a/Plugin/DicomWebClient.cpp Thu Jun 20 23:13:25 2019 +0200 +++ b/Plugin/DicomWebClient.cpp Fri Jun 21 11:51:41 2019 +0200 @@ -86,7 +86,7 @@ answer = Json::objectValue; answer["ID"] = jobId; answer["Path"] = OrthancPlugins::RemoveMultipleSlashes - ("../../" + OrthancPlugins::Configuration::GetOrthancApiRoot() + "/jobs/" + jobId); + ("../" + OrthancPlugins::Configuration::GetOrthancApiRoot() + "/jobs/" + jobId); } std::string s = answer.toStyledString(); diff -r e694970cd263 -r d74e12cfeba3 Plugin/OrthancExplorer.js --- a/Plugin/OrthancExplorer.js Thu Jun 20 23:13:25 2019 +0200 +++ b/Plugin/OrthancExplorer.js Fri Jun 21 11:51:41 2019 +0200 @@ -32,7 +32,7 @@ } // Launch the dialog - $('#dialog').simpledialog2({ + $(document).simpledialog2({ mode: 'blank', animate: false, headerText: 'Choose target', diff -r e694970cd263 -r d74e12cfeba3 Plugin/Plugin.cpp --- a/Plugin/Plugin.cpp Thu Jun 20 23:13:25 2019 +0200 +++ b/Plugin/Plugin.cpp Fri Jun 21 11:51:41 2019 +0200 @@ -559,7 +559,7 @@ > (root + "app/libs/(.*)", true); - OrthancPlugins::RegisterRestCallback(root + "app/info", true); + OrthancPlugins::RegisterRestCallback(root + "info", true); OrthancPlugins::RegisterRestCallback(root + "studies/([^/]*)/series/([^/]*)/instances/([^/]*)/rendered", true); diff -r e694970cd263 -r d74e12cfeba3 WebApplication/app.js --- a/WebApplication/app.js Thu Jun 20 23:13:25 2019 +0200 +++ b/WebApplication/app.js Fri Jun 21 11:51:41 2019 +0200 @@ -27,7 +27,7 @@ } }, data: { - orthancExplorerUri: '../../../', + orthancApiRoot: '../../../', previewFailure: true, preview: DEFAULT_PREVIEW, showTruncatedStudies: false, @@ -136,9 +136,13 @@ app.Clear(); }); axios - .get('../info') + .get('../../info') .then(response => { - app.orthancExplorerUri = response.data.OrthancApiRoot + '../../'; + app.orthancApiRoot = response.data.OrthancApiRoot; + if (!app.orthancApiRoot.endsWith('/')) { + app.orthancApiRoot += '/'; + } + app.orthancApiRoot += '../../'; // To be at the same level as "info" }); }, methods: { @@ -247,15 +251,15 @@ app.$refs['study-details'].show(); }, RetrieveStudy: function(study) { + var base = '../../servers/'; axios - .post('../../servers/' + app.activeServer + '/wado', { + .post(base + app.activeServer + '/wado', { 'Uri' : '/studies/' + study[DICOM_TAG_STUDY_INSTANCE_UID].Value }) .then(response => { app.jobLevel = 'study'; app.jobId = response.data.ID; - // The "replace()" below removes the possible trailing slash - app.jobUri = app.orthancExplorerUri.replace(/\/$/, '') + '/' + response.data.Path; + app.jobUri = base + response.data.Path; app.$refs['retrieve-job'].show(); app.RefreshJobDetails(); }); @@ -311,15 +315,16 @@ app.$refs['series-details'].show(); }, RetrieveSeries: function(series) { + var base = '../../servers/'; axios - .post('../../servers/' + app.activeServer + '/wado', { + .post(base + app.activeServer + '/wado', { 'Uri' : ('/studies/' + app.currentStudy + '/series/' + series[DICOM_TAG_SERIES_INSTANCE_UID].Value) }) .then(response => { app.jobLevel = 'series'; app.jobId = response.data.ID; - app.jobUri = app.orthancExplorerUri + '/' + response.data.Path; + app.jobUri = base + response.data.Path; app.$refs['retrieve-job'].show(); app.RefreshJobDetails(); }); diff -r e694970cd263 -r d74e12cfeba3 WebApplication/index.html --- a/WebApplication/index.html Thu Jun 20 23:13:25 2019 +0200 +++ b/WebApplication/index.html Fri Jun 21 11:51:41 2019 +0200 @@ -38,7 +38,7 @@ you can search the content of remote DICOMweb servers (QIDO-RS), then locally retrieve the DICOM studies/series of interest - (WADO-RS). Orthanc Explorer can be used to send DICOM resources to remote DICOMweb servers (STOW-RS).

@@ -47,7 +47,7 @@ href="https://book.orthanc-server.com/plugins/dicomweb.html" target="_blank" role="button">Open documentation Open Orthanc Explorer