Skip to content

Commit

Permalink
Fix vlan id save bug
Browse files Browse the repository at this point in the history
Signed-off-by: futuretea <[email protected]>
  • Loading branch information
futuretea authored and bk201 committed Nov 9, 2022
1 parent 87a1369 commit 9b716a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/console/install_panels.go
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,8 @@ func addNetworkPanel(c *Console) error {
c.Gui.Cursor = true
if mgmtNetwork.VlanID != 0 {
askVlanIDV.Value = strconv.Itoa(mgmtNetwork.VlanID)
} else {
askVlanIDV.Value = ""
}
return nil
}
Expand All @@ -1157,7 +1159,7 @@ func addNetworkPanel(c *Console) error {
}
askVlanIDVConfirm := gotoNextPanel(c, []string{askBondModePanel}, validateVlanID)
askVlanIDV.KeyBindings = map[gocui.Key]func(*gocui.Gui, *gocui.View) error{
gocui.KeyArrowUp: gotoNextPanel(c, []string{askInterfacePanel}),
gocui.KeyArrowUp: gotoNextPanel(c, []string{askInterfacePanel}, validateVlanID),
gocui.KeyArrowDown: askVlanIDVConfirm,
gocui.KeyEnter: askVlanIDVConfirm,
gocui.KeyEsc: gotoPrevPage,
Expand Down

0 comments on commit 9b716a2

Please sign in to comment.