diff --git a/api/internal/handler/routes.go b/api/internal/handler/routes.go index bedd9c57..c558141a 100644 --- a/api/internal/handler/routes.go +++ b/api/internal/handler/routes.go @@ -1190,6 +1190,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Path: "/schedule/ai/getAlgorithms/:adapterId/:resourceType/:taskType/:dataset", Handler: schedule.ScheduleGetAlgorithmsHandler(serverCtx), }, + { + Method: http.MethodGet, + Path: "/schedule/ai/getJobLog/:adapterId/:clusterId/:taskId/:instanceNum", + Handler: schedule.ScheduleGetAiJobLogLogHandler(serverCtx), + }, { Method: http.MethodPost, Path: "/schedule/submit", @@ -1200,6 +1205,16 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Path: "/schedule/getOverview", Handler: schedule.ScheduleGetOverviewHandler(serverCtx), }, + { + Method: http.MethodGet, + Path: "/schedule/getDownloadAlgothmCode", + Handler: schedule.DownloadAlgothmCodeHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/schedule/getDownloadAlgothmCode", + Handler: schedule.UploadAlgothmCodeHandler(serverCtx), + }, }, rest.WithPrefix("/pcm/v1"), ) @@ -1294,7 +1309,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodPost, - Path: "/core/syncClusterAlert", + Path: "/monitoring/syncClusterAlert", Handler: monitoring.SyncClusterAlertHandler(serverCtx), }, { diff --git a/api/internal/types/types.go b/api/internal/types/types.go index 0a905601..887ef866 100644 --- a/api/internal/types/types.go +++ b/api/internal/types/types.go @@ -5676,6 +5676,35 @@ type AiTaskDb struct { EndTime string `json:"endTime,omitempty" db:"end_time"` } +type DownloadAlgorithmCodeReq struct { + AdapterId string `form:"adapterId"` + ClusterId string `form:"clusterId"` + ResourceType string `form:"resourceType"` + Card string `form:"card"` + TaskType string `form:"taskType"` + Dataset string `form:"dataset"` + Algorithm string `form:"algorithm"` + Code string `form:"code"` +} + +type DownloadAlgorithmCodeResp struct { + Code string `json:"algorithms"` +} + +type UploadAlgorithmCodeReq struct { + AdapterId string `json:"adapterId"` + ClusterId string `json:"clusterId"` + ResourceType string `json:"resourceType"` + Card string `json:"card"` + TaskType string `json:"taskType"` + Dataset string `json:"dataset"` + Algorithm string `json:"algorithm"` + Code string `json:"code"` +} + +type UploadAlgorithmCodeResp struct { +} + type CreateAlertRuleReq struct { CLusterId string `json:"clusterId"` ClusterName string `json:"clusterName"`