feat(log): add new log service
This commit is contained in:
parent
6480389778
commit
14d6454eaf
@ -12,3 +12,15 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.debug-report-modal-container .errors {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.debug-report-modal-container .errors-container {
|
||||||
|
border: 1px solid var(--active-color);
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
overflow: scroll;
|
||||||
|
max-height: 300px;
|
||||||
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ const DubugReportModal = ({
|
|||||||
extensionManager,
|
extensionManager,
|
||||||
mailTo,
|
mailTo,
|
||||||
debugModalMessage,
|
debugModalMessage,
|
||||||
|
errors = [],
|
||||||
}) => {
|
}) => {
|
||||||
const copyDebugDataToClipboard = () => {
|
const copyDebugDataToClipboard = () => {
|
||||||
const body = getEmailBody();
|
const body = getEmailBody();
|
||||||
@ -131,6 +132,19 @@ const DubugReportModal = ({
|
|||||||
{getLayout(viewports)}
|
{getLayout(viewports)}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="errors">
|
||||||
|
<h3>Errors ({errors.length})</h3>
|
||||||
|
<div className="errors-container">
|
||||||
|
{errors.map(error => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<pre>Message: {error.message}</pre>
|
||||||
|
{error.error && <pre>Stack: {error.error.stack}</pre>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
import OHIF from '@ohif/core';
|
import OHIF from '@ohif/core';
|
||||||
|
import { ToolbarButton, useLogger } from '@ohif/ui';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
save,
|
save,
|
||||||
upload,
|
upload,
|
||||||
@ -95,6 +97,7 @@ export function getCommands(context, servicesManager, extensionManager) {
|
|||||||
const { UIModalService } = servicesManager.services;
|
const { UIModalService } = servicesManager.services;
|
||||||
|
|
||||||
const WrappedDebugReportModal = function() {
|
const WrappedDebugReportModal = function() {
|
||||||
|
const { state } = useLogger();
|
||||||
return (
|
return (
|
||||||
<DebugReportModal
|
<DebugReportModal
|
||||||
viewports={viewports}
|
viewports={viewports}
|
||||||
@ -103,6 +106,7 @@ export function getCommands(context, servicesManager, extensionManager) {
|
|||||||
extensionManager={extensionManager}
|
extensionManager={extensionManager}
|
||||||
mailTo={state.mailTo}
|
mailTo={state.mailTo}
|
||||||
debugModalMessage={state.debugModalMessage}
|
debugModalMessage={state.debugModalMessage}
|
||||||
|
errors={state.errors}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -70,12 +70,18 @@ class DicomMicroscopyViewport extends Component {
|
|||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('[Microscopy Viewer] Failed to load:', error);
|
console.error('[Microscopy Viewer] Failed to load:', error);
|
||||||
const { UINotificationService } = this.props.servicesManager.services;
|
const {
|
||||||
|
UINotificationService,
|
||||||
|
LoggerService,
|
||||||
|
} = this.props.servicesManager.services;
|
||||||
if (UINotificationService) {
|
if (UINotificationService) {
|
||||||
|
const message =
|
||||||
|
'Failed to load viewport. Please check that you have hardware acceleration enabled.';
|
||||||
|
LoggerService.error({ error, message });
|
||||||
UINotificationService.show({
|
UINotificationService.show({
|
||||||
|
autoClose: false,
|
||||||
title: 'Microscopy Viewport',
|
title: 'Microscopy Viewport',
|
||||||
message:
|
message,
|
||||||
'Failed to load viewport. Please check that you have hardware acceleration enabled.',
|
|
||||||
type: 'error',
|
type: 'error',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,12 +25,13 @@ export default {
|
|||||||
return toolbarModule;
|
return toolbarModule;
|
||||||
},
|
},
|
||||||
getPanelModule({ commandsManager, api, servicesManager }) {
|
getPanelModule({ commandsManager, api, servicesManager }) {
|
||||||
const { UINotificationService } = servicesManager.services;
|
const { UINotificationService, LoggerService } = servicesManager.services;
|
||||||
|
|
||||||
const ExtendedSegmentationPanel = props => {
|
const ExtendedSegmentationPanel = props => {
|
||||||
const { activeContexts } = api.hooks.useAppContext();
|
const { activeContexts } = api.hooks.useAppContext();
|
||||||
|
|
||||||
const onDisplaySetLoadFailureHandler = error => {
|
const onDisplaySetLoadFailureHandler = error => {
|
||||||
|
LoggerService.error({ error, message: error.message });
|
||||||
UINotificationService.show({
|
UINotificationService.show({
|
||||||
title: 'DICOM Segmentation Loader',
|
title: 'DICOM Segmentation Loader',
|
||||||
message: error.message,
|
message: error.message,
|
||||||
|
|||||||
@ -360,12 +360,15 @@ class OHIFVTKViewport extends Component {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
const errorTitle = 'Failed to load 2D MPR';
|
const errorTitle = 'Failed to load 2D MPR';
|
||||||
console.error(errorTitle, error);
|
console.error(errorTitle, error);
|
||||||
const { UINotificationService } = this.props.servicesManager.services;
|
const {
|
||||||
|
UINotificationService,
|
||||||
|
LoggerService,
|
||||||
|
} = this.props.servicesManager.services;
|
||||||
if (this.props.viewportIndex === 0) {
|
if (this.props.viewportIndex === 0) {
|
||||||
const message = error.message.includes('buffer')
|
const message = error.message.includes('buffer')
|
||||||
? 'Dataset is too big to display in MPR'
|
? 'Dataset is too big to display in MPR'
|
||||||
: error.message;
|
: error.message;
|
||||||
console.error(errorTitle, error);
|
LoggerService.error({ error, message });
|
||||||
UINotificationService.show({
|
UINotificationService.show({
|
||||||
title: errorTitle,
|
title: errorTitle,
|
||||||
message,
|
message,
|
||||||
@ -428,11 +431,15 @@ class OHIFVTKViewport extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onPixelDataInsertedErrorCallback = error => {
|
const onPixelDataInsertedErrorCallback = error => {
|
||||||
const { UINotificationService } = this.props.servicesManager.services;
|
const {
|
||||||
|
UINotificationService,
|
||||||
|
LoggerService,
|
||||||
|
} = this.props.servicesManager.services;
|
||||||
|
|
||||||
if (!this.hasError) {
|
if (!this.hasError) {
|
||||||
if (this.props.viewportIndex === 0) {
|
if (this.props.viewportIndex === 0) {
|
||||||
// Only show the notification from one viewport 1 in MPR2D.
|
// Only show the notification from one viewport 1 in MPR2D.
|
||||||
|
LoggerService.error({ error, message: error.message });
|
||||||
UINotificationService.show({
|
UINotificationService.show({
|
||||||
title: 'MPR Load Error',
|
title: 'MPR Load Error',
|
||||||
message: error.message,
|
message: error.message,
|
||||||
|
|||||||
@ -14,7 +14,9 @@ import OHIFVTKViewport from './OHIFVTKViewport';
|
|||||||
|
|
||||||
const { BlendMode } = Constants;
|
const { BlendMode } = Constants;
|
||||||
|
|
||||||
const commandsModule = ({ commandsManager, UINotificationService }) => {
|
const commandsModule = ({ commandsManager, servicesManager }) => {
|
||||||
|
const { UINotificationService, LoggerService } = servicesManager.services;
|
||||||
|
|
||||||
// TODO: Put this somewhere else
|
// TODO: Put this somewhere else
|
||||||
let apis = {};
|
let apis = {};
|
||||||
let defaultVOI;
|
let defaultVOI;
|
||||||
@ -175,7 +177,7 @@ const commandsModule = ({ commandsManager, UINotificationService }) => {
|
|||||||
segmentNumber,
|
segmentNumber,
|
||||||
frameIndex,
|
frameIndex,
|
||||||
frame,
|
frame,
|
||||||
done = () => { },
|
done = () => {},
|
||||||
}) => {
|
}) => {
|
||||||
let api = apis[viewports.activeViewportIndex];
|
let api = apis[viewports.activeViewportIndex];
|
||||||
|
|
||||||
@ -473,10 +475,12 @@ const commandsModule = ({ commandsManager, UINotificationService }) => {
|
|||||||
const volumeLength = dimensions[0] * dimensions[1] * dimensions[2];
|
const volumeLength = dimensions[0] * dimensions[1] * dimensions[2];
|
||||||
|
|
||||||
if (volumeLength > maxBufferLengthFloat32) {
|
if (volumeLength > maxBufferLengthFloat32) {
|
||||||
|
const message =
|
||||||
|
'This volume is too large to fit in WebGL 1 textures and will display incorrectly. Please use a different browser to view this data';
|
||||||
|
LoggerService.error({ message });
|
||||||
UINotificationService.show({
|
UINotificationService.show({
|
||||||
title: 'Browser does not support WebGL 2',
|
title: 'Browser does not support WebGL 2',
|
||||||
message:
|
message,
|
||||||
'This volume is too large to fit in WebGL 1 textures and will display incorrectly. Please use a different browser to view this data',
|
|
||||||
type: 'error',
|
type: 'error',
|
||||||
autoClose: false,
|
autoClose: false,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -35,8 +35,7 @@ const vtkExtension = {
|
|||||||
return toolbarModule;
|
return toolbarModule;
|
||||||
},
|
},
|
||||||
getCommandsModule({ commandsManager, servicesManager }) {
|
getCommandsModule({ commandsManager, servicesManager }) {
|
||||||
const { UINotificationService } = servicesManager.services;
|
return commandsModule({ commandsManager, servicesManager });
|
||||||
return commandsModule({ commandsManager, UINotificationService });
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -63,10 +63,15 @@ export class HotkeysManager {
|
|||||||
|
|
||||||
definitions.forEach(definition => this.registerHotkeys(definition));
|
definitions.forEach(definition => this.registerHotkeys(definition));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const { UINotificationService } = this._servicesManager.services;
|
const {
|
||||||
|
UINotificationService,
|
||||||
|
LoggerService,
|
||||||
|
} = this._servicesManager.services;
|
||||||
|
const message = 'Erro while setting hotkeys';
|
||||||
|
LoggerService.error({ error, message });
|
||||||
UINotificationService.show({
|
UINotificationService.show({
|
||||||
title: 'Hotkeys Manager',
|
title: 'Hotkeys Manager',
|
||||||
message: 'Erro while setting hotkeys',
|
message,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,7 @@ import {
|
|||||||
UIModalService,
|
UIModalService,
|
||||||
UIDialogService,
|
UIDialogService,
|
||||||
MeasurementService,
|
MeasurementService,
|
||||||
|
LoggerService,
|
||||||
} from './services';
|
} from './services';
|
||||||
|
|
||||||
const OHIF = {
|
const OHIF = {
|
||||||
@ -60,6 +61,7 @@ const OHIF = {
|
|||||||
UIModalService,
|
UIModalService,
|
||||||
UIDialogService,
|
UIDialogService,
|
||||||
MeasurementService,
|
MeasurementService,
|
||||||
|
LoggerService,
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@ -93,6 +95,7 @@ export {
|
|||||||
UIModalService,
|
UIModalService,
|
||||||
UIDialogService,
|
UIDialogService,
|
||||||
MeasurementService,
|
MeasurementService,
|
||||||
|
LoggerService,
|
||||||
};
|
};
|
||||||
|
|
||||||
export { OHIF };
|
export { OHIF };
|
||||||
|
|||||||
67
platform/core/src/services/LoggerService/index.js
Normal file
67
platform/core/src/services/LoggerService/index.js
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
const name = 'LoggerService';
|
||||||
|
|
||||||
|
const publicAPI = {
|
||||||
|
name,
|
||||||
|
info: _info,
|
||||||
|
error: _error,
|
||||||
|
setServiceImplementation,
|
||||||
|
};
|
||||||
|
|
||||||
|
const serviceImplementation = {
|
||||||
|
_info: () => console.warn('info() NOT IMPLEMENTED'),
|
||||||
|
_error: () => console.warn('error() NOT IMPLEMENTED'),
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs an info
|
||||||
|
*
|
||||||
|
* @param {object} props { message, displayOnConsole }
|
||||||
|
*/
|
||||||
|
function _info({ message, displayOnConsole }) {
|
||||||
|
return serviceImplementation._info({
|
||||||
|
message,
|
||||||
|
displayOnConsole,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs an error
|
||||||
|
*
|
||||||
|
* @param {object} props { error, stack, message, displayOnConsole }
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
function _error({ error, stack, message, displayOnConsole }) {
|
||||||
|
return serviceImplementation._error({
|
||||||
|
error,
|
||||||
|
stack,
|
||||||
|
message,
|
||||||
|
displayOnConsole,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param {*} {
|
||||||
|
* info: infoImplementation,
|
||||||
|
* error: errorImplementation,
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
function setServiceImplementation({
|
||||||
|
info: infoImplementation,
|
||||||
|
error: errorImplementation,
|
||||||
|
}) {
|
||||||
|
if (infoImplementation) {
|
||||||
|
serviceImplementation._info = infoImplementation;
|
||||||
|
}
|
||||||
|
if (errorImplementation) {
|
||||||
|
serviceImplementation._error = errorImplementation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name,
|
||||||
|
create: ({ configuration = {} }) => {
|
||||||
|
return publicAPI;
|
||||||
|
},
|
||||||
|
};
|
||||||
@ -3,6 +3,7 @@ import UINotificationService from './UINotificationService';
|
|||||||
import UIModalService from './UIModalService';
|
import UIModalService from './UIModalService';
|
||||||
import UIDialogService from './UIDialogService';
|
import UIDialogService from './UIDialogService';
|
||||||
import MeasurementService from './MeasurementService';
|
import MeasurementService from './MeasurementService';
|
||||||
|
import LoggerService from './LoggerService';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
UINotificationService,
|
UINotificationService,
|
||||||
@ -10,4 +11,5 @@ export {
|
|||||||
UIDialogService,
|
UIDialogService,
|
||||||
ServicesManager,
|
ServicesManager,
|
||||||
MeasurementService,
|
MeasurementService,
|
||||||
|
LoggerService,
|
||||||
};
|
};
|
||||||
|
|||||||
94
platform/ui/src/contextProviders/LoggerProvider.js
Normal file
94
platform/ui/src/contextProviders/LoggerProvider.js
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
import React, { useState, createContext, useContext, useEffect } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
|
const LoggerContext = createContext(null);
|
||||||
|
const { Provider } = LoggerContext;
|
||||||
|
|
||||||
|
export const useLogger = () => useContext(LoggerContext);
|
||||||
|
|
||||||
|
const LoggerProvider = ({ children, service }) => {
|
||||||
|
const [state, setState] = useState({
|
||||||
|
errors: [],
|
||||||
|
infos: [],
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs an error
|
||||||
|
*
|
||||||
|
* @param {object} props { error, stack, message, displayOnConsole }
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
const error = ({
|
||||||
|
error = {},
|
||||||
|
stack = '',
|
||||||
|
message = '',
|
||||||
|
displayOnConsole = true,
|
||||||
|
}) => {
|
||||||
|
const errorObject = { error, stack, message, displayOnConsole };
|
||||||
|
setState(state => ({ ...state, errors: [...state.errors, errorObject] }));
|
||||||
|
|
||||||
|
if (displayOnConsole) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logs an info
|
||||||
|
*
|
||||||
|
* @param {object} props { message, displayOnConsole }
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
const info = ({ message = '', displayOnConsole = true }) => {
|
||||||
|
setState(state => ({
|
||||||
|
...state,
|
||||||
|
infos: state.infos.push({ message, displayOnConsole }),
|
||||||
|
}));
|
||||||
|
|
||||||
|
if (displayOnConsole) {
|
||||||
|
console.info(message);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the implementation of a log service that can be used by extensions.
|
||||||
|
*
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
useEffect(() => {
|
||||||
|
if (service) {
|
||||||
|
service.setServiceImplementation({ error, info });
|
||||||
|
}
|
||||||
|
}, [error, service, info]);
|
||||||
|
|
||||||
|
return <Provider value={{ info, error, state }}>{children}</Provider>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Higher Order Component to use the log methods through a Class Component.
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const withLogger = Component => {
|
||||||
|
return function WrappedComponent(props) {
|
||||||
|
const { error, info, state } = useLogger();
|
||||||
|
return <Component {...props} logger={{ error, info, state }} />;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
LoggerProvider.defaultProps = {
|
||||||
|
service: null,
|
||||||
|
};
|
||||||
|
|
||||||
|
LoggerProvider.propTypes = {
|
||||||
|
children: PropTypes.oneOfType([
|
||||||
|
PropTypes.arrayOf(PropTypes.node),
|
||||||
|
PropTypes.node,
|
||||||
|
]).isRequired,
|
||||||
|
service: PropTypes.shape({
|
||||||
|
setServiceImplementation: PropTypes.func,
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
|
||||||
|
export default LoggerProvider;
|
||||||
|
|
||||||
|
export const LogConsumer = LoggerContext.Consumer;
|
||||||
@ -18,3 +18,8 @@ export {
|
|||||||
withDialog,
|
withDialog,
|
||||||
useDialog,
|
useDialog,
|
||||||
} from './DialogProvider.js';
|
} from './DialogProvider.js';
|
||||||
|
export {
|
||||||
|
default as LoggerProvider,
|
||||||
|
withLogger,
|
||||||
|
useLogger,
|
||||||
|
} from './LoggerProvider.js';
|
||||||
|
|||||||
@ -30,7 +30,7 @@ import {
|
|||||||
AboutContent,
|
AboutContent,
|
||||||
OHIFModal,
|
OHIFModal,
|
||||||
ErrorBoundary,
|
ErrorBoundary,
|
||||||
ErrorPage
|
ErrorPage,
|
||||||
} from './components';
|
} from './components';
|
||||||
import { useDebounce, useMedia } from './hooks';
|
import { useDebounce, useMedia } from './hooks';
|
||||||
|
|
||||||
@ -66,6 +66,9 @@ import {
|
|||||||
ModalConsumer,
|
ModalConsumer,
|
||||||
useModal,
|
useModal,
|
||||||
withModal,
|
withModal,
|
||||||
|
LoggerProvider,
|
||||||
|
withLogger,
|
||||||
|
useLogger,
|
||||||
} from './contextProviders';
|
} from './contextProviders';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@ -127,11 +130,14 @@ export {
|
|||||||
useDialog,
|
useDialog,
|
||||||
ErrorBoundary,
|
ErrorBoundary,
|
||||||
ErrorPage,
|
ErrorPage,
|
||||||
|
LoggerProvider,
|
||||||
|
withLogger,
|
||||||
|
useLogger,
|
||||||
// Hooks
|
// Hooks
|
||||||
useDebounce,
|
useDebounce,
|
||||||
useMedia,
|
useMedia,
|
||||||
// Utils
|
// Utils
|
||||||
ViewerbaseDragDropContext,
|
ViewerbaseDragDropContext,
|
||||||
asyncComponent,
|
asyncComponent,
|
||||||
retryImport
|
retryImport,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import {
|
|||||||
ModalProvider,
|
ModalProvider,
|
||||||
DialogProvider,
|
DialogProvider,
|
||||||
OHIFModal,
|
OHIFModal,
|
||||||
|
LoggerProvider,
|
||||||
ErrorBoundary,
|
ErrorBoundary,
|
||||||
} from '@ohif/ui';
|
} from '@ohif/ui';
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ import {
|
|||||||
UINotificationService,
|
UINotificationService,
|
||||||
UIModalService,
|
UIModalService,
|
||||||
UIDialogService,
|
UIDialogService,
|
||||||
|
LoggerService,
|
||||||
MeasurementService,
|
MeasurementService,
|
||||||
utils,
|
utils,
|
||||||
redux as reduxOHIF,
|
redux as reduxOHIF,
|
||||||
@ -141,6 +143,7 @@ class App extends Component {
|
|||||||
UIModalService,
|
UIModalService,
|
||||||
UIDialogService,
|
UIDialogService,
|
||||||
MeasurementService,
|
MeasurementService,
|
||||||
|
LoggerService,
|
||||||
]);
|
]);
|
||||||
_initExtensions(
|
_initExtensions(
|
||||||
[...defaultExtensions, ...extensions],
|
[...defaultExtensions, ...extensions],
|
||||||
@ -164,6 +167,7 @@ class App extends Component {
|
|||||||
UIDialogService,
|
UIDialogService,
|
||||||
UIModalService,
|
UIModalService,
|
||||||
MeasurementService,
|
MeasurementService,
|
||||||
|
LoggerService,
|
||||||
} = servicesManager.services;
|
} = servicesManager.services;
|
||||||
|
|
||||||
if (this._userManager) {
|
if (this._userManager) {
|
||||||
@ -176,18 +180,20 @@ class App extends Component {
|
|||||||
<UserManagerContext.Provider value={this._userManager}>
|
<UserManagerContext.Provider value={this._userManager}>
|
||||||
<Router basename={routerBasename}>
|
<Router basename={routerBasename}>
|
||||||
<WhiteLabelingContext.Provider value={whiteLabeling}>
|
<WhiteLabelingContext.Provider value={whiteLabeling}>
|
||||||
<SnackbarProvider service={UINotificationService}>
|
<LoggerProvider service={LoggerService}>
|
||||||
<DialogProvider service={UIDialogService}>
|
<SnackbarProvider service={UINotificationService}>
|
||||||
<ModalProvider
|
<DialogProvider service={UIDialogService}>
|
||||||
modal={OHIFModal}
|
<ModalProvider
|
||||||
service={UIModalService}
|
modal={OHIFModal}
|
||||||
>
|
service={UIModalService}
|
||||||
<OHIFStandaloneViewer
|
>
|
||||||
userManager={this._userManager}
|
<OHIFStandaloneViewer
|
||||||
/>
|
userManager={this._userManager}
|
||||||
</ModalProvider>
|
/>
|
||||||
</DialogProvider>
|
</ModalProvider>
|
||||||
</SnackbarProvider>
|
</DialogProvider>
|
||||||
|
</SnackbarProvider>
|
||||||
|
</LoggerProvider>
|
||||||
</WhiteLabelingContext.Provider>
|
</WhiteLabelingContext.Provider>
|
||||||
</Router>
|
</Router>
|
||||||
</UserManagerContext.Provider>
|
</UserManagerContext.Provider>
|
||||||
@ -206,13 +212,18 @@ class App extends Component {
|
|||||||
<I18nextProvider i18n={i18n}>
|
<I18nextProvider i18n={i18n}>
|
||||||
<Router basename={routerBasename}>
|
<Router basename={routerBasename}>
|
||||||
<WhiteLabelingContext.Provider value={whiteLabeling}>
|
<WhiteLabelingContext.Provider value={whiteLabeling}>
|
||||||
<SnackbarProvider service={UINotificationService}>
|
<LoggerProvider service={LoggerService}>
|
||||||
<DialogProvider service={UIDialogService}>
|
<SnackbarProvider service={UINotificationService}>
|
||||||
<ModalProvider modal={OHIFModal} service={UIModalService}>
|
<DialogProvider service={UIDialogService}>
|
||||||
<OHIFStandaloneViewer />
|
<ModalProvider
|
||||||
</ModalProvider>
|
modal={OHIFModal}
|
||||||
</DialogProvider>
|
service={UIModalService}
|
||||||
</SnackbarProvider>
|
>
|
||||||
|
<OHIFStandaloneViewer />
|
||||||
|
</ModalProvider>
|
||||||
|
</DialogProvider>
|
||||||
|
</SnackbarProvider>
|
||||||
|
</LoggerProvider>
|
||||||
</WhiteLabelingContext.Provider>
|
</WhiteLabelingContext.Provider>
|
||||||
</Router>
|
</Router>
|
||||||
</I18nextProvider>
|
</I18nextProvider>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user