|
|
@@ -1012,66 +1012,66 @@ func getClusterRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // GET /api/projects/{project_id}/clusters/{cluster_id}/{kind}/status -> cluster.NewStreamStatusHandler
|
|
|
- streamStatusEndpoint := factory.NewAPIEndpoint(
|
|
|
+ // GET /api/projects/{project_id}/clusters/{cluster_id}/state -> cluster.NewClusterStatusHandler
|
|
|
+ clusterStatusEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
Verb: types.APIVerbGet,
|
|
|
Method: types.HTTPVerbGet,
|
|
|
Path: &types.Path{
|
|
|
- Parent: basePath,
|
|
|
- RelativePath: fmt.Sprintf(
|
|
|
- "%s/{%s}/status",
|
|
|
- relPath,
|
|
|
- types.URLParamKind,
|
|
|
- ),
|
|
|
+ Parent: basePath,
|
|
|
+ RelativePath: relPath + "/state",
|
|
|
},
|
|
|
Scopes: []types.PermissionScope{
|
|
|
types.UserScope,
|
|
|
types.ProjectScope,
|
|
|
types.ClusterScope,
|
|
|
},
|
|
|
- IsWebsocket: true,
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- streamStatusHandler := cluster.NewStreamStatusHandler(
|
|
|
+ clusterStatusHandler := cluster.NewClusterStatusHandler(
|
|
|
config,
|
|
|
factory.GetDecoderValidator(),
|
|
|
factory.GetResultWriter(),
|
|
|
)
|
|
|
|
|
|
routes = append(routes, &router.Route{
|
|
|
- Endpoint: streamStatusEndpoint,
|
|
|
- Handler: streamStatusHandler,
|
|
|
+ Endpoint: clusterStatusEndpoint,
|
|
|
+ Handler: clusterStatusHandler,
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // GET /api/projects/{project_id}/clusters/{cluster_id}/status -> cluster.NewClusterStatusHandler
|
|
|
- clusterStatusEndpoint := factory.NewAPIEndpoint(
|
|
|
+ // GET /api/projects/{project_id}/clusters/{cluster_id}/{kind}/status -> cluster.NewStreamStatusHandler
|
|
|
+ streamStatusEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
Verb: types.APIVerbGet,
|
|
|
Method: types.HTTPVerbGet,
|
|
|
Path: &types.Path{
|
|
|
- Parent: basePath,
|
|
|
- RelativePath: relPath + "/status",
|
|
|
+ Parent: basePath,
|
|
|
+ RelativePath: fmt.Sprintf(
|
|
|
+ "%s/{%s}/status",
|
|
|
+ relPath,
|
|
|
+ types.URLParamKind,
|
|
|
+ ),
|
|
|
},
|
|
|
Scopes: []types.PermissionScope{
|
|
|
types.UserScope,
|
|
|
types.ProjectScope,
|
|
|
types.ClusterScope,
|
|
|
},
|
|
|
+ IsWebsocket: true,
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- clusterStatusHandler := cluster.NewClusterStatusHandler(
|
|
|
+ streamStatusHandler := cluster.NewStreamStatusHandler(
|
|
|
config,
|
|
|
factory.GetDecoderValidator(),
|
|
|
factory.GetResultWriter(),
|
|
|
)
|
|
|
|
|
|
routes = append(routes, &router.Route{
|
|
|
- Endpoint: clusterStatusEndpoint,
|
|
|
- Handler: clusterStatusHandler,
|
|
|
+ Endpoint: streamStatusEndpoint,
|
|
|
+ Handler: streamStatusHandler,
|
|
|
Router: r,
|
|
|
})
|
|
|
|