Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pacs progress websockets #1258

Merged
merged 49 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5dc1248
Add LonkClient
jennydaman Sep 16, 2024
288aea3
Add new fp-ts PfdcmClient
jennydaman Sep 16, 2024
86e791c
Begin rewriting Pacs
jennydaman Sep 16, 2024
5991eda
Fix font styling conflict by antd App component
jennydaman Sep 17, 2024
0419bb7
Change LonkClient to accept handlers via init
jennydaman Sep 21, 2024
f71c38c
Merge staging (switch from npm to pnpm)
jennydaman Sep 21, 2024
c0556a5
Migrate .../Pacs/components/input.tsx to antd
jennydaman Sep 21, 2024
d2074e2
Merge remote-tracking branch 'upstream/staging' into pacs-progress-we…
jennydaman Sep 21, 2024
707d10e
LonkClient.unsubscribeAll
jennydaman Sep 21, 2024
0c5b27d
Merge staging #1249
jennydaman Sep 22, 2024
2a72864
Reorganize Pacs to be MVC-ish
jennydaman Sep 22, 2024
2ad8b55
Add helpers for testing components which use redux
jennydaman Sep 22, 2024
75ed5fa
Merge staging #1250
jennydaman Sep 22, 2024
5e3fd36
Implement PACS query
jennydaman Sep 22, 2024
6bc5f3e
Implement PACS study details
jennydaman Sep 23, 2024
8628407
Replace Radio.Group with Segmented
jennydaman Sep 23, 2024
7c530d5
Change Pacs studies to use Collapse instead of List
jennydaman Sep 23, 2024
e2cdc0e
Add AccessionNumber to study title
jennydaman Sep 23, 2024
66a0f0b
SeriesList
jennydaman Sep 23, 2024
a20b1d0
Merge remote-tracking branch 'upstream/staging' into pacs-progress-we…
jennydaman Sep 23, 2024
5b3a2c4
Remove redux from Pacs code
jennydaman Sep 23, 2024
c4a2b39
WIP
jennydaman Sep 24, 2024
5bb10d8
ReceiveState
jennydaman Sep 24, 2024
f3057a3
Fix pfdcm tests since removal of fp-ts monads
jennydaman Sep 24, 2024
02d7e39
useLonk
jennydaman Sep 24, 2024
1a66b2a
Rename things + more documentation
jennydaman Sep 24, 2024
e39a50a
Merge staging
jennydaman Sep 25, 2024
0811d4e
PACS pull is working, progress messages aren't though.
jennydaman Sep 25, 2024
76c5a75
Pull study works, except for the last part.
jennydaman Sep 25, 2024
ea6d7f1
Merge branch 'staging' into pacs-progress-websockets
jennydaman Sep 25, 2024
ad7fba4
Everything working! I think...
jennydaman Sep 26, 2024
a74ae25
Customize progress bar theme
jennydaman Sep 26, 2024
2df2851
Implement series pull
jennydaman Sep 26, 2024
e8ddeef
Fix crash on invalid StudyDate
jennydaman Sep 26, 2024
27db1fc
Add test stub
jennydaman Sep 26, 2024
9e4a713
Merge remote-tracking branch 'upstream/staging' into pacs-progress-we…
jennydaman Oct 9, 2024
37f0839
Hacky workaround for double firing of pull request
jennydaman Oct 9, 2024
08e5280
Revert "Hacky workaround for double firing of pull request"
jennydaman Oct 10, 2024
ef2cc3a
Small changes
jennydaman Oct 10, 2024
e174158
pnpm run fmt
jennydaman Oct 10, 2024
8e169bc
Change type of pullRequests from ReadonlyArray to PullRequestStates
jennydaman Oct 10, 2024
f7cf25a
terribleStrictModeWorkaround
jennydaman Oct 10, 2024
5e8505e
Fix all lints
jennydaman Oct 10, 2024
43d9fd0
Fix some pypx types
jennydaman Oct 10, 2024
d0d2bd0
Automatically expand if only one study found
jennydaman Oct 10, 2024
8a8aedb
Fix infinite useEffects calling lonk.subscribe
jennydaman Oct 11, 2024
c0001cd
Add tests
jennydaman Oct 11, 2024
4ede58b
Delete example.test.ts
jennydaman Oct 11, 2024
2ca5227
Make CUBE_POLL_INTERVAL_MS configurable via environment variable
jennydaman Oct 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ VITE_CHRIS_UI_AUTH_URL="http://localhost:8000/api/v1/auth-token/"
VITE_ALPHA_FEATURES='production'

# Set PFDCM_URL to the root url of the running pfdcm instance
VITE_PFDCM_URL="http://localhost:4005/"
# note: must *not* have trailing slash
VITE_PFDCM_URL="http://localhost:4005"

# (optional) set URL of an OHIF browser which has the same studies as the PFDCM
# VITE_OHIF_URL="http://localhost:8042/ohif/"
Expand All @@ -34,7 +35,13 @@ VITE_PFDCM_URL="http://localhost:4005/"
# VITE_ACKEE_SERVER="http://localhost:3050"
# VITE_ACKEE_DOMAIN_ID="lol-lol-lol"

# How often to poll CUBE, in milliseconds.
VITE_CUBE_POLL_INTERVAL_MS=2000

VITE_SOURCEMAP='false'

# URI for support requests
VITE_SUPPORT_URL='mailto:[email protected]'

# Set URL for the store if you want to see it in the sidebar
VITE_CHRIS_STORE_URL= "https://cube.chrisproject.org/api/v1/"
2 changes: 2 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ VITE_OHIF_URL="ea1cf042-73f0-43a1-93da-86ff93e5ac19"
VITE_ACKEE_SERVER="79a96963-2e17-405e-94bd-4f2433e5cce8"
VITE_ACKEE_DOMAIN_ID="e8fe722b-986c-4aaf-ba04-c10d21e4aca1"

VITE_CUBE_POLL_INTERVAL_MS="ca4bef0b-95c9-4a02-abda-590b51b9b07e"

VITE_ALPHA_FEATURES='production'

VITE_SOURCEMAP='false'
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,21 @@ npm run test:e2e:local # run tests using "local" backend
For more information, consult the wiki:
https://github.com/FNNDSC/ChRIS_ui/wiki/E2E-Testing-with-Playwright

## Pfdcm Client

The code in `src/api/pfdcm/generated` were automatically generated using the [OpenAPI generator](https://openapi-generator.tech).

```shell
docker run --rm --net=host -u "$(id -u):$(id -g)" \
-v "$(npm prefix)/src:/src" \
docker.io/openapitools/openapi-generator-cli:v7.8.0 \
generate -g typescript-fetch -i http://localhost:4005/openapi.json -o /src/api/pfdcm/generated
```

## Development Notes

- Do not use `ReadonlyArray` because it is not supported by `antd` prop types.

<!-- Image Links -->

[license-badge]: https://img.shields.io/github/license/fnndsc/chris_ui.svg
Expand Down
9 changes: 6 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"package.json",
"biome.json",
"*.config.ts",
"vitest.*.ts",
"tsconfig*.json",
"testing/*.mjs"
],
"ignore": ["package-lock.json"]
"ignore": ["package-lock.json", "pfdcm/generated"]
},
"organizeImports": {
"enabled": true
Expand All @@ -24,10 +25,12 @@
"rules": {
"recommended": true,
"style": {
"noNonNullAssertion": "off"
"noNonNullAssertion": "off",
"useTemplate": "off"
},
"complexity": {
"noForEach": "off"
"noForEach": "off",
"noUselessFragments": "off"
},
"correctness": {
"useExhaustiveDependencies": "warn"
Expand Down
2 changes: 2 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ find -type d -exec mkdir -p "$target/{}" \;

# set default values
CHRIS_STORE_URL="${CHRIS_STORE_URL-https://cube.chrisproject.org/api/v1/}"
CUBE_POLL_INTERVAL_MS="${CUBE_POLL_INTERVAL_MS-2000}"
# OHIF_URL, ACKEE_SERVER, ACKEE_DOMAIN_ID default values are empty

# required values
Expand All @@ -66,6 +67,7 @@ find -type f -exec sh -c "cat '{}' \
| sed 's#$VITE_OHIF_URL#$OHIF_URL#g' \
| sed 's#$VITE_ACKEE_SERVER#$ACKEE_SERVER#g' \
| sed 's#$VITE_ACKEE_DOMAIN_ID#$ACKEE_DOMAIN_ID#g' \
| sed 's#$VITE_CUBE_POLL_INTERVAL_MS#$CUBE_POLL_INTERVAL_MS#g' \
> $target/{}" \;

# run specified command
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"chrisomatic": "testing/chrisomatic.sh",
"get-dicoms": "./testing/getDicoms.mjs",
"list-mrns": "./testing/miniChRIS/scripts/list_mrns.sh",
"upload-dicom": "./testing/miniChRIS/scripts/upload2orthanc.sh",
"lint": "biome lint .",
"fix": "biome check --apply .",
"fix:unsafe": "biome check --apply-unsafe .",
Expand All @@ -37,6 +38,7 @@
"print-version": "node printVersion.js"
},
"dependencies": {
"@ant-design/icons": "^5.5.1",
"@cornerstonejs/core": "^1.84.4",
"@cornerstonejs/dicom-image-loader": "^1.84.4",
"@cornerstonejs/streaming-image-volume-loader": "^1.84.4",
Expand Down Expand Up @@ -91,6 +93,7 @@
"react-responsive": "^10.0.0",
"react-router": "^6.26.2",
"react-router-dom": "^6.26.2",
"react-use-websocket": "^4.8.1",
"redux-saga": "^1.3.0",
"rusha": "^0.8.14",
"sanitize-html": "^2.13.0",
Expand All @@ -106,6 +109,9 @@
"@faker-js/faker": "^9.0.1",
"@playwright/test": "^1.46.1",
"@redux-devtools/extension": "^3.3.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@types/d3-hierarchy": "3.1.7",
"@types/d3-selection": "3.0.10",
"@types/d3-shape": "^3.1.6",
Expand All @@ -125,8 +131,8 @@
"redux-logger": "4.0.0",
"vite": "5.4.6",
"vite-plugin-istanbul": "^6.0.2",
"vite-plugin-node-polyfills": "^0.22.0",
"vitest": "2.1.1"
"vitest": "^2.1.1",
"vitest-websocket-mock": "^0.4.0"
},
"type": "module",
"packageManager": "[email protected]+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b"
Expand Down
Loading