width
This commit is contained in:
parent
8b3c830bab
commit
ece028f167
@ -604,17 +604,20 @@ func (con Connection) AttachServer(ctx *gin.Context) {
|
|||||||
|
|
||||||
case "resize":
|
case "resize":
|
||||||
args := strings.Split(Command.Arguments, "x")
|
args := strings.Split(Command.Arguments, "x")
|
||||||
width, err2 := strconv.Atoi(args[0])
|
i_width, err2 := strconv.Atoi(args[0])
|
||||||
|
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
height, err2 := strconv.Atoi(args[1])
|
width := uint(i_width)
|
||||||
|
i_height, err2 := strconv.Atoi(args[1])
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
height := uint(i_height)
|
||||||
|
|
||||||
log.Printf("Fake resize %dx%d", width, height)
|
log.Printf("Fake resize %dx%d", width, height)
|
||||||
err2 = con.dockerClient.ContainerResize(context.TODO(), containers[0].ID, container.ResizeOptions{Height: uint(height), Width: uint(width)})
|
err2 = con.dockerClient.ContainerResize(context.TODO(), containers[0].ID, container.ResizeOptions{Height: height, Width: width})
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
log.Printf("Failed to resize container to %dx%d: %s", width, height, err)
|
log.Printf("Failed to resize container to %dx%d: %s", width, height, err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user