| @@ -68,6 +68,7 @@ type SearchImageOptions struct { | |||||
| IncludeCustom bool | IncludeCustom bool | ||||
| IncludeOwnerOnly bool | IncludeOwnerOnly bool | ||||
| Topics string | Topics string | ||||
| CloudbrainType int | |||||
| ListOptions | ListOptions | ||||
| SearchOrderBy | SearchOrderBy | ||||
| } | } | ||||
| @@ -411,6 +412,10 @@ func SearchImageCondition(opts *SearchImageOptions) builder.Cond { | |||||
| } | } | ||||
| if opts.CloudbrainType > 0 { | |||||
| cond = cond.And(builder.Eq{"cloudbrain_type": opts.CloudbrainType}) | |||||
| } | |||||
| return cond | return cond | ||||
| } | } | ||||
| @@ -1037,6 +1037,7 @@ func GetPublicImages(ctx *context.Context) { | |||||
| IncludeOfficialOnly: ctx.QueryBool("recommend"), | IncludeOfficialOnly: ctx.QueryBool("recommend"), | ||||
| SearchOrderBy: "type desc, num_stars desc,id desc", | SearchOrderBy: "type desc, num_stars desc,id desc", | ||||
| Status: models.IMAGE_STATUS_SUCCESS, | Status: models.IMAGE_STATUS_SUCCESS, | ||||
| CloudbrainType: ctx.QueryInt("cloudbrainType"), | |||||
| } | } | ||||
| getImages(ctx, &opts) | getImages(ctx, &opts) | ||||
| @@ -672,7 +672,7 @@ export default { | |||||
| }, | }, | ||||
| filters:{ | filters:{ | ||||
| transformType(val){ | transformType(val){ | ||||
| if(val==0){ | |||||
| if(val==0 || val==2){ | |||||
| return "GPU" | return "GPU" | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -84,7 +84,7 @@ | |||||
| currentPagePublic: 1, | currentPagePublic: 1, | ||||
| pageSizePublic: 5, | pageSizePublic: 5, | ||||
| totalNumPublic: 0, | totalNumPublic: 0, | ||||
| paramsPublic: { page: 1, pageSize: 5, q: '', recommend: false }, | |||||
| paramsPublic: { page: 1, pageSize: 5, q: '', recommend: false,cloudbrainType: 2 }, | |||||
| tableDataPublic: [], | tableDataPublic: [], | ||||
| loadingPublic: false, | loadingPublic: false, | ||||
| @@ -218,7 +218,7 @@ export default async function initImage(){ | |||||
| new Vue({ | new Vue({ | ||||
| el:el, | el:el, | ||||
| render: h => h(selectImages) | |||||
| render: h => h(selectGrampusImages) | |||||
| }); | }); | ||||
| } | } | ||||
| initVueImages() | initVueImages() | ||||