LT-162: Parse dicomWeb qidoRoot
This commit is contained in:
1 parent
76a9f6a894
commit
2bb429a898
2 files changed
+15
-4
No files matched your search
+15
-1
@@ -1,9 +1,23 @@
|
||||
|
||||
function parseUrl(url) {
|
||||
var parser = document.createElement('a');
|
||||
parser.href = url;
|
||||
return parser;
|
||||
}
|
||||
|
||||
Template.serverInformationModal.helpers({
|
||||
serverInformation: function() {
|
||||
var defaultServiceType = Meteor.settings && Meteor.settings.defaultServiceType || 'dicomWeb';
|
||||
var serviceInfo = Meteor.settings[defaultServiceType];
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user