-
Notifications
You must be signed in to change notification settings - Fork 19
Serial console over websockets #1407
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| // detect websocket endpoints and give us a helper that constructs a WebSocket | ||
| // instead of calling fetch | ||
| const wsUrl = `ws://${window.location.host}/v1/instances/${instance}/serial-console/stream?organization=${organization}&project=${project}` | ||
| const status = 'connected' // TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be able to use readyState for this: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/readyState, but it'd require access to the socket.
You may need to move the skeleton inside the terminal component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha I think we all found this around the same time, I sent the same thing
5e26730 to
46a1ed2
Compare
bb8334f to
4d609e4
Compare
4d609e4 to
c61a9a0
Compare
34668ac to
e26a16c
Compare
e26a16c to
776040f
Compare
|
I tested this with @jmpesp against a Real Instance and it worked to display the serial console steam. Input did not work, but we think it's more like a networking issue than a console issue. We confirmed keypresses were getting sent from the browser, at least. So I'm going to merge and bump the console in omicron. We will get more testing for free that way. |


Closes #952
I wrote a little mock server in Deno for local dev. MSW does not support websockets. Propolis has a mock server that can power a serial console when running Nexus with simulated sled agent, but as we know from MSW, having something instant to work with is invaluable.