Merge pull request #908 from wi1dcard/bugfix/trim-delta-sign-of-scale-replicas

[BUGFIX] Remove the trailing delta sign from the default replicas of scale form.
mine
Fernand Galiana 2020-10-26 21:02:40 -06:00 committed by GitHub
commit 98c30d38da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ func (s *ScaleExtender) makeScaleForm(sel string) *tview.Form {
f := s.makeStyledForm()
replicas := strings.TrimSpace(s.GetTable().GetCell(s.GetTable().GetSelectedRowIndex(), s.GetTable().NameColIndex()+1).Text)
tokens := strings.Split(replicas, "/")
replicas = tokens[1]
replicas = strings.TrimRight(tokens[1], ui.DeltaSign)
f.AddInputField("Replicas:", replicas, 4, func(textToCheck string, lastChar rune) bool {
_, err := strconv.Atoi(textToCheck)
return err == nil