LT-67 Creating utility helpers for lesiontracker package and implementing servers listing
This commit is contained in:
1 parent
fd5e7dd2f4
commit
d9367cf200
9 files changed
+150
-75
No files matched your search
+5
-27
@@ -1,28 +1,6 @@
|
||||
function parseUrl(url) {
|
||||
var parser = document.createElement('a');
|
||||
parser.href = url;
|
||||
return parser;
|
||||
}
|
||||
|
||||
Template.serverInformationModal.helpers({
|
||||
serverInformation: function() {
|
||||
// TODO: change for Collections
|
||||
var defaultServiceType = Meteor.settings && Meteor.settings.defaultServiceType || 'dicomWeb';
|
||||
var serviceInfo = Meteor.settings.servers[defaultServiceType];
|
||||
if (defaultServiceType === 'dicomWeb') {
|
||||
var serverInformationDicom = [];
|
||||
serviceInfo.forEach(function(endpoint) {
|
||||
var parsedUrl = parseUrl(endpoint.qidoRoot);
|
||||
serverInformationDicom.push({
|
||||
host: parsedUrl.hostname,
|
||||
port: parsedUrl.port,
|
||||
aeTitle: endpoint.name
|
||||
});
|
||||
});
|
||||
|
||||
return serverInformationDicom;
|
||||
}
|
||||
|
||||
return serviceInfo;
|
||||
}
|
||||
Template.serverInformationModal.onCreated(function() {
|
||||
var instance = Template.instance();
|
||||
instance.container = {
|
||||
mode: new ReactiveVar("list")
|
||||
};
|
||||
});
|
||||
Reference in new issue
Block a user