LT-162: Parse dicomWeb qidoRoot
This commit is contained in:
parent
76a9f6a894
commit
2bb429a898
@ -9,9 +9,6 @@ Meteor.startup(function() {
|
|||||||
dicomWeb: {
|
dicomWeb: {
|
||||||
endpoints: [{
|
endpoints: [{
|
||||||
name: 'Orthanc',
|
name: 'Orthanc',
|
||||||
host: 'localhost',
|
|
||||||
port: '8042',
|
|
||||||
aeTitle: 'Orthanc',
|
|
||||||
wadoUriRootNOTE: 'either this uri is not correct for wado-uri or wado-uri is not configured on orthanc currently',
|
wadoUriRootNOTE: 'either this uri is not correct for wado-uri or wado-uri is not configured on orthanc currently',
|
||||||
wadoUriRoot: 'http://localhost:8043/wado',
|
wadoUriRoot: 'http://localhost:8043/wado',
|
||||||
qidoRoot: 'http://localhost:8042/dicom-web',
|
qidoRoot: 'http://localhost:8042/dicom-web',
|
||||||
|
|||||||
@ -1,9 +1,23 @@
|
|||||||
|
|
||||||
|
function parseUrl(url) {
|
||||||
|
var parser = document.createElement('a');
|
||||||
|
parser.href = url;
|
||||||
|
return parser;
|
||||||
|
}
|
||||||
|
|
||||||
Template.serverInformationModal.helpers({
|
Template.serverInformationModal.helpers({
|
||||||
serverInformation: function() {
|
serverInformation: function() {
|
||||||
var defaultServiceType = Meteor.settings && Meteor.settings.defaultServiceType || 'dicomWeb';
|
var defaultServiceType = Meteor.settings && Meteor.settings.defaultServiceType || 'dicomWeb';
|
||||||
var serviceInfo = Meteor.settings[defaultServiceType];
|
var serviceInfo = Meteor.settings[defaultServiceType];
|
||||||
if (defaultServiceType === 'dicomWeb') {
|
if (defaultServiceType === 'dicomWeb') {
|
||||||
serviceInfo = serviceInfo["endpoints"];
|
var serverInformationDicom = [];
|
||||||
|
var endpoints = serviceInfo["endpoints"];
|
||||||
|
endpoints.forEach(function(endpoint) {
|
||||||
|
var parsedUrl = parseUrl(endpoint.qidoRoot);
|
||||||
|
serverInformationDicom.push({host: parsedUrl.hostname, port: parsedUrl.port, aeTitle: endpoint.name});
|
||||||
|
});
|
||||||
|
|
||||||
|
return serverInformationDicom;
|
||||||
}
|
}
|
||||||
return serviceInfo;
|
return serviceInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user