Dashboards: Only expose LibraryPanels and search on v0 (not v1+v2) (#103335)
This commit is contained in:
@@ -64,7 +64,7 @@ type APIGroupValidation interface {
|
||||
|
||||
type APIGroupRouteProvider interface {
|
||||
// Support direct HTTP routes from an APIGroup
|
||||
GetAPIRoutes() *APIRoutes
|
||||
GetAPIRoutes(gv schema.GroupVersion) *APIRoutes
|
||||
}
|
||||
|
||||
type APIGroupPostStartHookProvider interface {
|
||||
|
||||
@@ -125,7 +125,7 @@ func getOpenAPIPostProcessor(version string, builders []APIGroupBuilder) func(*s
|
||||
// Optionally include raw http handlers
|
||||
provider, ok := b.(APIGroupRouteProvider)
|
||||
if ok && provider != nil {
|
||||
routes := provider.GetAPIRoutes()
|
||||
routes := provider.GetAPIRoutes(gv)
|
||||
if routes != nil {
|
||||
for _, route := range routes.Root {
|
||||
copy.Paths.Paths[prefix+route.Path] = &spec3.Path{
|
||||
|
||||
@@ -23,12 +23,12 @@ func GetCustomRoutesHandler(delegateHandler http.Handler, restConfig *restclient
|
||||
continue
|
||||
}
|
||||
|
||||
routes := provider.GetAPIRoutes()
|
||||
if routes == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, gv := range GetGroupVersions(builder) {
|
||||
routes := provider.GetAPIRoutes(gv)
|
||||
if routes == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
prefix := "/apis/" + gv.String()
|
||||
|
||||
// Root handlers
|
||||
|
||||
Reference in New Issue
Block a user