feat(instances): allow disabling prefixes in aliases and TUI
This commit is contained in:
1 parent
1f46d9d9e5
commit
20d7a40543
12 files changed
+298
-19
No files matched your search
@@ -108,6 +108,9 @@ func editInstance(source config.NetBoxConfig, sources []config.NetBoxConfig, ori
|
||||
}
|
||||
return nil
|
||||
}),
|
||||
huh.NewConfirm().Title("Hide instance prefix in aliases and TUI?").
|
||||
Description("Shorter shell aliases and TUI host names. Conflicting names keep their prefix.").
|
||||
Value(&source.DisablePrefix),
|
||||
huh.NewInput().Title("NetBox URL").Placeholder("https://netbox.example.com").Value(&source.URL).Validate(func(value string) error {
|
||||
return (&config.Config{NetBoxes: []config.NetBoxConfig{{Name: "instance", URL: strings.TrimSpace(value)}}}).ValidateNetBoxes()
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user