OHIF-172: Make default values for requestOptions object
This commit is contained in:
parent
1ed39e0d78
commit
131d64854c
@ -26,6 +26,7 @@ export const DICOMWebRequestOptions = new SimpleSchema({
|
||||
auth: {
|
||||
type: String,
|
||||
label: 'Authentication',
|
||||
defaultValue: 'orthanc:orthanc',
|
||||
optional: true
|
||||
},
|
||||
logRequests: {
|
||||
|
||||
@ -4,6 +4,31 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
import { Servers } from 'meteor/ohif:servers/both/collections';
|
||||
import { ServerConfiguration } from 'meteor/ohif:servers/both/schema/servers.js';
|
||||
|
||||
// Validate the servers configuration
|
||||
Meteor.startup(() => {
|
||||
// Save custom properties (if any)...
|
||||
// "Meteor.settings" and "Meteor.settings.public" are set by default...
|
||||
let custom = {
|
||||
private: Meteor.settings.custom,
|
||||
public: Meteor.settings.public.custom
|
||||
};
|
||||
|
||||
// ... and remove them to prevent clean up
|
||||
delete Meteor.settings.custom;
|
||||
delete Meteor.settings.public.custom;
|
||||
|
||||
ServerConfiguration.clean(Meteor.settings);
|
||||
|
||||
// TODO: Make the error messages more clear
|
||||
// Taking this out for now to prevent confusion.
|
||||
// check(Meteor.settings, ServerConfiguration);
|
||||
|
||||
Meteor.settings.custom = custom.private;
|
||||
Meteor.settings.public.custom = custom.public;
|
||||
|
||||
OHIF.log.info(JSON.stringify(Meteor.settings, null, 2));
|
||||
});
|
||||
|
||||
// Check the servers on meteor startup
|
||||
Meteor.startup(function() {
|
||||
OHIF.log.info('Updating servers information from JSON configuration');
|
||||
@ -34,28 +59,3 @@ Meteor.startup(function() {
|
||||
|
||||
OHIF.servers.control.resetCurrentServer();
|
||||
});
|
||||
|
||||
// Validate the servers configuration
|
||||
Meteor.startup(() => {
|
||||
// Save custom properties (if any)...
|
||||
// "Meteor.settings" and "Meteor.settings.public" are set by default...
|
||||
let custom = {
|
||||
private: Meteor.settings.custom,
|
||||
public: Meteor.settings.public.custom
|
||||
};
|
||||
|
||||
// ... and remove them to prevent clean up
|
||||
delete Meteor.settings.custom;
|
||||
delete Meteor.settings.public.custom;
|
||||
|
||||
ServerConfiguration.clean(Meteor.settings);
|
||||
|
||||
// TODO: Make the error messages more clear
|
||||
// Taking this out for now to prevent confusion.
|
||||
// check(Meteor.settings, ServerConfiguration);
|
||||
|
||||
Meteor.settings.custom = custom.private;
|
||||
Meteor.settings.public.custom = custom.public;
|
||||
|
||||
OHIF.log.info(JSON.stringify(Meteor.settings, null, 2));
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user