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

Drag'n'drop import of multiple NML files #2908

Merged
merged 14 commits into from
Jul 24, 2018
Merged

Drag'n'drop import of multiple NML files #2908

merged 14 commits into from
Jul 24, 2018

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Jul 17, 2018

URL of deployed dev instance (used for testing):

Steps to test:

  • upload one or several NML files via:
    • drag and drop into the tracing view
    • the usual "import nml" button in the trees tab (in the modal which opens via this button, you can either use dnd or you can click the area to open a file picker)
  • in the import modal, you can check the option to auto-create groups for each file. try it with and without

Issues:


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.

Awesome, code looks good and it worked perfectly during my testing :) The error reporting could need a little tweak, see my suggestion.

<span className="ant-list-item-meta-description">({prettyBytes(file.size)})</span>
</span>
}
description={`Last modification date: ${moment(file.lastModifiedDate).format(
Copy link
Member

Choose a reason for hiding this comment

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

After #2916 was merged, we should use the FormattedDate component here as well :)

// an error
importActions.forEach(action => Store.dispatch(action));
} catch (e) {
Toast.error(e.message);
Copy link
Member

Choose a reason for hiding this comment

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

Do you think it's possible to show which specific NML file caused the error? Right now, it's hard to find out which file to look at if the NML import fails with an error message.

<Modal
title={`Import ${this.state.files.length} NML file(s)`}
visible={this.state.files.length > 0}
onOk={this.importNmls}
Copy link
Member

Choose a reason for hiding this comment

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

With the dedicated submit button we should not need this, I think.

@philippotto philippotto merged commit fe1ca84 into master Jul 24, 2018
@daniel-wer daniel-wer deleted the dnd-nml branch August 2, 2018 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import of multiple Skeletons Drag & Drop NMLs into a tracing view
2 participants