|
|
|
@@ -136,6 +136,26 @@ func GetResourceSpecificationList(ctx *context.Context) { |
|
|
|
ctx.JSON(http.StatusOK, response.SuccessWithData(list)) |
|
|
|
} |
|
|
|
|
|
|
|
func GetAllResourceSpecificationList(ctx *context.Context) { |
|
|
|
queue := ctx.QueryInt64("queue") |
|
|
|
status := ctx.QueryInt("status") |
|
|
|
cluster := ctx.Query("cluster") |
|
|
|
available := ctx.QueryInt("available") |
|
|
|
list, err := resource.GetResourceSpecificationList(models.SearchResourceSpecificationOptions{ |
|
|
|
ListOptions: models.ListOptions{Page: 1, PageSize: 1000}, |
|
|
|
QueueId: queue, |
|
|
|
Status: status, |
|
|
|
Cluster: cluster, |
|
|
|
AvailableCode: available, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetResourceSpecificationList error.%v", err) |
|
|
|
ctx.JSON(http.StatusOK, response.ServerError(err.Error())) |
|
|
|
return |
|
|
|
} |
|
|
|
ctx.JSON(http.StatusOK, response.SuccessWithData(list)) |
|
|
|
} |
|
|
|
|
|
|
|
func GetResourceSpecificationScenes(ctx *context.Context) { |
|
|
|
specId := ctx.ParamsInt64(":id") |
|
|
|
list, err := resource.GetResourceSpecificationScenes(specId) |
|
|
|
|