Skip to content

Updated NeLS Integration #2167

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
merged 186 commits into from
May 2, 2025
Merged

Updated NeLS Integration #2167

merged 186 commits into from
May 2, 2025

Conversation

stuzart
Copy link
Member

@stuzart stuzart commented Mar 12, 2025

No description provided.

aapaolaza and others added 30 commits December 13, 2021 10:47
Waiting on create dataset, upload metadata API support
waiting for info before finishing off
@stuzart stuzart requested a review from Copilot April 7, 2025 14:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 47 out of 50 changed files in this pull request and generated 1 comment.

Files not reviewed (3)
  • app/assets/javascripts/templates/nels/project.hbs: Language not supported
  • app/assets/stylesheets/application.css: Language not supported
  • app/assets/stylesheets/nels.css: Language not supported
Comments suppressed due to low confidence (1)

app/assets/javascripts/nels.js.erb:386

  • The file extension check compares an array (returned by slice(-1)) to a string, which will always fail. Use .pop() or index [0] (e.g. filepath.split('.').pop() == extension) to correctly compare the extension.
if (filepath.split('.').slice(-1) == extension) {

@stuzart stuzart marked this pull request as ready for review April 10, 2025 14:37
@stuzart stuzart requested a review from fbacall April 10, 2025 14:37
Comment on lines 60 to 62
rescue RuntimeError => e
flash[:error] = "Something went wrong interacting with NeLS, please try again later (#{e.class.name})"
end
Copy link
Contributor

Choose a reason for hiding this comment

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

This could end up rescuing a real SEEK exception, maybe better to create a nels exception superclass and rescue that.

stuzart added 7 commits April 22, 2025 15:21
exceptions related to Nels interaction are handled by before_resuce and respond with a relevant message to the user. Unexpected seek errors will raise an error and trigger an exception notifier.
@stuzart stuzart requested a review from Copilot April 28, 2025 16:13
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the NeLS integration by refactoring the views, controllers, and JavaScript to improve file uploads, downloads, and tree navigation. Key changes include updating the NeLS UI views (adding icons, modals, and better layout), revising REST client error handling and response logic in the controller, and enhancing the JavaScript tree navigation and file operations.

Reviewed Changes

Copilot reviewed 51 out of 52 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/views/nels/index.html.erb Updated layout and button tags with new JS asset usage
app/views/nels/datasets.json.jbuilder Added icon and metadata fields for datasets
app/views/nels/_upload*.html.erb Introduced modals for file and metadata uploading
app/controllers/nels_controller.rb Refactored action methods and error handling
app/assets/javascripts/nels.js.erb Revised NeLS tree navigation and file download/upload logic
Files not reviewed (1)
  • app/assets/javascripts/templates/nels/project.hbs: Language not supported


<div id="nels-browser">
<div class="row">
<%= button_link_to('Open in NeLS', 'nels_logo_small', Seek::Config.nels_sbi_url, options = {target: 'blank'}) %>
Copy link
Preview

Copilot AI Apr 28, 2025

Choose a reason for hiding this comment

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

The target attribute for external links should be '_blank' (with an underscore) rather than 'blank' to work correctly. Please update the target to '_blank'.

Suggested change
<%= button_link_to('Open in NeLS', 'nels_logo_small', Seek::Config.nels_sbi_url, options = {target: 'blank'}) %>
<%= button_link_to('Open in NeLS', 'nels_logo_small', Seek::Config.nels_sbi_url, options = {target: '_blank'}) %>

Copilot uses AI. Check for mistakes.

@stuzart stuzart requested a review from fbacall April 30, 2025 12:42
@stuzart stuzart moved this from In progress to In review in SEEK 1.17.x May 1, 2025
@stuzart stuzart merged commit 945c81b into main May 2, 2025
32 of 34 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in SEEK 1.17.x May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants