-
Notifications
You must be signed in to change notification settings - Fork 2
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
[udash] Run shell command on server through web ui #46
Labels
depend-by/ayi
dyweb/ayi is depending on go.ice
example/udash
universal dashboard for database
pkg/httpserver
HTTP server
pkg/ui
type/new-feature
Milestone
Comments
at15
added
pkg/httpserver
HTTP server
pkg/ui
example/udash
universal dashboard for database
type/new-feature
depend-by/ayi
dyweb/ayi is depending on go.ice
labels
Jan 6, 2019
at15
added a commit
that referenced
this issue
Jan 6, 2019
- but it seems the pty is just echo, something wrong in the order of reader and writer etc.
at15
added a commit
that referenced
this issue
Jan 6, 2019
- when browser sending command, it didn't contains a `/n`, so bash never interact with it, figured it out when looking at original example from gorilla/websocket
at15
added a commit
that referenced
this issue
Jan 6, 2019
- what worked for single command no longer works for xterm
2 tasks
the key findings are backend implements varies based on how front end interact dyweb/blog#39
|
at15
added a commit
that referenced
this issue
Jan 6, 2019
[Partial][example][ui] Udash docker log and exec - implemented docker log in client and dk cli #40 , it has a package for deduplex stream (stdout, stderr) - implemented docker exec in client and dk cli #41 , need to create a new connection manually and read the response (I actually don't need to get http client's transport, I can keep the original addr and dial it directly, need a dedicated tcp connection anyway) - implemented web terminal using xterm and gorillawebsocket #46 , it's tricky if you don't understand all the pty stuff, most examples didn't say that (maybe it's too obvious?), when use pty, you have echo for what you type, so you won't see anything when type in xterm and when it attach to socket it will send each character as a single message, and you don't need to do any buffering on server side (pty will do that), same applies to stdout, you just copy what you read and write to websocket connection (I xterm might did some buffer on that). The gorilla example was for some one off command and submit the entire command in a web form so it adds `\n` when write to pty stdin and buffer output using bufio
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
depend-by/ayi
dyweb/ayi is depending on go.ice
example/udash
universal dashboard for database
pkg/httpserver
HTTP server
pkg/ui
type/new-feature
This is similar to #41 except it's using
os/exec
and proxy stdin/out/errRef
The text was updated successfully, but these errors were encountered: