Mercurial > hg > orthanc-stl
comparison Sources/OrthancExplorer.js @ 74:ad9950628b35 default tip
use relative path to instances for reverse proxying
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 15 Oct 2024 14:46:48 +0200 |
parents | 054e36474998 |
children |
comparison
equal
deleted
inserted
replaced
73:1963619e3e87 | 74:ad9950628b35 |
---|---|
492 | 492 |
493 | 493 |
494 function AddOpenStlNexusButton(instanceId, id, parent) { | 494 function AddOpenStlNexusButton(instanceId, id, parent) { |
495 if (${IS_NEXUS_ENABLED}) { | 495 if (${IS_NEXUS_ENABLED}) { |
496 $.ajax({ | 496 $.ajax({ |
497 url: '/instances/' + instanceId + '/content/0008,9123', | 497 url: '../instances/' + instanceId + '/content/0008,9123', |
498 success: function(creatorVersionUid) { | 498 success: function(creatorVersionUid) { |
499 if (creatorVersionUid == '${ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE}' || | 499 if (creatorVersionUid == '${ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE}' || |
500 creatorVersionUid == '${ORTHANC_STL_CREATOR_VERSION_UID_1_1}' || | 500 creatorVersionUid == '${ORTHANC_STL_CREATOR_VERSION_UID_1_1}' || |
501 creatorVersionUid == '${ORTHANC_STL_CREATOR_VERSION_UID_1_2}') { | 501 creatorVersionUid == '${ORTHANC_STL_CREATOR_VERSION_UID_1_2}') { |
502 var b = $('<a>') | 502 var b = $('<a>') |
555 GetResource('/series/' + seriesId, function(series) { | 555 GetResource('/series/' + seriesId, function(series) { |
556 if (series['Instances'].length == 1) { | 556 if (series['Instances'].length == 1) { |
557 var instanceId = series['Instances'][0]; | 557 var instanceId = series['Instances'][0]; |
558 | 558 |
559 $.ajax({ | 559 $.ajax({ |
560 url: '/instances/' + instanceId + '/metadata/SopClassUid', | 560 url: '../instances/' + instanceId + '/metadata/SopClassUid', |
561 success: function(sopClassUid) { | 561 success: function(sopClassUid) { |
562 | 562 |
563 if (sopClassUid == STL_PLUGIN_SOP_CLASS_UID_STL) { | 563 if (sopClassUid == STL_PLUGIN_SOP_CLASS_UID_STL) { |
564 // This is an "Encapsulated STL Storage" IOD, register the button | 564 // This is an "Encapsulated STL Storage" IOD, register the button |
565 AddOpenStlViewerButton(instanceId, 'stl-viewer-series', 'series-info'); | 565 AddOpenStlViewerButton(instanceId, 'stl-viewer-series', 'series-info'); |
584 $('#stl-viewer-instance').remove(); | 584 $('#stl-viewer-instance').remove(); |
585 $('#stl-nexus-instance').remove(); | 585 $('#stl-nexus-instance').remove(); |
586 $('#stl-generate-rtstruct-instance').remove(); | 586 $('#stl-generate-rtstruct-instance').remove(); |
587 | 587 |
588 $.ajax({ | 588 $.ajax({ |
589 url: '/instances/' + instanceId + '/metadata/SopClassUid', | 589 url: '../instances/' + instanceId + '/metadata/SopClassUid', |
590 success: function(sopClassUid) { | 590 success: function(sopClassUid) { |
591 | 591 |
592 if (sopClassUid == STL_PLUGIN_SOP_CLASS_UID_STL) { | 592 if (sopClassUid == STL_PLUGIN_SOP_CLASS_UID_STL) { |
593 // This is an "Encapsulated STL Storage" IOD, register the button | 593 // This is an "Encapsulated STL Storage" IOD, register the button |
594 AddOpenStlViewerButton(instanceId, 'stl-viewer-instance', 'instance-info'); | 594 AddOpenStlViewerButton(instanceId, 'stl-viewer-instance', 'instance-info'); |