|
|
@@ -6,6 +6,7 @@ import ( |
|
|
|
"regexp" |
|
|
|
"sort" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
|
"unicode/utf8" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/models" |
|
|
@@ -286,6 +287,8 @@ func DatasetAction(ctx *context.Context) { |
|
|
|
func CurrentRepoDataset(ctx *context.Context) { |
|
|
|
page := ctx.QueryInt("page") |
|
|
|
cloudbrainType := ctx.QueryInt("type") |
|
|
|
keyword := strings.Trim(ctx.Query("search"), " ") |
|
|
|
|
|
|
|
repo := ctx.Repo.Repository |
|
|
|
var datasetIDs []int64 |
|
|
|
dataset, err := models.GetDatasetByRepo(repo) |
|
|
@@ -299,6 +302,7 @@ func CurrentRepoDataset(ctx *context.Context) { |
|
|
|
Page: page, |
|
|
|
PageSize: setting.UI.IssuePagingNum, |
|
|
|
}, |
|
|
|
Keyword: keyword, |
|
|
|
DatasetIDs: datasetIDs, |
|
|
|
UploaderID: uploaderID, |
|
|
|
Type: cloudbrainType, |
|
|
@@ -329,6 +333,7 @@ func CurrentRepoDataset(ctx *context.Context) { |
|
|
|
func MyDataset(ctx *context.Context) { |
|
|
|
page := ctx.QueryInt("page") |
|
|
|
cloudbrainType := ctx.QueryInt("type") |
|
|
|
keyword := strings.Trim(ctx.Query("search"), " ") |
|
|
|
|
|
|
|
uploaderID := ctx.User.ID |
|
|
|
datasets, count, err := models.Attachments(&models.AttachmentsOptions{ |
|
|
@@ -336,6 +341,7 @@ func MyDataset(ctx *context.Context) { |
|
|
|
Page: page, |
|
|
|
PageSize: setting.UI.IssuePagingNum, |
|
|
|
}, |
|
|
|
Keyword: keyword, |
|
|
|
UploaderID: uploaderID, |
|
|
|
Type: cloudbrainType, |
|
|
|
NeedIsPrivate: false, |
|
|
@@ -365,12 +371,14 @@ func MyDataset(ctx *context.Context) { |
|
|
|
func PublicDataset(ctx *context.Context) { |
|
|
|
page := ctx.QueryInt("page") |
|
|
|
cloudbrainType := ctx.QueryInt("type") |
|
|
|
keyword := strings.Trim(ctx.Query("search"), " ") |
|
|
|
|
|
|
|
datasets, count, err := models.Attachments(&models.AttachmentsOptions{ |
|
|
|
ListOptions: models.ListOptions{ |
|
|
|
Page: page, |
|
|
|
PageSize: setting.UI.IssuePagingNum, |
|
|
|
}, |
|
|
|
Keyword: keyword, |
|
|
|
NeedIsPrivate: true, |
|
|
|
IsPrivate: false, |
|
|
|
Type: cloudbrainType, |
|
|
@@ -400,6 +408,7 @@ func PublicDataset(ctx *context.Context) { |
|
|
|
func MyFavoriteDataset(ctx *context.Context) { |
|
|
|
page := ctx.QueryInt("page") |
|
|
|
cloudbrainType := ctx.QueryInt("type") |
|
|
|
keyword := strings.Trim(ctx.Query("search"), " ") |
|
|
|
|
|
|
|
var datasetIDs []int64 |
|
|
|
|
|
|
@@ -416,6 +425,7 @@ func MyFavoriteDataset(ctx *context.Context) { |
|
|
|
Page: page, |
|
|
|
PageSize: setting.UI.IssuePagingNum, |
|
|
|
}, |
|
|
|
Keyword: keyword, |
|
|
|
DatasetIDs: datasetIDs, |
|
|
|
NeedIsPrivate: true, |
|
|
|
IsPrivate: false, |
|
|
|