added console size and removed resized feature
This commit is contained in:
parent
20ede52053
commit
1fedda4bf1
@ -595,15 +595,7 @@ func (con Connection) AttachServer(ctx *gin.Context) {
|
||||
|
||||
case "close":
|
||||
stop = true
|
||||
case "resize":
|
||||
err = con.dockerClient.ContainerResize(context.TODO(), containers[0].ID, container.ResizeOptions{Height: Command.Arguments[0].(uint), Width: Command.Arguments[1].(uint)})
|
||||
if err != nil {
|
||||
log.Printf("Failed to resize terminal to %dx%d: %s", Command.Arguments[0].(uint), Command.Arguments[1].(uint), err)
|
||||
} else {
|
||||
log.Printf("Resized terminal to %dx%d", Command.Arguments[0].(uint), Command.Arguments[1].(uint))
|
||||
}
|
||||
}
|
||||
|
||||
case data := <-containerRead:
|
||||
err := ws.WriteJSON(data)
|
||||
if err != nil {
|
||||
@ -730,6 +722,7 @@ func (con Connection) BrowseServer(ctx *gin.Context) {
|
||||
&container.HostConfig{
|
||||
Mounts: []mount.Mount{{Source: serverInfo.Id, Target: "/tmp/data", Type: "volume"}},
|
||||
AutoRemove: true,
|
||||
ConsoleSize: [2]uint{1000, 1000},
|
||||
},
|
||||
&network.NetworkingConfig{
|
||||
EndpointsConfig: map[string]*network.EndpointSettings{"test": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user