From 1dcfd55d23f6f15ec9a3d4c527a7de917ea32c96 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 27 Sep 2022 10:31:19 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/ai_model_manage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/ai_model_manage.go b/models/ai_model_manage.go index 87c291f85..557e7f9a5 100644 --- a/models/ai_model_manage.go +++ b/models/ai_model_manage.go @@ -291,7 +291,7 @@ func ModifyModelStatus(id string, modelSize int64, status int, modelPath string, var sess *xorm.Session sess = x.ID(id) defer sess.Close() - re, err := sess.Cols("size", "status", "path").Update(&AiModelManage{ + re, err := sess.Cols("size", "status", "path", "status_desc").Update(&AiModelManage{ Size: modelSize, Status: status, Path: modelPath, From 84f4ecf7be43857a12613b432efa26ca52ebaf38 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 27 Sep 2022 10:50:37 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E9=89=B4=E6=9D=83=EF=BC=8C=E5=8F=AA=E8=83=BD=E4=BD=9C=E8=80=85?= =?UTF-8?q?=E5=8F=8A=E7=AE=A1=E7=90=86=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/api/v1/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index ff029707b..f430460f6 100755 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -980,7 +980,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("", repo.GetModelArtsTrainJobVersion) m.Post("/stop_version", cloudbrain.AdminOrOwnerOrJobCreaterRightForTrain, repo_ext.GrampusStopJob) m.Get("/log", repo_ext.GrampusGetLog) - m.Get("/download_log", cloudbrain.AdminOrOwnerOrJobCreaterRightForTrain, repo_ext.GrampusDownloadLog) + m.Get("/download_log", cloudbrain.AdminOrJobCreaterRightForTrain, repo_ext.GrampusDownloadLog) }) }) }, reqRepoReader(models.UnitTypeCloudBrain)) From fbd13b530d0fdf57996ff5521f34e3c9c6ff43bc Mon Sep 17 00:00:00 2001 From: chenshihai Date: Tue, 27 Sep 2022 14:55:01 +0800 Subject: [PATCH 03/18] update copy action --- web_src/vuepages/langs/config/en-US.js | 3 ++- web_src/vuepages/langs/config/zh-CN.js | 1 + web_src/vuepages/pages/user/invite/index.vue | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web_src/vuepages/langs/config/en-US.js b/web_src/vuepages/langs/config/en-US.js index fdf6334d8..837bc30c0 100644 --- a/web_src/vuepages/langs/config/en-US.js +++ b/web_src/vuepages/langs/config/en-US.js @@ -162,7 +162,8 @@ const en = { inviteFriends: 'Invite Friends', inviteFriendsTips: 'Copy QR code or invite registration link to share with friends', clickToViewTheEventDetails: 'Click to view the event details', - copyRegistrationInvitationLink: 'Copy registration invitation link', + copyRegistrationInvitationLink: 'Copy registration invitation link', + registrationAdress: 'Registration Adress: ', recommender: 'Recommender: ', invitedFriends: 'Invited friends', registrationTime: 'Registration time', diff --git a/web_src/vuepages/langs/config/zh-CN.js b/web_src/vuepages/langs/config/zh-CN.js index 6f8a12561..a38e7fbb6 100644 --- a/web_src/vuepages/langs/config/zh-CN.js +++ b/web_src/vuepages/langs/config/zh-CN.js @@ -163,6 +163,7 @@ const zh = { inviteFriendsTips: '复制二维码或者邀请注册链接分享给好友', clickToViewTheEventDetails: '点击查看活动详情', copyRegistrationInvitationLink: '复制注册邀请链接', + registrationAdress: '注册地址:', recommender: '推荐人:', invitedFriends: '已邀请好友', registrationTime: '注册时间', diff --git a/web_src/vuepages/pages/user/invite/index.vue b/web_src/vuepages/pages/user/invite/index.vue index 6adf07721..d190b8a3f 100644 --- a/web_src/vuepages/pages/user/invite/index.vue +++ b/web_src/vuepages/pages/user/invite/index.vue @@ -19,7 +19,8 @@
{{ pageOpeniDesc }}
-
{{ invitationLink + invitationCode }}
+
{{ $t('user.registrationAdress') }}{{ invitationLink + invitationCode + }}
{{ $t('user.recommender') }}{{ invitationCode }}
{{ $t('user.copyRegistrationInvitationLink') }} @@ -47,7 +48,7 @@ @@ -98,7 +99,7 @@ export default { initCopy() { const clipboard = new Clipboard('.__copy_link_btn__', { text: () => { - return this.invitationLink + this.invitationCode; + return `${this.pageOpeniDesc}\n${this.$t('user.registrationAdress')}${this.invitationLink + this.invitationCode}\n${this.$t('user.recommender')}${this.invitationCode}`; }, }); clipboard.on('success', (e) => { From 0a86bbc6b0daa9ef31ff6a1e97c8d2aec3036c08 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 27 Sep 2022 15:29:26 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E8=BF=87=E6=BB=A4=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/ai_model_manage.go | 6 ++++++ routers/repo/ai_model_manage.go | 1 + 2 files changed, 7 insertions(+) diff --git a/models/ai_model_manage.go b/models/ai_model_manage.go index 557e7f9a5..a88da8fe5 100644 --- a/models/ai_model_manage.go +++ b/models/ai_model_manage.go @@ -374,6 +374,12 @@ func QueryModel(opts *AiModelQueryOptions) ([]*AiModelManage, int64, error) { ) } + if (opts.Status) >= 0 { + cond = cond.And( + builder.Eq{"ai_model_manage.status": opts.Status}, + ) + } + count, err := sess.Where(cond).Count(new(AiModelManage)) if err != nil { return nil, 0, fmt.Errorf("Count: %v", err) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 324377c0e..18ebfc050 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -851,6 +851,7 @@ func QueryModelListForPredict(ctx *context.Context) { RepoID: repoId, Type: ctx.QueryInt("type"), New: -1, + Status: 0, }) if err != nil { ctx.ServerError("Cloudbrain", err) From f3f7729fc225ca141e767ad5089fee16394d338b Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 27 Sep 2022 15:35:25 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_manage.go | 3 +++ routers/repo/modelarts.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 18ebfc050..957028fc6 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -348,6 +348,7 @@ func QueryModelByParameters(repoId int64, page int) ([]*models.AiModelManage, in RepoID: repoId, Type: -1, New: MODEL_LATEST, + Status: -1, }) } @@ -701,6 +702,7 @@ func SetModelCount(ctx *context.Context) { RepoID: repoId, Type: Type, New: MODEL_LATEST, + Status: -1, }) ctx.Data["MODEL_COUNT"] = count } @@ -774,6 +776,7 @@ func ShowModelPageInfo(ctx *context.Context) { RepoID: repoId, Type: Type, New: MODEL_LATEST, + Status: -1, }) if err != nil { ctx.ServerError("Cloudbrain", err) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 465442d50..5487231a2 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -1551,7 +1551,6 @@ func TrainJobCreateVersion(ctx *context.Context, form auth.CreateModelArtsTrainJ }) } - task, err := models.GetCloudbrainByJobIDAndVersionName(jobID, PreVersionName) if err != nil { log.Error("GetCloudbrainByJobIDAndVersionName(%s) failed:%v", jobID, err.Error()) @@ -2322,6 +2321,7 @@ func InferenceJobIndex(ctx *context.Context) { RepoID: repoId, Type: Type, New: MODEL_LATEST, + Status: 0, }) ctx.Data["MODEL_COUNT"] = model_count @@ -2402,6 +2402,7 @@ func inferenceJobNewDataPrepare(ctx *context.Context) error { RepoID: repoId, Type: Type, New: MODEL_LATEST, + Status: 0, }) ctx.Data["MODEL_COUNT"] = model_count ctx.Data["datasetType"] = models.TypeCloudBrainTwo From 8950d3d5fb5d1c3ccd1f18224107946b5bb79dbb Mon Sep 17 00:00:00 2001 From: chenshihai Date: Tue, 27 Sep 2022 18:42:58 +0800 Subject: [PATCH 06/18] update --- templates/user/profile.tmpl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 1f5cbe025..be6ecbaa0 100755 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -48,9 +48,10 @@ {{end}} {{end}} - {{if and .IsSigned (eq .SignedUserName .Owner.Name)}} +
  • - {{svg "octicon-clock" 16}} {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}} + {{svg "octicon-clock" 16}} {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}} + {{if and .IsSigned (eq .SignedUserName .Owner.Name)}} @@ -78,9 +79,9 @@ }); })(); + {{end}}
  • - {{end}} -
  • {{svg "octicon-clock" 16}} {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}}
  • + {{if and .Orgs .HasOrgsVisible}}
  • {{.i18n.Tr "organization"}}
  • From 9cf2fea915592d9a6c8d5dd07c0a8cf14727da0c Mon Sep 17 00:00:00 2001 From: chenshihai Date: Wed, 28 Sep 2022 08:54:02 +0800 Subject: [PATCH 07/18] update --- web_src/vuepages/langs/config/zh-CN.js | 2 +- web_src/vuepages/pages/user/invite/index.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web_src/vuepages/langs/config/zh-CN.js b/web_src/vuepages/langs/config/zh-CN.js index e391e14e7..e48e61e3a 100644 --- a/web_src/vuepages/langs/config/zh-CN.js +++ b/web_src/vuepages/langs/config/zh-CN.js @@ -166,7 +166,7 @@ const zh = { inviteFriends: '邀请好友', inviteFriendsTips: '复制二维码或者邀请注册链接分享给好友', clickToViewTheEventDetails: '点击查看活动详情', - copyRegistrationInvitationLink: '复制注册邀请链接', + copyRegistrationInvitationLink: '复制邀请注册链接', registrationAdress: '注册地址:', recommender: '推荐人:', invitedFriends: '已邀请好友', diff --git a/web_src/vuepages/pages/user/invite/index.vue b/web_src/vuepages/pages/user/invite/index.vue index d190b8a3f..37a39b8fe 100644 --- a/web_src/vuepages/pages/user/invite/index.vue +++ b/web_src/vuepages/pages/user/invite/index.vue @@ -22,7 +22,7 @@
    {{ $t('user.registrationAdress') }}{{ invitationLink + invitationCode }}
    {{ $t('user.recommender') }}{{ invitationCode }}
    - {{ $t('user.copyRegistrationInvitationLink') }} + {{ $t('user.copyRegistrationInvitationLink') }}
    @@ -31,7 +31,7 @@
    - +