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

Implement a UI component to trigger asynchronous operations on a resource #1559

Closed
giohappy opened this issue Sep 12, 2023 · 3 comments · Fixed by #1882
Closed

Implement a UI component to trigger asynchronous operations on a resource #1559

giohappy opened this issue Sep 12, 2023 · 3 comments · Fixed by #1882
Assignees

Comments

@giohappy
Copy link

giohappy commented Sep 12, 2023

Introduction

We want to replace the following legacy forms:

  • "upload style"
  • "upload metadata"

end restore the "replace" operation for datasets and documents, which wasn't ported from GN 3.

All these operations should provide a similar UI to configure, execute, and monitor the execution of an operation.

State and behavior

All these operations are asynchronous and blocking:

  • asynchronous: the operation will use the executions requests endpoint to obtain the status of the operation, similar to the current upload operation
  • blocking: the resource cannot be edited while the operation is running. Only editing operations should be blocked, while view-only interfaces will be allowed (embed, preview).

This kind of operation falls inside the lower right quadrant of the following matrix:

Sync Async
Non-Blocking
Blocking X

UI

The component will show in a modal window with a minimal design. In general, it encompasses 4 states:

  1. File selection
  2. Ready to execute
  3. In progress
  4. Completed

Being a blocking operation, the modal cannot be closed until the operation is completed or canceled.
When the resource viewer is opened the client will check the execution request obtained from the REST API response for the resource. If there's an ongoing operation for the resource, the blocking modal for the specific operation will be shown.

State 1
execute_1

State 2
execute_2

State 3
execute_3

State 4
execute_4

Implementation notes

The component can be used inside any page of the GeoNode client. For the moment it will be adopted inside detail pages, but in the future, we could adopt it also for operations on the catalog.

@giohappy giohappy added this to the 4.2.0 milestone Sep 12, 2023
@giohappy giohappy changed the title Implement UI componente for trigger asynchronous operations on a resource Implement a UI component to trigger asynchronous operations on a resource Sep 12, 2023
@dsuren1
Copy link

dsuren1 commented Oct 2, 2023

Users can close and reopen the modal window without losing the state of the operation.

Upon closing the modal, the execution state is to be captured in a separate modal (like export data) allowing user to perform a new upload action.

image

Any manner of error during the upload process is expected to be handled by the backend. The error is shown as an info icon with a tooltip next to file as shown in the screenshot above. And a loading spinner icon when the execution is in progress.

@giohappy Kindly correct me if I'm missing something from our last discussion on this issue

@giohappy giohappy removed this from the 4.2.0 milestone Oct 13, 2023
@giohappy
Copy link
Author

giohappy commented Feb 9, 2024

Resurrecting this old analysis.

@giohappy Kindly correct me if I'm missing something from our last discussion on this issue

I think you're correct.

@giohappy
Copy link
Author

giohappy commented Oct 2, 2024

@allyoucanmap I have edited the description on the base of our call.

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