mirror of
https://github.com/goharbor/harbor
synced 2025-04-20 16:16:00 +00:00
fix(preheat): fix the swagger definition of preheat get log api
Signed-off-by: chlins <chlins.zhang@gmail.com>
This commit is contained in:
parent
0921beaf4c
commit
4f95c4d067
|
@ -10,7 +10,6 @@ schemes:
|
||||||
basePath: /api/v2.0
|
basePath: /api/v2.0
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
- text/plain
|
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
|
@ -1360,7 +1359,9 @@ paths:
|
||||||
description: Get the log text stream of the specified task for the given execution
|
description: Get the log text stream of the specified task for the given execution
|
||||||
tags:
|
tags:
|
||||||
- preheat
|
- preheat
|
||||||
operationId: GetLog
|
operationId: GetPreheatLog
|
||||||
|
produces:
|
||||||
|
- text/plain
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/parameters/requestId'
|
- $ref: '#/parameters/requestId'
|
||||||
- $ref: '#/parameters/projectName'
|
- $ref: '#/parameters/projectName'
|
||||||
|
|
|
@ -704,8 +704,8 @@ func (api *preheatAPI) ListTasks(ctx context.Context, params operation.ListTasks
|
||||||
WithLink(api.Links(ctx, params.HTTPRequest.URL, total, query.PageNumber, query.PageSize).String())
|
WithLink(api.Links(ctx, params.HTTPRequest.URL, total, query.PageNumber, query.PageSize).String())
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetLog gets log.
|
// GetPreheatLog gets log.
|
||||||
func (api *preheatAPI) GetLog(ctx context.Context, params operation.GetLogParams) middleware.Responder {
|
func (api *preheatAPI) GetPreheatLog(ctx context.Context, params operation.GetPreheatLogParams) middleware.Responder {
|
||||||
if err := api.RequireProjectAccess(ctx, params.ProjectName, rbac.ActionRead, rbac.ResourcePreatPolicy); err != nil {
|
if err := api.RequireProjectAccess(ctx, params.ProjectName, rbac.ActionRead, rbac.ResourcePreatPolicy); err != nil {
|
||||||
return api.SendError(ctx, err)
|
return api.SendError(ctx, err)
|
||||||
}
|
}
|
||||||
|
@ -715,7 +715,7 @@ func (api *preheatAPI) GetLog(ctx context.Context, params operation.GetLogParams
|
||||||
return api.SendError(ctx, err)
|
return api.SendError(ctx, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return operation.NewGetLogOK().WithPayload(string(l)).WithContentType("text/plain")
|
return operation.NewGetPreheatLogOK().WithPayload(string(l))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListProvidersUnderProject is Get all providers at project level
|
// ListProvidersUnderProject is Get all providers at project level
|
||||||
|
|
Loading…
Reference in New Issue
Block a user