-
Notifications
You must be signed in to change notification settings - Fork 6
1086 file UI component flag current files in datasets #1103
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
Merged
longshuicy
merged 10 commits into
main
from
1086-file-ui-component-flag-current-files-in-datasets
Jun 13, 2024
Merged
1086 file UI component flag current files in datasets #1103
longshuicy
merged 10 commits into
main
from
1086-file-ui-component-flag-current-files-in-datasets
Jun 13, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bdd7563 to
2b8ef0e
Compare
ddey2
approved these changes
Jun 12, 2024
Member
ddey2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
longshuicy
reviewed
Jun 12, 2024
frontend/src/components/styledComponents/ClowderFileSelector.jsx
Outdated
Show resolved
Hide resolved
longshuicy
reviewed
Jun 12, 2024
Member
longshuicy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
except minor suggestion everything else works well.
longshuicy
reviewed
Jun 12, 2024
longshuicy
approved these changes
Jun 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Aim
To create an option in the file component viewer to only see the files in the current dataset
Methodology
The difficulty behind the task is because the datasetID depends on which dataset the extractor is called from and therefore can not be hardcoded into the
extractor_infojson. In order to bypass, this we use the propertyuiSchema(that I have previously misunderstood) and"ui:options".uiSchema is actually used to format a given input and is dependent on the parameter name.
ui:optionsallows us to pass in the datasetID as a field. Since the uiSchema uses parameter names I use a for loop to iterate through the form's parameters and add to the uiSchemaThe rest of the changes are pretty straightforward. It involves passing in the datasetID and a flag to only show the dataset files or the entire filesystem.
How to test
Run an extractor, I used wordcount , locally as in to do the necessary modifications:
extractor-info.jsonfile, in theschemafield ofparameters, if using wordcount, you will have to add it hereWhen you open the extractor and open the fileselector, you should only see the current folders and files in the dataset

Re-run the extractor but tis time set the field "showOnlyDatasetFiles" to false or remove it
You should then see the complete clowder filesystem
