chore: Clean up unused files, imports, and work on getting end-to-end tests and unit tests running (#2272)
This commit is contained in:
1 parent
414ebc6850
commit
0db81b30f3
374 files changed
+14138
-21288
No files matched your search
@@ -241,19 +241,11 @@ export default function ModeRoute({
|
||||
dataSource,
|
||||
]);
|
||||
|
||||
const reducer = (state, action) => {
|
||||
console.log(state, action);
|
||||
};
|
||||
|
||||
return (
|
||||
<ImageViewerProvider
|
||||
initialState={{ StudyInstanceUIDs: StudyInstanceUIDsAsArray }}
|
||||
reducer={reducer}
|
||||
>
|
||||
<CombinedContextProvider>
|
||||
{/* TODO: extensionManager is already provided to the extension module.
|
||||
* Use it from there instead of passing as a prop here.
|
||||
*/}
|
||||
<DragAndDropProvider>
|
||||
<LayoutComponent
|
||||
{...layoutTemplateData.props}
|
||||
|
||||
@@ -27,6 +27,10 @@ import {
|
||||
UserPreferences,
|
||||
} from '@ohif/ui';
|
||||
|
||||
import i18n from '@ohif/i18n';
|
||||
|
||||
const { availableLanguages, defaultLanguage, currentLanguage } = i18n;
|
||||
|
||||
const seriesInStudiesMap = new Map();
|
||||
|
||||
/**
|
||||
@@ -328,7 +332,7 @@ function WorkList({
|
||||
{appConfig.modes.map((mode, i) => {
|
||||
const isFirst = i === 0;
|
||||
|
||||
// TODO: Homes need a default/target route? We mostly support a single one for now.
|
||||
// TODO: Modes need a default/target route? We mostly support a single one for now.
|
||||
// We should also be using the route path, but currently are not
|
||||
// mode.id
|
||||
// mode.routes[x].path
|
||||
@@ -384,8 +388,12 @@ function WorkList({
|
||||
),
|
||||
hotkeyDefinitions,
|
||||
onCancel: hide,
|
||||
onSubmit: ({ hotkeyDefinitions }) => {
|
||||
hotkeysManager.setHotkeys(hotkeyDefinitions);
|
||||
currentLanguage: currentLanguage(),
|
||||
availableLanguages,
|
||||
defaultLanguage,
|
||||
onSubmit: (state) => {
|
||||
i18n.changeLanguage(state.language.value);
|
||||
hotkeysManager.setHotkeys(state.hotkeyDefinitions);
|
||||
hide();
|
||||
},
|
||||
onReset: () => hotkeysManager.restoreDefaultBindings(),
|
||||
@@ -459,6 +467,18 @@ const defaultFilterValues = {
|
||||
resultsPerPage: 25,
|
||||
};
|
||||
|
||||
function _tryParseInt(str, defaultValue) {
|
||||
var retValue = defaultValue;
|
||||
if (str !== null) {
|
||||
if (str.length > 0) {
|
||||
if (!isNaN(str)) {
|
||||
retValue = parseInt(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
return retValue;
|
||||
}
|
||||
|
||||
function _getQueryFilterValues(query) {
|
||||
const queryFilterValues = {
|
||||
patientName: query.get('patientName'),
|
||||
@@ -484,18 +504,6 @@ function _getQueryFilterValues(query) {
|
||||
);
|
||||
|
||||
return queryFilterValues;
|
||||
|
||||
function _tryParseInt(str, defaultValue) {
|
||||
var retValue = defaultValue;
|
||||
if (str !== null) {
|
||||
if (str.length > 0) {
|
||||
if (!isNaN(str)) {
|
||||
retValue = parseInt(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
return retValue;
|
||||
}
|
||||
}
|
||||
|
||||
function _sortStringDates(s1, s2, sortModifier) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import ModeRoute from '@routes/Mode';
|
||||
import { ViewModelProvider } from '@ohif/core';
|
||||
|
||||
/*
|
||||
Routes uniquely define an entry point to:
|
||||
@@ -52,7 +51,6 @@ export default function buildModeRoutes({
|
||||
|
||||
// TODO move up.
|
||||
const component = ({ location }) => (
|
||||
<ViewModelProvider>
|
||||
<ModeRoute
|
||||
location={location}
|
||||
mode={mode}
|
||||
@@ -61,7 +59,6 @@ export default function buildModeRoutes({
|
||||
servicesManager={servicesManager}
|
||||
hotkeysManager={hotkeysManager}
|
||||
/>
|
||||
</ViewModelProvider>
|
||||
);
|
||||
|
||||
routes.push({
|
||||
@@ -78,7 +75,6 @@ export default function buildModeRoutes({
|
||||
|
||||
// TODO move up.
|
||||
const component = ({ location }) => (
|
||||
<ViewModelProvider>
|
||||
<ModeRoute
|
||||
location={location}
|
||||
mode={mode}
|
||||
@@ -87,7 +83,6 @@ export default function buildModeRoutes({
|
||||
servicesManager={servicesManager}
|
||||
hotkeysManager={hotkeysManager}
|
||||
/>
|
||||
</ViewModelProvider>
|
||||
);
|
||||
|
||||
routes.push({
|
||||
|
||||
Reference in new issue
Block a user