cmd/tsconnect: add progress and connection callbacks
Allows UI to display slightly more fine-grained progress when the SSH connection is being established. Updates tailscale/corp#7186 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
committed by
Mihai Parparita
parent
246274b8e9
commit
7741e9feb0
@@ -46,7 +46,12 @@ function SSHSession({
|
||||
const ref = useRef<HTMLDivElement>(null)
|
||||
useEffect(() => {
|
||||
if (ref.current) {
|
||||
runSSHSession(ref.current, def, ipn, onDone, (err) => console.error(err))
|
||||
runSSHSession(ref.current, def, ipn, {
|
||||
onConnectionProgress: (p) => console.log("Connection progress", p),
|
||||
onConnected() {},
|
||||
onError: (err) => console.error(err),
|
||||
onDone,
|
||||
})
|
||||
}
|
||||
}, [ref])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user