|
|
@@ -209,6 +209,27 @@ func Profile(ctx *context.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
total = int(count) |
|
|
|
case "datasets": |
|
|
|
datasetSearchOptions := &models.SearchDatasetOptions{ |
|
|
|
Keyword: keyword, |
|
|
|
OwnerID: ctxUser.ID, |
|
|
|
SearchOrderBy: orderBy, |
|
|
|
ListOptions: models.ListOptions{ |
|
|
|
Page: page, |
|
|
|
PageSize: setting.UI.ExplorePagingNum, |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
if len(datasetSearchOptions.SearchOrderBy) == 0 { |
|
|
|
datasetSearchOptions.SearchOrderBy = models.SearchOrderByAlphabetically |
|
|
|
} |
|
|
|
|
|
|
|
datasets, count, err := models.SearchDataset(datasetSearchOptions) |
|
|
|
if err != nil { |
|
|
|
ctx.ServerError("SearchDatasets", err) |
|
|
|
} |
|
|
|
total = int(count) |
|
|
|
ctx.Data["datasets"] = datasets |
|
|
|
default: |
|
|
|
repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ |
|
|
|
ListOptions: models.ListOptions{ |
|
|
|