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

✨ [Frontend] Listen to the stateInputPorts and stateOutputPorts websocket events #6538

Merged
merged 18 commits into from
Oct 16, 2024

Conversation

odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Oct 15, 2024

What do these changes do?

The icons next to the node ports are now also handled by the backend. This only works with dynamic v2 services

Socket message stateInputPorts states:

  • DOWNLOAD_STARTED
  • DOWNLOAD_FINISHED_SUCCESSFULLY
  • DOWNLOAD_WAS_ABORTED
  • DOWNLOAD_FINISHED_WITH_ERROR

Socket message stateOutputPorts states:

  • UPLOAD_STARTED
  • UPLOAD_FINISHED_SUCCESSFULLY
  • UPLOAD_WAS_ABORTED
  • UPLOAD_FINISHED_WITH_ERROR

PortStatus

Related issue/s

How to test

Dev-ops checklist

@odeimaiz odeimaiz self-assigned this Oct 15, 2024
@odeimaiz odeimaiz added this to the MartinKippenberger milestone Oct 15, 2024
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Oct 15, 2024
@odeimaiz odeimaiz marked this pull request as ready for review October 15, 2024 15:25
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

👌

@odeimaiz odeimaiz enabled auto-merge (squash) October 16, 2024 05:28
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@ignapas ignapas left a comment

Choose a reason for hiding this comment

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

once there starts to be an increasing number of updates spontaneously coming from the server, it really helps to keep all that data up to date in a single, detached place. like that it is easily accessible from any part of the app and not only from the component who listens to the socket event. like that you can listen to all socket events from one place, that takes care of updating this centralized store of data, or "state", and then you have your components listening (subscribing to changes) to parts of this store and updating themselves accordingly.
one library that helps doing this that seems widely used and working well is https://mobx.js.org/README.html
I was testing it long time ago with Qooxdoo and seemed to work well, if you are interested, we can take a look together

Copy link

sonarcloud bot commented Oct 16, 2024

@odeimaiz
Copy link
Member Author

once there starts to be an increasing number of updates spontaneously coming from the server, it really helps to keep all that data up to date in a single, detached place. like that it is easily accessible from any part of the app and not only from the component who listens to the socket event. like that you can listen to all socket events from one place, that takes care of updating this centralized store of data, or "state", and then you have your components listening (subscribing to changes) to parts of this store and updating themselves accordingly. one library that helps doing this that seems widely used and working well is https://mobx.js.org/README.html I was testing it long time ago with Qooxdoo and seemed to work well, if you are interested, we can take a look together

Merci! I would rather extend our Store or create a Port data model in the Node model than add an external library.

@odeimaiz odeimaiz merged commit fbb64fd into ITISFoundation:master Oct 16, 2024
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:frontend issue affecting the front-end (area group) t:enhancement Improvement or request on an existing feature
Projects
None yet
4 participants