PWV-3: Creating ohif:log package and partially refactoring ohif:measurements
This commit is contained in:
1 parent
f3f32518c6
commit
60aa1d0982
76 files changed
+410
-479
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
/**
|
||||
* Retrieves metaData for multiple studies at once.
|
||||
*
|
||||
@@ -50,9 +52,9 @@ getStudiesMetadata = function(studyInstanceUids, doneCallback, failCallback) {
|
||||
doneCallback(studies);
|
||||
}
|
||||
}).fail(function(error) {
|
||||
log.warn(error);
|
||||
OHIF.log.warn(error);
|
||||
if (failCallback && typeof failCallback === 'function') {
|
||||
failCallback(error);
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
@@ -1,3 +1,5 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
// Define the StudyMetaData object. This is used as a cache
|
||||
// to store study meta data information to prevent unnecessary
|
||||
// calls to the server
|
||||
@@ -20,7 +22,7 @@ getStudyMetadata = function(studyInstanceUid, doneCallback, failCallback) {
|
||||
doneCallback(study);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
console.time('getStudyMetadata');
|
||||
|
||||
// If no study metadata is in the cache variable, we need to retrieve it from
|
||||
@@ -42,7 +44,7 @@ getStudyMetadata = function(studyInstanceUid, doneCallback, failCallback) {
|
||||
}
|
||||
|
||||
if (error) {
|
||||
log.warn(error);
|
||||
OHIF.log.warn(error);
|
||||
failCallback(error);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
/**
|
||||
* Imports selected studies from local into studylist
|
||||
* @param filesToImport Files located in the client machine to import
|
||||
@@ -44,7 +46,7 @@ importStudies = function(filesToImport, importCallback) {
|
||||
|
||||
if (fileUploadStatus.numberOfFilesFailed > 0) {
|
||||
//TODO: Some files failed to upload, so let user know
|
||||
log.info("Failed to upload " + fileUploadStatus.numberOfFilesFailed + " of " + numberOfFilesToUpload + " files");
|
||||
OHIF.log.info("Failed to upload " + fileUploadStatus.numberOfFilesFailed + " of " + numberOfFilesToUpload + " files");
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -128,4 +130,4 @@ function importStudiesInternal(studiesToImport, importCallback) {
|
||||
// Import studies with study import status id to get callbacks
|
||||
Meteor.call("importStudies", studiesToImport, studyImportStatusId);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
/**
|
||||
* Switches to a new tab in the tabbed studylist container
|
||||
* This function renders either the StudyList or the Viewer template with new data.
|
||||
@@ -9,7 +11,7 @@ switchToTab = function(contentId) {
|
||||
return;
|
||||
}
|
||||
|
||||
log.info('Switching to tab: ' + contentId);
|
||||
OHIF.log.info('Switching to tab: ' + contentId);
|
||||
|
||||
$('.tabTitle').removeClass('active');
|
||||
$('.tabTitle a[data-target="#' + contentId + '"]').addClass('active');
|
||||
@@ -78,7 +80,7 @@ switchToTab = function(contentId) {
|
||||
function viewStudiesInTab(contentId, studies) {
|
||||
// Tab closed while study data was being retrieved, stop here
|
||||
if (!ViewerData[contentId]) {
|
||||
log.warn('Tab closed while study data was being retrieved');
|
||||
OHIF.log.warn('Tab closed while study data was being retrieved');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user