M public/capabilities.html => public/capabilities.html +2 -2
@@ 12,7 12,7 @@
<tr>
<th>Capability</th>
{{range .Drivers}}
- <th>{{.}}</th>
+ <th><a href="?driver={{.}}" title="Only show {{.}} capabilities">{{.}}</a></th>
{{end}}
</tr>
</thead>
@@ 39,7 39,7 @@
<tr>
<th>Client capability</th>
{{range .Drivers}}
- <th>{{.}}</th>
+ <th><a href="?driver={{.}}" title="Only show {{.}} capabilities">{{.}}</a></th>
{{end}}
</tr>
</thead>
M server.go => server.go +6 -0
@@ 258,11 258,17 @@ func New() *echo.Echo {
})
e.GET("/capabilities", func(c echo.Context) error {
+ driverName := c.QueryParam("driver")
+
var drivers []string
caps := make(map[string]map[string]*uint64)
clientCaps := make(map[string]map[string]bool)
err := walkLatest(db, walkLatestDriver, func(k string, n *drmtree.Node) error {
drv := n.Driver.Name
+ if driverName != "" && drv != driverName {
+ return nil
+ }
+
drivers = append(drivers, drv)
for name, val := range n.Driver.Caps {