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

feat: Datafiles configurable actions #1528

Merged
merged 17 commits into from
Jul 30, 2024
Merged

feat: Datafiles configurable actions #1528

merged 17 commits into from
Jul 30, 2024

Conversation

nitrosx
Copy link
Member

@nitrosx nitrosx commented Jul 17, 2024

Description

This PR is adding a configurable datafiles actions. Such actions can be configured through the config file and do not need any additional custom code. Actions can call any URL through a POST call and have a configurable label and icon.
This PR requires a change in the configuration for the FE as reported by the documentation. It also required an update of the BE as the FE configuration should be updated.

Motivation

Site admins have the need to configure and customize the datafiles actions to their IT infrastructure. For example, adding a button that produced a notebook ready to load the dataset and the selected files. This work is the first attempt to provide such functionality

Changes:

Please provide a list of the changes implemented by this PR

  • datasets/datafiles/datafiles*
  • datasets/datafiles-actions/datafiles*

Tests included

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)

Documentation

  • swagger documentation updated [required] --> NOT NEEDED
  • official documentation updated [nice-to-have]

official documentation info

If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included

Official documentation is present in md format in the file docs/configuration/datafiles-actions.md of this repository.

Backend version

  • Does it require a specific version of the backend
  • which version of the backend is required: Latest once BE PR #1346 is merged

@nitrosx nitrosx requested a review from Junjiequan July 17, 2024 16:01
@nitrosx nitrosx marked this pull request as ready for review July 23, 2024 13:14
@nitrosx
Copy link
Member Author

nitrosx commented Jul 24, 2024

Examples of the new setup
image
image

Copy link
Member

@Junjiequan Junjiequan left a comment

Choose a reason for hiding this comment

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

I have left few comments, would love to hear back your thoughts

src/assets/config.json Show resolved Hide resolved
@nitrosx nitrosx changed the title Datafiles configurable actions BREAKING CHANGE: Datafiles configurable actions Jul 29, 2024
@nitrosx nitrosx requested review from Junjiequan and bpedersen2 July 29, 2024 15:52
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
18.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@nitrosx nitrosx merged commit 831a5a8 into master Jul 30, 2024
6 of 7 checks passed
@nitrosx nitrosx deleted the datafiles-actions branch July 30, 2024 12:42
@Junjiequan Junjiequan changed the title BREAKING CHANGE: Datafiles configurable actions feat: Datafiles configurable actions Jul 30, 2024
}

//document.body.appendChild(form);
this.form.submit();
Copy link
Contributor

Choose a reason for hiding this comment

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

This gives "Form submission canceled because the form is not connected".

Probably a race between click an submit, which causes the form to disappear prematurely.

I suggest to switch to using a POST request directly (with either form-data-encoding or even better a json-encoded data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants