UI: add unit property (#21396)
This commit is contained in:
parent
0b033933aa
commit
c136ebc2e0
11 changed files with 105 additions and 71 deletions
|
|
@ -438,6 +438,10 @@ func (c *CmdConfigure) processInputConfig(param templates.Param) string {
|
|||
label = langLabel
|
||||
}
|
||||
|
||||
if param.Unit != "" {
|
||||
label = fmt.Sprintf("%s (%s)", label, param.Unit)
|
||||
}
|
||||
|
||||
value := c.askValue(question{
|
||||
label: label,
|
||||
defaultValue: param.Default,
|
||||
|
|
|
|||
|
|
@ -129,8 +129,13 @@ func (c *CmdConfigure) askParam(p templates.Param) string {
|
|||
required = *p.Required
|
||||
}
|
||||
|
||||
label := p.Description.String(c.lang)
|
||||
if p.Unit != "" {
|
||||
label = fmt.Sprintf("%s (%s)", label, p.Unit)
|
||||
}
|
||||
|
||||
return c.askValue(question{
|
||||
label: p.Description.String(c.lang),
|
||||
label: label,
|
||||
valueType: p.Type,
|
||||
choice: p.Choice,
|
||||
mask: mask,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue