Mercurial > hg > orthanc-dicomweb
changeset 326:0823e71d1c14 refactoring
fix paths
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 21 Jun 2019 11:29:04 +0200 |
parents | bae597dc9837 |
children | 39dd8b84b20f |
files | Plugin/DicomWebClient.cpp Plugin/OrthancExplorer.js Plugin/Plugin.cpp WebApplication/app.js WebApplication/index.html |
diffstat | 5 files changed, 18 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugin/DicomWebClient.cpp Thu Jun 20 21:56:09 2019 +0200 +++ b/Plugin/DicomWebClient.cpp Fri Jun 21 11:29:04 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();
--- a/Plugin/OrthancExplorer.js Thu Jun 20 21:56:09 2019 +0200 +++ b/Plugin/OrthancExplorer.js Fri Jun 21 11:29:04 2019 +0200 @@ -32,7 +32,7 @@ } // Launch the dialog - $('#dialog').simpledialog2({ + $(document).simpledialog2({ mode: 'blank', animate: false, headerText: 'Choose target',
--- a/Plugin/Plugin.cpp Thu Jun 20 21:56:09 2019 +0200 +++ b/Plugin/Plugin.cpp Fri Jun 21 11:29:04 2019 +0200 @@ -553,7 +553,7 @@ <ServeEmbeddedFolder<Orthanc::EmbeddedResources::JAVASCRIPT_LIBS> > (root + "app/libs/(.*)", true); - OrthancPlugins::RegisterRestCallback<GetClientInformation>(root + "app/info", true); + OrthancPlugins::RegisterRestCallback<GetClientInformation>(root + "info", true); OrthancPlugins::RegisterRestCallback<RetrieveInstanceRendered>(root + "studies/([^/]*)/series/([^/]*)/instances/([^/]*)/rendered", true);
--- a/WebApplication/app.js Thu Jun 20 21:56:09 2019 +0200 +++ b/WebApplication/app.js Fri Jun 21 11:29:04 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,14 +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; - app.jobUri = app.orthancExplorerUri + '/' + response.data.Path; + app.jobUri = base + response.data.Path; app.$refs['retrieve-job'].show(); app.RefreshJobDetails(); }); @@ -310,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(); });
--- a/WebApplication/index.html Thu Jun 20 21:56:09 2019 +0200 +++ b/WebApplication/index.html Fri Jun 21 11:29:04 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). <a :href="orthancExplorerUri" + (WADO-RS). <a :href="orthancApiRoot" target="_blank">Orthanc Explorer</a> can be used to send DICOM resources to remote DICOMweb servers (STOW-RS). </p> @@ -47,7 +47,7 @@ href="https://book.orthanc-server.com/plugins/dicomweb.html" target="_blank" role="button">Open documentation</a> <a class="btn btn-primary btn-lg" - :href="orthancExplorerUri" + :href="orthancApiRoot" target="_blank" role="button">Open Orthanc Explorer</a> </p> </div>