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

Use back-end upload if NML is dragged into a read-only view #4459

Merged
merged 6 commits into from
Mar 9, 2020

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Mar 2, 2020

URL of deployed dev instance (used for testing):

Steps to test:

  • Open a dataset in view mode (or a tracing of another use)
  • drag an NML file into the tracing view
  • click "create new tracing" in the imprt modal
  • webKnossos should reload and show a new tracing with the imported NML

Issues:


@philippotto philippotto self-assigned this Mar 2, 2020
Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

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

Code looks very good, nicely done!

However, during testing I immediately ran into the two problems:

  1. .proto files cannot be uploaded in the backend
  2. a message that the dataset cannot be found by the backend

I understand that these are limitations of the backend upload, but maybe we can mitigate them somewhat. 1) is probably not that important as we're the only ones uploading proto files. For 2) we could either substitute the dataset name in the nml with the current dataset name or add an additional dataset overwrite parameter for the backend upload.

What do you think?

@philippotto
Copy link
Member Author

For 2) we could either substitute the dataset name in the nml with the current dataset name or add an additional dataset overwrite parameter for the backend upload.

Sending a parameter to the backend sounds good to me. I prepared a commit for this, but the back-end part doesn't compile, since I don't know enough about scala 🤷‍♂️ @youri-k Could you have a look at this if you have a moment? The dataset name might also need to be incorporated into the tracing objects, but I'm not sure about that. Feel free to ask me if anything is unclear.

@fm3
Copy link
Member

fm3 commented Mar 4, 2020

I pushed a fix for the backend, and tested that this does indeed work nicely!
Only thing: if you download the tracing later as NML again, the previous dataset name is written to the NML again. I suppose we don’t want that, right? In this case, we should overwrite the dataset name in the parsed tracing also.

@fm3
Copy link
Member

fm3 commented Mar 4, 2020

new version fixes that also :)

@philippotto
Copy link
Member Author

@fm3 Thanks for the fix! Works very well! I only noticed one thing: If try to upload multiple NMLs which were downloaded from a hybrid tracing, the back-end throws Cannot upload multiple volume tracings (even though, I only dropped the NMLs into the view). Is this an easy fix?

  1. is probably not that important as we're the only ones uploading proto files.

Yes, since we don't explicitly advertise this, I think the current way is fine.

@fm3
Copy link
Member

fm3 commented Mar 5, 2020

Hmm, not super easy I’m afraid. I’d create a separate issue for that. For now, to upload those nmls the user will have to remove the <volume> tag in them

@philippotto
Copy link
Member Author

@daniel-wer I think this PR would be ready to be merged. Would you agree/accept?

@philippotto
Copy link
Member Author

@fm3 If you accept this, I think we can merge this :)

Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

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

Works for me :) Did not review the js code in deatil, though

@philippotto philippotto merged commit 05275a5 into master Mar 9, 2020
@fm3 fm3 deleted the import-in-view branch March 20, 2020 08:56
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.

Support NML import in view mode
3 participants