feat: Add Static WADO display (#2499)

* Rebased to have just the static view changes

* Changes based on the PR

* Couple more changes for the PR

* Removed an extraneous log

* Fix the study worklist display when returning to the page

* Added some documentation on the static wado data source setup, and a
bounds check change on the Queue test which was failing

* PR updates - change the undefined study description to '' and remove the aws deploy

* Fixed the e2e tests to actually pass/fail correctly on actual results
This commit is contained in:
Bill Wallace authored and Alireza committed 2021-08-24 17:53:03 -04:00
1 parent ca900f80e1
commit 2327b4ae12
21 files changed
+483 -41

No files matched your search

@@ -49,6 +49,7 @@ function DataSourceWrapper(props) {
total: 0,
resultsPerPage: 25,
pageNumber: 1,
location: 'Not a valid location, causes first load to occur',
});
const [isLoading, setIsLoading] = useState(false);
@@ -68,6 +69,7 @@ function DataSourceWrapper(props) {
total: studies.length,
resultsPerPage: queryFilterValues.resultsPerPage,
pageNumber: queryFilterValues.pageNumber,
location,
});
setIsLoading(false);
@@ -77,7 +79,6 @@ function DataSourceWrapper(props) {
// Cache invalidation :thinking:
// - Anytime change is not just next/previous page
// - And we didn't cross a result offset range
const isFirstLoad = data.studies.length === 0 && !isLoading;
const isSamePage = data.pageNumber === queryFilterValues.pageNumber;
const previousOffset =
Math.floor((data.pageNumber * data.resultsPerPage) / STUDIES_LIMIT) *
@@ -85,11 +86,12 @@ function DataSourceWrapper(props) {
const newOffset =
Math.floor(
(queryFilterValues.pageNumber * queryFilterValues.resultsPerPage) /
STUDIES_LIMIT
STUDIES_LIMIT
) *
(STUDIES_LIMIT - 1);
const isDataInvalid =
isFirstLoad || !isSamePage || newOffset !== previousOffset;
const isLocationUpdated = data.location !== location;
const isDataInvalid = !isSamePage || !isLoading &&
(newOffset !== previousOffset || isLocationUpdated);
if (isDataInvalid) {
getData();
+2 -2
View File
@@ -55,8 +55,8 @@ function Local() {
return acc.concat(mods)
}, [])
const fistLocalDataSource = localDataSources[0]
const dataSource = fistLocalDataSource.createDataSource({})
const firstLocalDataSource = localDataSources[0]
const dataSource = firstLocalDataSource.createDataSource({})
const onDrop = async (acceptedFiles) => {
const studies = await filesToStudies(acceptedFiles, dataSource)