Skip to content

Commit

Permalink
Merge installation disk and data disk page & change disk limit.
Browse files Browse the repository at this point in the history
Signed-off-by: masteryyh <[email protected]>
  • Loading branch information
masteryyh committed Jul 12, 2023
1 parent 1ec4b01 commit f780d18
Show file tree
Hide file tree
Showing 6 changed files with 249 additions and 339 deletions.
3 changes: 2 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const (
)

const (
HardMinDiskSizeGiB = 250
SingleDiskMinSizeGiB = 250
MultipleDiskMinSizeGiB = 180
HardMinDataDiskSizeGiB = 50
MaxPods = 200
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/console/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const (
dnsServersNote = "Note: You can use comma to add more DNS servers. Leave blank to use default DNS."
bondNote = "Note: Select one or more NICs for the Management NIC.\nUse the default value for the Bond Mode if only one NIC is selected."
forceMBRNote = "Note: GPT is used by default. You can use MBR if you encountered compatibility issues."
persistentSizeNote = "Note: persistent partition stores data like system package and container images, not the VM data. \nYou can specify a size like 200Gi or 15360Mi. \nLeave it blank to use the default value."
persistentSizeNote = "Note: persistent partition stores data like system package and container images, not the VM data. \nYou can specify a size like 200Gi or 153600Mi. \nLeave it blank to use the default value."

authorizedFile = "/home/rancher/.ssh/authorized_keys"
)
16 changes: 2 additions & 14 deletions pkg/console/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@ func (p *passwordWrapper) passwordVEscapeKeyBinding(g *gocui.Gui, v *gocui.View)
p.passwordV.Close()
p.passwordConfirmV.Close()
if installModeOnly {
if canChoose, err := canChooseDataDisk(); err != nil {
return err
} else if canChoose {
return showDataDiskPage(p.c)
} else {
return showDiskPage(p.c)
}
return showDiskPage(p.c)
}
if err := p.c.setContentByName(notePanel, ""); err != nil {
return err
Expand Down Expand Up @@ -85,13 +79,7 @@ func (p *passwordWrapper) passwordConfirmVKeyEscape(g *gocui.Gui, v *gocui.View)
return err
}
if installModeOnly {
if canChoose, err := canChooseDataDisk(); err != nil {
return err
} else if canChoose {
return showDataDiskPage(p.c)
} else {
return showDiskPage(p.c)
}
return showDiskPage(p.c)
}
return showNext(p.c, tokenPanel)
}
Loading

0 comments on commit f780d18

Please sign in to comment.