PWV-2: Change on ServerConfiguration logic to make it extensible
This commit is contained in:
parent
a30cfc95f9
commit
8aa8b4288c
@ -165,11 +165,6 @@ export const PublicServerConfig = new SimpleSchema({
|
|||||||
ui: {
|
ui: {
|
||||||
type: UISettings,
|
type: UISettings,
|
||||||
label: 'UI Settings'
|
label: 'UI Settings'
|
||||||
},
|
|
||||||
custom: {
|
|
||||||
type: Object,
|
|
||||||
label: 'Custom Settings',
|
|
||||||
optional: true
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
|
import { Meteor } from 'meteor/meteor';
|
||||||
import { Template } from 'meteor/templating';
|
import { Template } from 'meteor/templating';
|
||||||
import { ReactiveVar } from 'meteor/reactive-var';
|
import { ReactiveVar } from 'meteor/reactive-var';
|
||||||
import { Tracker } from 'meteor/tracker';
|
|
||||||
import { DICOMWebServer as dicomSchema } from 'meteor/ohif:study-list/both/schema/servers.js';
|
import { DICOMWebServer as dicomSchema } from 'meteor/ohif:study-list/both/schema/servers.js';
|
||||||
import { DIMSEServer as dimseSchema } from 'meteor/ohif:study-list/both/schema/servers.js';
|
import { DIMSEServer as dimseSchema } from 'meteor/ohif:study-list/both/schema/servers.js';
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,7 @@ Package.onUse(function(api) {
|
|||||||
// Our custom packages
|
// Our custom packages
|
||||||
api.use('design');
|
api.use('design');
|
||||||
api.use('ohif:core');
|
api.use('ohif:core');
|
||||||
|
api.use('ohif:log');
|
||||||
api.use('ohif:dicom-services');
|
api.use('ohif:dicom-services');
|
||||||
api.use('ohif:viewerbase');
|
api.use('ohif:viewerbase');
|
||||||
api.use('ohif:wadoproxy');
|
api.use('ohif:wadoproxy');
|
||||||
|
|||||||
@ -1,16 +1,29 @@
|
|||||||
import { Meteor } from 'meteor/meteor';
|
import { Meteor } from 'meteor/meteor';
|
||||||
import { check } from 'meteor/check';
|
// import { check } from 'meteor/check';
|
||||||
import { ServerConfiguration } from '../both/schema/servers.js';
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
|
import { ServerConfiguration } from 'meteor/ohif:study-list/both/schema/servers.js';
|
||||||
|
|
||||||
/*
|
|
||||||
-- Taking this out for now to prevent confusion.
|
|
||||||
|
|
||||||
TODO: Make the error messages more clear
|
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
console.log('------ Testing Meteor Settings ------');
|
// Save custom properties (if any)...
|
||||||
let config = ServerConfiguration.clean(Meteor.settings);
|
// "Meteor.settings" and "Meteor.settings.public" are set by default...
|
||||||
console.log(JSON.stringify(config, null, 2));
|
let custom = {
|
||||||
|
private: Meteor.settings.custom,
|
||||||
|
public: Meteor.settings.public.custom
|
||||||
|
};
|
||||||
|
|
||||||
Meteor.settings = config;
|
// ... and remove them to prevent clean up
|
||||||
check(config, ServerConfiguration);
|
delete Meteor.settings.custom;
|
||||||
});*/
|
delete Meteor.settings.public.custom;
|
||||||
|
|
||||||
|
ServerConfiguration.clean(Meteor.settings);
|
||||||
|
|
||||||
|
// TODO: Make the error messages more clear
|
||||||
|
// console.log('------ Testing Meteor Settings ------');
|
||||||
|
// 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