[IDC-1939] Debug Dialog part 1 (#2011)

* WIP debug dialog

* Rename the p10 downloader extension to debugger extension, add button to toolbar. Deactivate it by default.

* Fix unit tests
This commit is contained in:
James Petts authored and GitHub committed 2020-09-03 12:58:04 +02:00
1 parent 6a37a2a661
commit a1dee16a3d
29 files changed
+272 -19

No files matched your search

@@ -5,6 +5,7 @@ export default class ExtensionManager {
constructor({ commandsManager, servicesManager, api, appConfig = {} }) {
this.modules = {};
this.registeredExtensionIds = [];
this.registeredExtensionVesions = {};
this.moduleTypeNames = Object.values(MODULE_TYPES);
//
this._commandsManager = commandsManager;
@@ -51,6 +52,7 @@ export default class ExtensionManager {
}
let extensionId = extension.id;
const version = extension.version;
if (!extensionId) {
extensionId = Math.random()
@@ -98,6 +100,8 @@ export default class ExtensionManager {
// Track extension registration
this.registeredExtensionIds.push(extensionId);
this.registeredExtensionVesions[extensionId] = version;
}
/**
@@ -120,7 +124,8 @@ export default class ExtensionManager {
commandsManager: this._commandsManager,
appConfig: this._appConfig,
configuration,
api: this._api
api: this._api,
extensionManager: this,
});
if (!extensionModule) {
@@ -184,6 +184,8 @@ describe('ExtensionManager.js', () => {
commandsManager,
appConfig,
configuration: extensionConfiguration,
api: undefined,
extensionManager,
});
}
});
@@ -226,7 +228,7 @@ describe('ExtensionManager.js', () => {
return {
definitions: {
exampleDefinition: {
commandFn: () => { },
commandFn: () => {},
storeContexts: [],
options: {},
},
@@ -9,7 +9,7 @@ services:
max-size: '10m'
ports:
- '389:389'
env_file: ./dcm4che/docker-compose-dcm4che.env
env_file: ./docker-compose-dcm4che.env
volumes:
- ./dcm4che/etc/localtime:/etc/localtime:ro
- ./dcm4che/etc/timezone:/etc/timezone:ro
@@ -25,7 +25,7 @@ services:
max-size: '10m'
ports:
- '5432:5432'
env_file: ./dcm4che/docker-compose-dcm4che.env
env_file: ./docker-compose-dcm4che.env
volumes:
- ./dcm4che/etc/localtime:/etc/localtime:ro
- ./dcm4che/etc/timezone:/etc/timezone:ro
@@ -44,7 +44,7 @@ services:
- '9990:9990'
- '11112:11112'
- '2575:2575'
env_file: ./dcm4che/docker-compose-dcm4che.env
env_file: ./docker-compose-dcm4che.env
environment:
WILDFLY_CHOWN: /opt/wildfly/standalone /storage
WILDFLY_WAIT_FOR: ldap:389 db:5432
@@ -73,5 +73,4 @@ services:
restart: always
networks:
- dcm4che_default
networks: dcm4che_default:
networks: dcm4che_default:
+1 -1
View File
@@ -48,11 +48,11 @@
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"@ohif/extension-debugging": "^0.1.2",
"@ohif/core": "^2.10.2",
"@ohif/extension-cornerstone": "^2.9.3",
"@ohif/extension-dicom-html": "^1.2.6",
"@ohif/extension-dicom-microscopy": "^0.51.1",
"@ohif/extension-dicom-p10-downloader": "^0.1.2",
"@ohif/extension-dicom-pdf": "^1.0.4",
"@ohif/extension-dicom-rt": "^0.4.2",
"@ohif/extension-dicom-segmentation": "^0.4.2",
@@ -2,6 +2,9 @@ import commandsModule from './commandsModule.js';
export default {
id: 'generic-viewer-commands',
get version() {
return window.version;
},
getCommandsModule({ commandsManager }) {
return commandsModule({ commandsManager });
},
@@ -9,6 +9,9 @@ export default {
* Only required property. Should be a unique value across all extensions.
*/
id: 'measurements-table',
get version() {
return window.version;
},
preRegistration({ servicesManager, commandsManager, configuration = {} }) {
init({ servicesManager, commandsManager, configuration });
+6 -2
View File
@@ -29,7 +29,9 @@ import OHIFDicomSegmentationExtension from '@ohif/extension-dicom-segmentation';
import OHIFDicomRtExtension from '@ohif/extension-dicom-rt';
import OHIFDicomMicroscopyExtension from '@ohif/extension-dicom-microscopy';
import OHIFDicomPDFExtension from '@ohif/extension-dicom-pdf';
import OHIFDicomP10DownloaderExtension from '@ohif/extension-dicom-p10-downloader';
// Add this for Debugging purposes:
//import OHIFDebuggingExtension from '@ohif/extension-debugging';
import { version } from '../package.json';
/*
* Default Settings
@@ -38,6 +40,8 @@ let config = {};
if (window) {
config = window.config || {};
window.version = version;
}
const appProps = {
@@ -49,7 +53,7 @@ const appProps = {
OHIFDicomPDFExtension,
OHIFDicomSegmentationExtension,
OHIFDicomRtExtension,
OHIFDicomP10DownloaderExtension,
//OHIFDebuggingExtension,
],
};