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

Add an Open Remote Terminal button to access remote terminal sessions on devices #447

Closed
davidebriani opened this issue Feb 13, 2024 · 1 comment
Labels
enhancement New feature or request frontend This issue is relative to the Edgehog Frontend

Comments

@davidebriani
Copy link
Collaborator

davidebriani commented Feb 13, 2024

Building on top of #444, #445 and #446, the frontend can implement a button that allows users to open remote terminal sessions on devices that support the functionality.

The frontend can display the "Open remote terminal" button on each device page, if the device has the REMOTE_TERMINAL capability.
The button is disabled if the device is offline.

When the button is pressed, the frontend performs the requestForwarderSession GraphQL mutation:

  • If the sessionStatus in the mutation’s response is not CONNECTED, it means that the device did not connect to the Forwarder yet and the session is not ready. The frontend then polls the GraphQL query forwarderSession until the status of the session is CONNECTED. In the mean time, it will display a loading state.
  • If the session status is CONNECTED, the frontend composes the URL for the remote terminal session: https://<forwarder_host>:<forwarder_port>/v1/<session_token>/http/7681. The frontend then opens a new browser tab and navigates to the URL of the remote terminal session.
@davidebriani davidebriani added enhancement New feature or request frontend This issue is relative to the Edgehog Frontend labels Feb 13, 2024
davidebriani added a commit to davidebriani/edgehog that referenced this issue Mar 18, 2024
Note down a summary of the implemented functionality in the changelog
file.

Close edgehog-device-manager#444, edgehog-device-manager#445, edgehog-device-manager#446, edgehog-device-manager#447.

Signed-off-by: Davide Briani <davide.briani@secomind.com>
@davidebriani
Copy link
Collaborator Author

Closing as implemented by #472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend This issue is relative to the Edgehog Frontend
Projects
None yet
Development

No branches or pull requests

1 participant