diff --git a/models/cloudbrain.go b/models/cloudbrain.go index e28ba3ea5..810e68d30 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -1566,6 +1566,14 @@ func GetCloudbrainCountByUserID(userID int64, jobType string) (int, error) { return int(count), err } +func GetCloudbrainRunCountByRepoID(repoID int64) (int, error) { + count, err := x.In("status", JobWaiting, JobRunning, ModelArtsCreateQueue, ModelArtsCreating, ModelArtsStarting, + ModelArtsReadyToStart, ModelArtsResizing, ModelArtsStartQueuing, ModelArtsRunning, ModelArtsRestarting, ModelArtsTrainJobInit, + ModelArtsTrainJobImageCreating, ModelArtsTrainJobSubmitTrying, ModelArtsTrainJobWaiting, ModelArtsTrainJobRunning, + ModelArtsTrainJobScaling, ModelArtsTrainJobCheckInit, ModelArtsTrainJobCheckRunning, ModelArtsTrainJobCheckRunningCompleted).And("repo_id = ?", repoID).Count(new(Cloudbrain)) + return int(count), err +} + func GetBenchmarkCountByUserID(userID int64) (int, error) { count, err := x.In("status", JobWaiting, JobRunning).And("(job_type = ? or job_type = ? or job_type = ?) and user_id = ? and type = ?", string(JobTypeBenchmark), string(JobTypeBrainScore), string(JobTypeSnn4imagenet), userID, TypeCloudBrainOne).Count(new(Cloudbrain)) return int(count), err diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index ec9cf25fe..333867fb2 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -927,7 +927,7 @@ func CounDataByDateAndReCount(wikiCountMap map[string]int, startTime time.Time, if err != nil { log.Info("query commit code errr.") } else { - log.Info("query commit code size, len=" + fmt.Sprint(len(CommitCodeSizeMap))) + //log.Info("query commit code size, len=" + fmt.Sprint(len(CommitCodeSizeMap))) CommitCodeSizeMapJson, _ := json.Marshal(CommitCodeSizeMap) log.Info("CommitCodeSizeMapJson=" + string(CommitCodeSizeMapJson)) } @@ -1154,7 +1154,6 @@ func getUserIndexFromAnalysisAll(dateRecord UserBusinessAnalysisAll, ParaWeight // 登录次数 0.10 result = float64(dateRecord.CodeMergeCount) * getParaWeightValue("CodeMergeCount", ParaWeight, 0.2) result += float64(dateRecord.CommitCount) * getParaWeightValue("CommitCount", ParaWeight, 0.2) - //log.Info("1 result=" + fmt.Sprint(result)) result += float64(dateRecord.IssueCount) * getParaWeightValue("IssueCount", ParaWeight, 0.2) result += float64(dateRecord.CommentCount) * getParaWeightValue("CommentCount", ParaWeight, 0.2) result += float64(dateRecord.FocusRepoCount) * getParaWeightValue("FocusRepoCount", ParaWeight, 0.1) @@ -1237,7 +1236,6 @@ func getUserIndex(dateRecord UserBusinessAnalysis, ParaWeight map[string]float64 // 登录次数 0.10 result = float64(dateRecord.CodeMergeCount) * getParaWeightValue("CodeMergeCount", ParaWeight, 0.2) result += float64(dateRecord.CommitCount) * getParaWeightValue("CommitCount", ParaWeight, 0.2) - //log.Info("2 result=" + fmt.Sprint(result)) result += float64(dateRecord.IssueCount) * getParaWeightValue("IssueCount", ParaWeight, 0.2) result += float64(dateRecord.CommentCount) * getParaWeightValue("CommentCount", ParaWeight, 0.2) result += float64(dateRecord.FocusRepoCount) * getParaWeightValue("FocusRepoCount", ParaWeight, 0.1) diff --git a/modules/auth/wechat/access_token.go b/modules/auth/wechat/access_token.go index 0a63bc2de..f9516e3e1 100644 --- a/modules/auth/wechat/access_token.go +++ b/modules/auth/wechat/access_token.go @@ -9,7 +9,7 @@ import ( const EMPTY_REDIS_VAL = "Nil" -var accessTokenLock = redis_lock.NewDistributeLock() +var accessTokenLock = redis_lock.NewDistributeLock(redis_key.AccessTokenLockKey()) func GetWechatAccessToken() string { token, _ := redis_client.Get(redis_key.WechatAccessTokenKey()) @@ -28,15 +28,15 @@ func GetWechatAccessToken() string { } func refreshAccessToken() { - if ok := accessTokenLock.Lock(redis_key.AccessTokenLockKey(), 3*time.Second); ok { - defer accessTokenLock.UnLock(redis_key.AccessTokenLockKey()) + if ok := accessTokenLock.Lock(3 * time.Second); ok { + defer accessTokenLock.UnLock() callAccessTokenAndUpdateCache() } } func refreshAndGetAccessToken() string { - if ok := accessTokenLock.LockWithWait(redis_key.AccessTokenLockKey(), 3*time.Second, 3*time.Second); ok { - defer accessTokenLock.UnLock(redis_key.AccessTokenLockKey()) + if ok := accessTokenLock.LockWithWait(3*time.Second, 3*time.Second); ok { + defer accessTokenLock.UnLock() token, _ := redis_client.Get(redis_key.WechatAccessTokenKey()) if token != "" { if token == EMPTY_REDIS_VAL { diff --git a/modules/redis/redis_lock/lock.go b/modules/redis/redis_lock/lock.go index 0faed3237..b8cd837f1 100644 --- a/modules/redis/redis_lock/lock.go +++ b/modules/redis/redis_lock/lock.go @@ -6,22 +6,23 @@ import ( ) type DistributeLock struct { + lockKey string } -func NewDistributeLock() *DistributeLock { - return &DistributeLock{} +func NewDistributeLock(lockKey string) *DistributeLock { + return &DistributeLock{lockKey: lockKey} } -func (lock *DistributeLock) Lock(lockKey string, expireTime time.Duration) bool { - isOk, _ := redis_client.Setnx(lockKey, "", expireTime) +func (lock *DistributeLock) Lock(expireTime time.Duration) bool { + isOk, _ := redis_client.Setnx(lock.lockKey, "", expireTime) return isOk } -func (lock *DistributeLock) LockWithWait(lockKey string, expireTime time.Duration, waitTime time.Duration) bool { +func (lock *DistributeLock) LockWithWait(expireTime time.Duration, waitTime time.Duration) bool { start := time.Now().Unix() * 1000 duration := waitTime.Milliseconds() for { - isOk, _ := redis_client.Setnx(lockKey, "", expireTime) + isOk, _ := redis_client.Setnx(lock.lockKey, "", expireTime) if isOk { return true } @@ -34,7 +35,7 @@ func (lock *DistributeLock) LockWithWait(lockKey string, expireTime time.Duratio return false } -func (lock *DistributeLock) UnLock(lockKey string) error { - _, err := redis_client.Del(lockKey) +func (lock *DistributeLock) UnLock() error { + _, err := redis_client.Del(lock.lockKey) return err } diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 15afb37ca..c52a369ce 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -817,6 +817,7 @@ settings.delete_notices_1= - This operation CANNOT be undone. settings.delete_notices_2= - This operation will permanently delete the %s dataset. settings.delete_notices_fork_1= - Forks of this dataset will become independent after deletion. settings.deletion_success= The dataset has been deleted. +settings.deletion_notice_cloudbrain = you need to stop the cloudbrain task under the project before remove the project! task.machine_translation= machine translation task.question_answering_system= question answering system task.information_retrieval= information retrieval diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index fc5f89ccb..cb1c7565a 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -1931,6 +1931,7 @@ settings.delete_notices_1=- 此操作 不可以 被回滚。 settings.delete_notices_2=- 此操作将永久删除项目 %s,包括 Git 数据、 任务、评论、百科和协作者的操作权限。 settings.delete_notices_fork_1=- 在此项目删除后,它的派生项目将变成独立项目。 settings.deletion_success=项目已被删除。 +settings.deletion_notice_cloudbrain=请先停止项目内正在运行的云脑任务,然后再删除项目。 settings.update_settings_success=项目设置已更新。 settings.transfer_owner=新拥有者 settings.make_transfer=开始转移 diff --git a/public/home/home.js b/public/home/home.js index 3b2a34f06..2affefddd 100755 --- a/public/home/home.js +++ b/public/home/home.js @@ -418,44 +418,16 @@ queryRecommendData(); function queryRecommendData(){ $.ajax({ type:"GET", - url:"/recommend/org", + url:"/recommend/home", headers: { authorization:token, }, dataType:"json", async:false, success:function(json){ - displayOrg(json); - }, - error:function(response) { - } - }); - - $.ajax({ - type:"GET", - url:"/recommend/repo", - headers: { - authorization:token, - }, - dataType:"json", - async:false, - success:function(json){ - displayRepo(json); - }, - error:function(response) { - } - }); - - $.ajax({ - type:"GET", - url:"/recommend/imageinfo", - headers: { - authorization:token, - }, - dataType:"json", - async:false, - success:function(json){ - displayActivity(json); + displayOrg(json.org); + displayRepo(json.repo); + displayActivity(json.image) }, error:function(response) { } diff --git a/routers/home.go b/routers/home.go index e37cacb01..38acffb2f 100755 --- a/routers/home.go +++ b/routers/home.go @@ -99,6 +99,12 @@ func setRecommendURL(ctx *context.Context) { func Dashboard(ctx *context.Context) { if ctx.IsSigned { + pictureInfo, err := getImageInfo("dashboard-picture") + if err == nil && len(pictureInfo) > 0 { + log.Info("set image info=" + pictureInfo[0]["url"]) + ctx.Data["image_url"] = pictureInfo[0]["url"] + ctx.Data["image_link"] = pictureInfo[0]["image_link"] + } if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm { ctx.Data["Title"] = ctx.Tr("auth.active_your_account") ctx.HTML(200, user.TplActivate) @@ -259,7 +265,11 @@ func ExploreRepos(ctx *context.Context) { ctx.Data["PageIsExplore"] = true ctx.Data["PageIsExploreRepositories"] = true ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - + pictureInfo, err := getImageInfo("explore-user-picture") + if err == nil && len(pictureInfo) > 0 { + ctx.Data["image_url"] = pictureInfo[0]["url"] + ctx.Data["image_link"] = pictureInfo[0]["image_link"] + } var ownerID int64 if ctx.User != nil && !ctx.User.IsAdmin { ownerID = ctx.User.ID @@ -434,7 +444,11 @@ func ExploreUsers(ctx *context.Context) { ctx.Data["PageIsExplore"] = true ctx.Data["PageIsExploreUsers"] = true ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - + pictureInfo, err := getImageInfo("explore-user-picture") + if err == nil && len(pictureInfo) > 0 { + ctx.Data["image_url"] = pictureInfo[0]["url"] + ctx.Data["image_link"] = pictureInfo[0]["image_link"] + } RenderUserSearch(ctx, &models.SearchUserOptions{ Actor: ctx.User, Type: models.UserTypeIndividual, @@ -471,7 +485,7 @@ func ExploreOrganizations(ctx *context.Context) { return } - recommendOrgs, err := GetRecommendOrg() + recommendOrgs, err := getRecommendOrg() if err != nil { log.Error("GetRecommendOrgInfos failed:%v", err.Error(), ctx.Data["MsgID"]) ctx.ServerError("GetRecommendOrgInfos", err) @@ -606,31 +620,31 @@ func ExploreImages(ctx *context.Context) { } func ExploreDataAnalysisUserTrend(ctx *context.Context) { - ctx.Data["url_params"]="UserTrend" + ctx.Data["url_params"] = "UserTrend" ctx.HTML(200, tplExploreExploreDataAnalysis) } func ExploreDataAnalysisUserAnalysis(ctx *context.Context) { - ctx.Data["url_params"]="UserAnalysis" + ctx.Data["url_params"] = "UserAnalysis" ctx.HTML(200, tplExploreExploreDataAnalysis) } func ExploreDataAnalysisProTrend(ctx *context.Context) { - ctx.Data["url_params"]="ProTrend" + ctx.Data["url_params"] = "ProTrend" ctx.HTML(200, tplExploreExploreDataAnalysis) } func ExploreDataAnalysisProAnalysis(ctx *context.Context) { - ctx.Data["url_params"]="ProAnalysis" + ctx.Data["url_params"] = "ProAnalysis" ctx.HTML(200, tplExploreExploreDataAnalysis) } func ExploreDataAnalysisOverview(ctx *context.Context) { - ctx.Data["url_params"]="Overview" + ctx.Data["url_params"] = "Overview" ctx.HTML(200, tplExploreExploreDataAnalysis) } func ExploreDataAnalysisBrainAnalysis(ctx *context.Context) { - ctx.Data["url_params"]="BrainAnalysis" + ctx.Data["url_params"] = "BrainAnalysis" ctx.HTML(200, tplExploreExploreDataAnalysis) } func ExploreDataAnalysis(ctx *context.Context) { - ctx.Data["url_params"]="" + ctx.Data["url_params"] = "" ctx.HTML(200, tplExploreExploreDataAnalysis) } @@ -640,7 +654,7 @@ func NotFound(ctx *context.Context) { ctx.NotFound("home.NotFound", nil) } -func GetRecommendOrg() ([]map[string]interface{}, error) { +func getRecommendOrg() ([]map[string]interface{}, error) { url := setting.RecommentRepoAddr + "organizations" result, err := repository.RecommendFromPromote(url) @@ -668,17 +682,18 @@ func GetRecommendOrg() ([]map[string]interface{}, error) { } return resultOrg, nil } -func GetImageInfo() ([]map[string]interface{}, error) { - url := setting.RecommentRepoAddr + "picture_info" + +func getImageInfo(filename string) ([]map[string]string, error) { + url := setting.RecommentRepoAddr + filename result, err := repository.RecommendFromPromote(url) if err != nil { return nil, err } - imageInfo := make([]map[string]interface{}, 0) + imageInfo := make([]map[string]string, 0) for i := 0; i < (len(result) - 1); i++ { line := result[i] - imageMap := make(map[string]interface{}) + imageMap := make(map[string]string) if line[0:4] == "url=" { url := line[4:] imageMap["url"] = url @@ -731,15 +746,6 @@ func GetRankUser(index string) ([]map[string]interface{}, error) { return resultOrg, nil } -func GetImageInfoFromPromote(ctx *context.Context) { - imageInfo, err := GetImageInfo() - if err != nil { - ctx.ServerError("500", err) - return - } - ctx.JSON(200, imageInfo) -} - func GetUserRankFromPromote(ctx *context.Context) { index := ctx.Params("index") resultUserRank, err := GetRankUser(index) @@ -750,13 +756,24 @@ func GetUserRankFromPromote(ctx *context.Context) { ctx.JSON(200, resultUserRank) } -func RecommendOrgFromPromote(ctx *context.Context) { - resultOrg, err := GetRecommendOrg() +func RecommendHomeInfo(ctx *context.Context) { + resultOrg, err := getRecommendOrg() if err != nil { - ctx.ServerError("500", err) - return + log.Info("error." + err.Error()) + } + resultRepo, err := repository.GetRecommendRepoFromPromote("projects") + if err != nil { + log.Info("error." + err.Error()) + } + resultImage, err := getImageInfo("picture_info") + if err != nil { + log.Info("error." + err.Error()) } - ctx.JSON(200, resultOrg) + mapInterface := make(map[string]interface{}) + mapInterface["org"] = resultOrg + mapInterface["repo"] = resultRepo + mapInterface["image"] = resultImage + ctx.JSON(http.StatusOK, mapInterface) } func RecommendRepoFromPromote(ctx *context.Context) { diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index e099a19ff..95ca8df62 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -764,6 +764,7 @@ func trainJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModelArts ctx.Data["bootFile"] = form.BootFile ctx.Data["uuid"] = form.Attachment ctx.Data["branch_name"] = form.BranchName + ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo return nil } @@ -954,6 +955,7 @@ func versionErrorDataPrepare(ctx *context.Context, form auth.CreateModelArtsTrai return err } ctx.Data["config_list"] = configList.ParaConfigs + ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo return nil } @@ -2175,6 +2177,7 @@ func inferenceJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModel ctx.Data["model_version"] = form.ModelVersion ctx.Data["ckpt_name"] = form.CkptName ctx.Data["train_url"] = form.TrainUrl + ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo return nil } diff --git a/routers/repo/setting.go b/routers/repo/setting.go index af28f3290..fed89513a 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -6,7 +6,6 @@ package repo import ( - "code.gitea.io/gitea/modules/notification" "errors" "fmt" "io/ioutil" @@ -15,6 +14,8 @@ import ( "strings" "time" + "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" @@ -477,16 +478,27 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) return } - - if err := repo_service.DeleteRepository(ctx.User, ctx.Repo.Repository); err != nil { - ctx.ServerError("DeleteRepository", err) + count, err := models.GetCloudbrainRunCountByRepoID(repo.ID) + if err != nil { + ctx.ServerError("GetCloudbrainCountByRepoID failed", err) return - } - log.Trace("Repository deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name) - go StopJobsByRepoID(repo.ID) + } else { + if count >= 1 { + ctx.Data["Err_RepoName"] = nil + ctx.Flash.Error(ctx.Tr("repo.settings.deletion_notice_cloudbrain")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + return + } + if err := repo_service.DeleteRepository(ctx.User, ctx.Repo.Repository); err != nil { + ctx.ServerError("DeleteRepository", err) + return + } + log.Trace("Repository deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name) + go StopJobsByRepoID(repo.ID) - ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success")) - ctx.Redirect(ctx.Repo.Owner.DashboardLink()) + ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success")) + ctx.Redirect(ctx.Repo.Owner.DashboardLink()) + } case "delete-wiki": if !ctx.Repo.IsOwner() { diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 4c3f5f472..7ba8fe61a 100755 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -323,10 +323,8 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("/dashboard", routers.Dashboard) go routers.SocketManager.Run() m.Get("/action/notification", routers.ActionNotification) - m.Get("/recommend/org", routers.RecommendOrgFromPromote) - m.Get("/recommend/repo", routers.RecommendRepoFromPromote) + m.Get("/recommend/home", routers.RecommendHomeInfo) m.Get("/recommend/userrank/:index", routers.GetUserRankFromPromote) - m.Get("/recommend/imageinfo", routers.GetImageInfoFromPromote) m.Post("/all/search/", routers.Search) m.Get("/all/search/", routers.EmptySearch) m.Get("/all/dosearch/", routers.SearchApi) diff --git a/services/repository/repository.go b/services/repository/repository.go index b9abbeb6f..80518b666 100644 --- a/services/repository/repository.go +++ b/services/repository/repository.go @@ -154,6 +154,12 @@ func GetRecommendRepoFromPromote(filename string) ([]map[string]interface{}, err } func RecommendFromPromote(url string) ([]string, error) { + defer func() { + if err := recover(); err != nil { + log.Info("not error.", err) + return + } + }() resp, err := http.Get(url) if err != nil || resp.StatusCode != 200 { log.Info("Get organizations url error=" + err.Error()) diff --git a/templates/custom/select_dataset.tmpl b/templates/custom/select_dataset.tmpl index befd186c5..d545f487e 100644 --- a/templates/custom/select_dataset.tmpl +++ b/templates/custom/select_dataset.tmpl @@ -1,138 +1,171 @@ - - +
{{if eq .cloudbraintype 0}} - + {{else}} {{end}} - {{.i18n.Tr "dataset.select_dataset"}} - -
- - -
- - - -
-
-
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
-
- - - - ${dataset.Description} -
-
-
- - - - 解压中 - - - - 解压失败 - -
+ + {{.i18n.Tr "dataset.select_dataset"}} + +
+
+ +
- - - - -
-
-
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
-
- - - - ${dataset.Description} + + + +
+
+
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
+
+ + + + ${dataset.Description} +
+
+
+ + + + 解压中 + + + + 解压失败 + +
+
+
+ +
+
+
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
+
+ + + + ${dataset.Description} +
+
+
+ + + + 解压中 + + + + 解压失败 + +
-
-
- - - - 解压中 - - - - 解压失败 - -
-
- - -
-
-
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
-
- - - - ${dataset.Description} + + +
+
+
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
+
+ + + + ${dataset.Description} +
+
+
+ + + + 解压中 + + + + 解压失败 + +
-
-
- - - - 解压中 - - - - 解压失败 - -
-
- - -
-
-
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
-
- - - - ${dataset.Description} + + +
+
+
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
+
+ + + + ${dataset.Description} +
+
+
+ + + + 解压中 + + + + 解压失败 + +
-
-
- - - - 解压中 - - - - 解压失败 - -
-
- - -
- - -
+ + +
+ + +
+
-
+
\ No newline at end of file diff --git a/templates/custom/select_dataset_train.tmpl b/templates/custom/select_dataset_train.tmpl index 28fce2490..f1d2abaf3 100644 --- a/templates/custom/select_dataset_train.tmpl +++ b/templates/custom/select_dataset_train.tmpl @@ -1,142 +1,179 @@ - - +
{{if or (.benchmarkMode) (.newInference)}} -       {{else}}{{.i18n.Tr "dataset.dataset"}}    {{end}} +       {{else}}{{.i18n.Tr "dataset.dataset"}}    {{end}} {{else}}     {{end}} - {{if .benchmarkMode}}{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}{{else}}{{.i18n.Tr "dataset.select_dataset"}}{{end}} + + {{if .benchmarkMode}}{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}{{else}}{{.i18n.Tr "dataset.select_dataset"}}{{end}} + {{if .benchmarkMode}} 说明:先使用数据集功能上传模型,然后从数据集列表选模型。 {{end}} - -
- - -
- - - -
-
-
${dataset.Repo.OwnerName}/${dataset.Repo.Alias} ${dataset.Name}
-
- - - - ${dataset.Description} -
-
-
- - - - 解压中 - - - - 解压失败 - -
+ +
+
+ +
- - {{if not .benchmarkMode}} - - -
-
-
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
-
- - - - ${dataset.Description} + + + +
+
+
${dataset.Repo.OwnerName}/${dataset.Repo.Alias} + ${dataset.Name} +
+
+ + + + ${dataset.Description} +
+
+
+ + + + 解压中 + + + + 解压失败 + +
-
-
- - - - 解压中 - - - - 解压失败 - -
-
- - -
-
-
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
-
- - - - ${dataset.Description} + {{if not .benchmarkMode}} + + +
+
+
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
+
+ + + + ${dataset.Description} +
+
+
+ + + + 解压中 + + + + 解压失败 + +
-
-
- - - - 解压中 - - - - 解压失败 - -
-
- - -
-
-
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
-
- - - - ${dataset.Description} + + +
+
+
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
+
+ + + + ${dataset.Description} +
+
+
+ + + + 解压中 + + + + 解压失败 + +
+
+ +
+ +
+
+
${dataset.Repo.OwnerName}/${dataset.Repo.Alias}${dataset.Name}
+
+ + + + ${dataset.Description} +
+
+
+ + + + 解压中 + + + + 解压失败 + +
-
-
- - - - 解压中 - - - - 解压失败 - -
-
- - {{end}} - -
- - -
+ + {{end}} + +
+ + +
+
-
+
\ No newline at end of file diff --git a/templates/explore/repo_right.tmpl b/templates/explore/repo_right.tmpl index 5e05e797b..cf0b7d349 100644 --- a/templates/explore/repo_right.tmpl +++ b/templates/explore/repo_right.tmpl @@ -1,4 +1,4 @@ - +