feat(cmd): Display plugin host external name if present
This commit is contained in:
1 parent
45dc8251ec
commit
e467cbbfa2
1 file changed
+8
@@ -85,6 +85,11 @@ func (c *Command) printListTable(items []*hosts.Host) string {
|
||||
fmt.Sprintf(" External ID: %s", item.ExternalId),
|
||||
)
|
||||
}
|
||||
if item.ExternalName != "" {
|
||||
output = append(output,
|
||||
fmt.Sprintf(" External Name: %s", item.ExternalName),
|
||||
)
|
||||
}
|
||||
if item.Version > 0 {
|
||||
output = append(output,
|
||||
fmt.Sprintf(" Version: %d", item.Version),
|
||||
@@ -145,6 +150,9 @@ func printItemTable(item *hosts.Host, resp *api.Response) string {
|
||||
if item.ExternalId != "" {
|
||||
nonAttributeMap["External ID"] = item.ExternalId
|
||||
}
|
||||
if item.ExternalName != "" {
|
||||
nonAttributeMap["External Name"] = item.ExternalName
|
||||
}
|
||||
|
||||
maxLength := base.MaxAttributesLength(nonAttributeMap, item.Attributes, keySubstMap)
|
||||
|
||||
|
||||
Reference in new issue
Block a user