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

Fix Web UI Plugin Settings Files Not Handled Properly / Include PatientID in study view entries #680

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

tiberio-baptista
Copy link
Collaborator

@tiberio-baptista tiberio-baptista commented Nov 6, 2023

This PR fixes a broken feature of the web UI plugins' config files. Settings files are now properly loaded and provided to the respective web UI plugins.

Additionally, study entries in the UI will now have the associated Patient ID included, for additional context.

Description

Configurations for a web UI plugin have always been properly handled, so long as the files
(which must be named [WebUIPluginName].json, see package.json's name attribute) are stored in Plugins/settings. However, neither the Web UI servlet nor dicoogle-webcore.js do any effort to provide or handle the settings so that web UI plugins can access these.

This PR modifies the web UI servlet to include a new settings parameter, having the contents of the settings file, should it exist. Furthermore, the webcore was updated to include a new Settings field in registered plugins. This allows default webplugin classes to access this field by simply referring to their own attributes (i.e.: this.Settings) during the render(...) method.

@Enet4 Enet4 added the webapp label Nov 6, 2023
@Enet4 Enet4 self-requested a review November 6, 2023 15:09
@tiberio-baptista tiberio-baptista changed the title Fix Web UI Plugin Settings Files Not Handled Properly Fix Web UI Plugin Settings Files Not Handled Properly / Include PatientID in study view entries Nov 20, 2023
@@ -102,7 +102,8 @@ const StudyView = createReactClass({
uid: item.studyInstanceUID,
// deprecated data fields
"data-result-type": "study",
"data-result-uid": item.studyInstanceUID
"data-result-uid": item.studyInstanceUID,
"data-result-patientid": item.patientid
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this reasoning, maybe we should also provide more ID fields at the other levels?

@bastiao bastiao merged commit 03655ab into bioinformatics-ua:dev Dec 1, 2023
5 checks passed
@bastiao bastiao deleted the imp/plugin-settings-pass branch December 1, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants