Skip to content

Add data upload capability to the web UI #188

Description

@stalep

Problem

The h5m web UI has no way to upload performance data. Users must use the CLI (upload command) or the REST API (POST /api/folder/{name}/upload) directly. We should not encourage users to upload using the web UI, but I think they should be able to.

Current state

  • Upload endpoint: POST /api/folder/{name}/upload exists and works
  • Upload via CLI: The upload command supports uploading JSON files from a directory
  • Upload via UI: Missing entirely

Proposed implementation

Upload JSON data

  • Add an "Upload" button to the FolderPage header or Data tab
  • Options for input:
    • File upload — drag-and-drop or file picker for JSON files
    • Paste JSON — text area for pasting JSON data directly
    • Directory upload — upload multiple files at once (maps to multiple upload calls)
  • Show upload progress and completion status
  • Refresh the data view after successful upload

Upload status

  • After upload, show a brief status indicating success/failure
  • Optionally show the processing status (the upload triggers async node evaluation, which may take time for large data with complex node graphs)
  • Link to the recalculation status endpoint for progress tracking

UX considerations

  • For bulk imports (many files), consider a batch upload mode with progress tracking
  • Large JSON files (e.g., rhivos at 14 MB) should show upload progress
  • Error handling: display server error messages clearly (e.g., invalid JSON, folder not found)

Related

  • FolderService.upload() returns an Upload record with the value ID and a CompletableFuture
  • The upload triggers async cascade processing through the node DAG via the work queue
  • ProcessingTrackerEntity tracks upload completion for crash recovery

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions