Skip to content

Commit 2bbb1b4

Browse files
authored
Added 'label' and 'properties' fields in board watch command (json output) (#1845)
1 parent f43c9ec commit 2bbb1b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: cli/board/list.go

+4
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ func watchList(cmd *cobra.Command, inst *rpc.Instance) {
9191
for event := range eventsChan {
9292
feedback.PrintResult(watchEvent{
9393
Type: event.EventType,
94+
Label: event.Port.Port.Label,
9495
Address: event.Port.Port.Address,
9596
Protocol: event.Port.Port.Protocol,
9697
ProtocolLabel: event.Port.Port.ProtocolLabel,
98+
Properties: event.Port.Port.Properties,
9799
Boards: event.Port.MatchingBoards,
98100
Error: event.Error,
99101
})
@@ -166,8 +168,10 @@ func (dr result) String() string {
166168
type watchEvent struct {
167169
Type string `json:"type"`
168170
Address string `json:"address,omitempty"`
171+
Label string `json:"label,omitempty"`
169172
Protocol string `json:"protocol,omitempty"`
170173
ProtocolLabel string `json:"protocol_label,omitempty"`
174+
Properties map[string]string `json:"properties"`
171175
Boards []*rpc.BoardListItem `json:"boards,omitempty"`
172176
Error string `json:"error,omitempty"`
173177
}

0 commit comments

Comments
 (0)