feat(STOW-RS) Save DICOM Structured Reports from Measurement Table back to archive (#236)

* Small refactor into Table Class setting events as static object into class

* feature(STOW-SR) : Initial changes to stow when we have Server.

* Improvements into requests and small fix into style

* Small fix for jumpToRow without refheshing page

* Handling STOW-SR once we don't have server

* feature(STOW-SR) Refactor

* Merge request with makeRequest and delete old file

* Expose wadoproxy to client and update measurement-table to start using wadoproxy.getServerUrl

* Move WADOProxy.getServerUrl to Measurement-table package. Fix querystring issue.

* Remove proxy:enabled in favour of requestOptions.requestFromBrowser

* Bcrypt 2.0.0 to fix Travis
This commit is contained in:
Gustavo André Lelis authored and Erik Ziegler committed 2018-07-31 15:01:26 +02:00
1 parent 13e4dc25e1
commit 26b14f1dab
26 files changed
+1079 -179

No files matched your search

@@ -0,0 +1,18 @@
import queryString from 'query-string';
WADOProxy.convertURL = (url, serverConfiguration) => {
if (!url) {
return null;
}
if (serverConfiguration.requestOptions &&
serverConfiguration.requestOptions.requestFromBrowser === true) {
return url;
}
const { settings } = WADOProxy;
const serverId = serverConfiguration._id;
const query = queryString.stringify({url, serverId});
return `${settings.uri}?${query}`;
}
@@ -1,7 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { OHIF } from 'meteor/ohif:core';
Settings = Object.assign({
WADOProxy.settings = Object.assign({
uri : OHIF.utils.absoluteUrl("/__wado_proxy"),
enabled: true
}, (Meteor.settings && Meteor.settings.proxy) ? Meteor.settings.proxy : {});
}, (Meteor.settings && Meteor.settings.proxy) ? Meteor.settings.proxy : {});
+1
View File
@@ -0,0 +1 @@
WADOProxy = {};
+5 -5
View File
@@ -5,6 +5,7 @@ Package.describe({
});
Npm.depends({
'query-string': '5.1.1',
'performance-now': '2.1.0'
});
@@ -12,17 +13,16 @@ Package.onUse(function(api) {
api.versionsFrom('1.4');
api.use('ecmascript');
api.use('standard-app-packages');
api.use('clinical:router@2.0.19');
api.use('ohif:core');
api.use('ohif:servers');
api.addFiles('server/namespace.js', 'server');
api.addFiles('server/initialize.js', 'server');
api.addFiles('both/namespace.js', ['client', 'server']);
api.addFiles('both/convertURL.js', ['client', 'server']);
api.addFiles('both/initialize.js', ['client', 'server']);
api.addFiles('server/routes.js', 'server');
api.addFiles('server/convertURL.js', 'server');
// Global exports
api.export('WADOProxy');
});
@@ -1,15 +0,0 @@
const querystring = require("querystring");
WADOProxy.convertURL = (url, serverConfiguration) => {
if (!Settings.enabled) {
return url;
}
if (!url) {
return null;
}
const serverId = serverConfiguration._id;
const query = querystring.stringify({url, serverId});
return `${Settings.uri}?${query}`;
}
@@ -1 +0,0 @@
WADOProxy = {};
+1 -1
View File
@@ -170,4 +170,4 @@ const handleRequest = function() {
// Setup a Route using Iron Router to avoid Cross-origin resource sharing
// (CORS) errors. We only handle this route on the Server.
Router.route(Settings.uri.replace(OHIF.utils.absoluteUrl(), ''), handleRequest, { where: 'server' });
Router.route(WADOProxy.settings.uri.replace(OHIF.utils.absoluteUrl(), ''), handleRequest, { where: 'server' });