Browse Source

gen algorithmcode proto

Former-commit-id: 5efb7dd3ac
pull/145/head
tzwang 1 year ago
parent
commit
9ec3a048b0
2 changed files with 45 additions and 1 deletions
  1. +16
    -1
      api/internal/handler/routes.go
  2. +29
    -0
      api/internal/types/types.go

+ 16
- 1
api/internal/handler/routes.go View File

@@ -1190,6 +1190,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/schedule/ai/getAlgorithms/:adapterId/:resourceType/:taskType/:dataset", Path: "/schedule/ai/getAlgorithms/:adapterId/:resourceType/:taskType/:dataset",
Handler: schedule.ScheduleGetAlgorithmsHandler(serverCtx), Handler: schedule.ScheduleGetAlgorithmsHandler(serverCtx),
}, },
{
Method: http.MethodGet,
Path: "/schedule/ai/getJobLog/:adapterId/:clusterId/:taskId/:instanceNum",
Handler: schedule.ScheduleGetAiJobLogLogHandler(serverCtx),
},
{ {
Method: http.MethodPost, Method: http.MethodPost,
Path: "/schedule/submit", Path: "/schedule/submit",
@@ -1200,6 +1205,16 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/schedule/getOverview", Path: "/schedule/getOverview",
Handler: schedule.ScheduleGetOverviewHandler(serverCtx), 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"), rest.WithPrefix("/pcm/v1"),
) )
@@ -1294,7 +1309,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
}, },
{ {
Method: http.MethodPost, Method: http.MethodPost,
Path: "/core/syncClusterAlert",
Path: "/monitoring/syncClusterAlert",
Handler: monitoring.SyncClusterAlertHandler(serverCtx), Handler: monitoring.SyncClusterAlertHandler(serverCtx),
}, },
{ {


+ 29
- 0
api/internal/types/types.go View File

@@ -5676,6 +5676,35 @@ type AiTaskDb struct {
EndTime string `json:"endTime,omitempty" db:"end_time"` 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 { type CreateAlertRuleReq struct {
CLusterId string `json:"clusterId"` CLusterId string `json:"clusterId"`
ClusterName string `json:"clusterName"` ClusterName string `json:"clusterName"`


Loading…
Cancel
Save