@@ -48,11 +48,31 @@ func ListAll(ctx context.Context, req *rpc.BoardListAllReq) (*rpc.BoardListAllRe
48
48
list := & rpc.BoardListAllResp {Boards : []* rpc.BoardListItem {}}
49
49
for _ , targetPackage := range pm .Packages {
50
50
for _ , platform := range targetPackage .Platforms {
51
- platformRelease := pm .GetInstalledPlatformRelease (platform )
52
- if platformRelease == nil {
51
+ installedPlatformRelease := pm .GetInstalledPlatformRelease (platform )
52
+ // We only want to list boards for installed platforms
53
+ if installedPlatformRelease == nil {
53
54
continue
54
55
}
55
- for _ , board := range platformRelease .Boards {
56
+
57
+ installedVersion := installedPlatformRelease .Version .String ()
58
+
59
+ latestVersion := ""
60
+ if latestPlatformRelease := platform .GetLatestRelease (); latestPlatformRelease != nil {
61
+ latestVersion = latestPlatformRelease .Version .String ()
62
+ }
63
+
64
+ rpcPlatform := & rpc.Platform {
65
+ ID : platform .String (),
66
+ Installed : installedVersion ,
67
+ Latest : latestVersion ,
68
+ Name : platform .Name ,
69
+ Maintainer : platform .Package .Maintainer ,
70
+ Website : platform .Package .WebsiteURL ,
71
+ Email : platform .Package .Email ,
72
+ ManuallyInstalled : platform .ManuallyInstalled ,
73
+ }
74
+
75
+ for _ , board := range installedPlatformRelease .Boards {
56
76
if ! match (board .Name ()) {
57
77
continue
58
78
}
@@ -63,6 +83,7 @@ func ListAll(ctx context.Context, req *rpc.BoardListAllReq) (*rpc.BoardListAllRe
63
83
Name : board .Name (),
64
84
FQBN : board .FQBN (),
65
85
IsHidden : board .IsHidden (),
86
+ Platform : rpcPlatform ,
66
87
})
67
88
}
68
89
}
0 commit comments