Add directly connected downstream workers to the worker resource api (#2831)

This commit is contained in:
Todd authored and GitHub committed 2023-01-23 11:45:09 -08:00
1 parent e6be6431b2
commit d66b92abe0
9 files changed
+247 -170

No files matched your search

+13
View File
@@ -225,6 +225,11 @@ func (c *Command) printListTable(items []*workers.Worker) string {
fmt.Sprintf(" Last Status Time: %s", item.LastStatusTime.Format(time.RFC1123)),
)
}
if len(item.DirectlyConnectedDownstreamWorkers) > 0 {
output = append(output,
" Directly Connected Downstream Workers:",
base.WrapSlice(6, item.DirectlyConnectedDownstreamWorkers))
}
if len(item.AuthorizedActions) > 0 {
output = append(output,
@@ -331,6 +336,14 @@ func printItemTable(item *workers.Worker, resp *api.Response) string {
}
}
if len(item.DirectlyConnectedDownstreamWorkers) > 0 {
ret = append(ret,
"",
" Directly Connected Downstream Workers:",
base.WrapSlice(4, item.DirectlyConnectedDownstreamWorkers),
)
}
if len(item.AuthorizedActions) > 0 {
ret = append(ret,
"",