From 394bfdd8a70dee03091d45fda7fbff1b6d3527ca Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Wed, 30 Nov 2022 18:06:18 +0800 Subject: [PATCH 001/102] #3169 update --- models/resource_specification.go | 93 ++++++++++++++++++++++ modules/grampus/grampus.go | 5 +- .../cloudbrain/resource/resource_specification.go | 48 +---------- 3 files changed, 96 insertions(+), 50 deletions(-) diff --git a/models/resource_specification.go b/models/resource_specification.go index 2f815818b..809a3496a 100644 --- a/models/resource_specification.go +++ b/models/resource_specification.go @@ -3,6 +3,7 @@ package models import ( "code.gitea.io/gitea/modules/timeutil" "fmt" + "strings" "xorm.io/builder" ) @@ -197,12 +198,104 @@ type Specification struct { AiCenterName string IsExclusive bool ExclusiveOrg string + //specs that have the same sourceSpecId, computeResource and cluster as current spec + RelatedSpecs []*Specification } func (Specification) TableName() string { return "resource_specification" } +func (s *Specification) loadRelatedSpecs() { + if s.RelatedSpecs != nil { + return + } + defaultSpecs := make([]*Specification, 0) + if s.SourceSpecId == "" { + s.RelatedSpecs = defaultSpecs + return + } + r, err := FindSpecs(FindSpecsOptions{ + ComputeResource: s.ComputeResource, + Cluster: s.Cluster, + SourceSpecId: s.SourceSpecId, + RequestAll: true, + SpecStatus: SpecOnShelf, + }) + if err != nil { + s.RelatedSpecs = defaultSpecs + return + } + s.RelatedSpecs = r +} +func (s *Specification) GetAvailableCenterIds(userIds ...int64) []string { + s.loadRelatedSpecs() + + if len(s.RelatedSpecs) == 0 { + return make([]string, 0) + } + + var uId int64 + if len(userIds) > 0 { + uId = userIds[0] + } + //filter exclusive specs + specs := FilterExclusiveSpecs(s.RelatedSpecs, uId) + + centerIds := make([]string, len(specs)) + for i, v := range specs { + centerIds[i] = v.AiCenterCode + } + return centerIds +} + +func FilterExclusiveSpecs(r []*Specification, userId int64) []*Specification { + if userId == 0 { + return r + } + specs := make([]*Specification, 0, len(r)) + specMap := make(map[int64]string, 0) + for i := 0; i < len(r); i++ { + spec := r[i] + if _, has := specMap[spec.ID]; has { + continue + } + if !spec.IsExclusive { + specs = append(specs, spec) + specMap[spec.ID] = "" + continue + } + orgs := strings.Split(spec.ExclusiveOrg, ";") + for _, org := range orgs { + isMember, _ := IsOrganizationMemberByOrgName(org, userId) + if isMember { + specs = append(specs, spec) + specMap[spec.ID] = "" + break + } + } + } + return specs +} + +func DistinctSpecs(r []*Specification) []*Specification { + specs := make([]*Specification, 0, len(r)) + sourceSpecIdMap := make(map[string]string, 0) + for i := 0; i < len(r); i++ { + spec := r[i] + if spec.SourceSpecId == "" { + specs = append(specs, spec) + continue + } + if _, has := sourceSpecIdMap[spec.SourceSpecId]; has { + continue + } + specs = append(specs, spec) + sourceSpecIdMap[spec.SourceSpecId] = "" + } + return specs +} + func InsertResourceSpecification(r ResourceSpecification) (int64, error) { return x.Insert(&r) } diff --git a/modules/grampus/grampus.go b/modules/grampus/grampus.go index b6f62560a..6b2ea6288 100755 --- a/modules/grampus/grampus.go +++ b/modules/grampus/grampus.go @@ -105,8 +105,6 @@ func getDatasetGrampus(datasetInfos map[string]models.DatasetInfo) []models.Gram func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId string, err error) { createTime := timeutil.TimeStampNow() - centerID, centerName := getCentersParamter(ctx, req) - var datasetGrampus, modelGrampus []models.GrampusDataset var codeGrampus models.GrampusDataset if ProcessorTypeNPU == req.ProcessType { @@ -138,8 +136,7 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (jobId str ResourceSpecId: req.Spec.SourceSpecId, ImageId: req.ImageId, ImageUrl: req.ImageUrl, - CenterID: centerID, - CenterName: centerName, + CenterID: req.Spec.GetAvailableCenterIds(ctx.User.ID), ReplicaNum: 1, Datasets: datasetGrampus, Models: modelGrampus, diff --git a/services/cloudbrain/resource/resource_specification.go b/services/cloudbrain/resource/resource_specification.go index 8f4182d87..5070d7c1e 100644 --- a/services/cloudbrain/resource/resource_specification.go +++ b/services/cloudbrain/resource/resource_specification.go @@ -246,10 +246,10 @@ func FindAvailableSpecs(userId int64, opts models.FindSpecsOptions) ([]*models.S return nil, err } //filter exclusive specs - specs := filterExclusiveSpecs(r, userId) + specs := models.FilterExclusiveSpecs(r, userId) //distinct by sourceSpecId - specs = distinctSpecs(specs) + specs = models.DistinctSpecs(specs) return specs, err } @@ -265,50 +265,6 @@ func FindAvailableSpecs4Show(userId int64, opts models.FindSpecsOptions) ([]*api return result, nil } -func filterExclusiveSpecs(r []*models.Specification, userId int64) []*models.Specification { - specs := make([]*models.Specification, 0, len(r)) - specMap := make(map[int64]string, 0) - for i := 0; i < len(r); i++ { - spec := r[i] - if _, has := specMap[spec.ID]; has { - continue - } - if !spec.IsExclusive { - specs = append(specs, spec) - specMap[spec.ID] = "" - continue - } - orgs := strings.Split(spec.ExclusiveOrg, ";") - for _, org := range orgs { - isMember, _ := models.IsOrganizationMemberByOrgName(org, userId) - if isMember { - specs = append(specs, spec) - specMap[spec.ID] = "" - break - } - } - } - return specs -} - -func distinctSpecs(r []*models.Specification) []*models.Specification { - specs := make([]*models.Specification, 0, len(r)) - sourceSpecIdMap := make(map[string]string, 0) - for i := 0; i < len(r); i++ { - spec := r[i] - if spec.SourceSpecId == "" { - specs = append(specs, spec) - continue - } - if _, has := sourceSpecIdMap[spec.SourceSpecId]; has { - continue - } - specs = append(specs, spec) - sourceSpecIdMap[spec.SourceSpecId] = "" - } - return specs -} - func GetAndCheckSpec(userId int64, specId int64, opts models.FindSpecsOptions) (*models.Specification, error) { if specId == 0 { return nil, nil From 3c60550adb68bfcfb1e5df0ea6920aa0e344bd4a Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 1 Dec 2022 16:13:26 +0800 Subject: [PATCH 002/102] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=85=AC=E6=9C=89?= =?UTF-8?q?=E7=A7=81=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/ai_model_manage.go | 1 + models/user_analysis_for_activity.go | 9 +++++++++ routers/api/v1/api.go | 1 + routers/repo/ai_model_manage.go | 5 ++++- routers/repo/user_data_analysis.go | 6 ++++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/models/ai_model_manage.go b/models/ai_model_manage.go index 5b14b9ba2..3083c4266 100644 --- a/models/ai_model_manage.go +++ b/models/ai_model_manage.go @@ -33,6 +33,7 @@ type AiModelManage struct { CodeBranch string `xorm:"varchar(400) NULL" json:"codeBranch"` CodeCommitID string `xorm:"NULL" json:"codeCommitID"` UserId int64 `xorm:"NOT NULL" json:"userId"` + IsPrivate bool `xorm:"DEFAULT false" json:"isPrivate"` UserName string `json:"userName"` UserRelAvatarLink string `json:"userRelAvatarLink"` TrainTaskInfo string `xorm:"text NULL" json:"trainTaskInfo"` diff --git a/models/user_analysis_for_activity.go b/models/user_analysis_for_activity.go index 2066697d2..f52b127c6 100644 --- a/models/user_analysis_for_activity.go +++ b/models/user_analysis_for_activity.go @@ -449,3 +449,12 @@ func QueryUserLoginInfo(userIds []int64) []*UserLoginLog { return loginList } + +func QueryUserAnnualReport(userId int64) *UserSummaryCurrentYear { + statictisSess := xStatistic.NewSession() + defer statictisSess.Close() + var re *UserSummaryCurrentYear + statictisSess.ID(userId).Get(re) + + return re +} diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 14badfdb4..a6e0eb737 100755 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -610,6 +610,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("/query_invitation_yesterday", operationReq, repo_ext.QueryInvitationYesterday) m.Get("/query_invitation_all", operationReq, repo_ext.QueryInvitationAll) m.Get("/query_invitation_userdefine", operationReq, repo_ext.QueryUserDefineInvitationPage) + m.Get("/query_user_annual_report", repo_ext.QueryUserAnnualReport) m.Get("/download_invitation_detail", operationReq, repo_ext.DownloadInvitationDetail) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 7eedb9bc4..d93905d7c 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -93,7 +93,7 @@ func saveModelByParameters(jobId string, versionName string, name string, versio log.Info("accuracyJson=" + string(accuracyJson)) aiTask.ContainerIp = "" aiTaskJson, _ := json.Marshal(aiTask) - + isPrivate := ctx.QueryBool("isPrivate") model := &models.AiModelManage{ ID: id, Version: version, @@ -114,6 +114,7 @@ func saveModelByParameters(jobId string, versionName string, name string, versio TrainTaskInfo: string(aiTaskJson), Accuracy: string(accuracyJson), Status: STATUS_COPY_MODEL, + IsPrivate: isPrivate, } err = models.SaveModelToDb(model) @@ -216,6 +217,7 @@ func SaveLocalModel(ctx *context.Context) { description := ctx.Query("description") engine := ctx.QueryInt("engine") taskType := ctx.QueryInt("type") + isPrivate := ctx.QueryBool("isPrivate") modelActualPath := "" if taskType == models.TypeCloudBrainOne { destKeyNamePrefix := Model_prefix + models.AttachmentRelativePath(id) + "/" @@ -262,6 +264,7 @@ func SaveLocalModel(ctx *context.Context) { TrainTaskInfo: "", Accuracy: "", Status: STATUS_FINISHED, + IsPrivate: isPrivate, } err := models.SaveModelToDb(model) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index 508addf75..a6de283a4 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -907,3 +907,9 @@ func QueryUserLoginInfo(ctx *context.Context) { log.Info("writer exel error." + err.Error()) } } + +func QueryUserAnnualReport(ctx *context.Context) { + log.Info("start to QueryUserAnnualReport ") + result := models.QueryUserAnnualReport(ctx.User.ID) + ctx.JSON(http.StatusOK, result) +} From 7e98e054414db4a3022f07549e0076197d6b47ce Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 1 Dec 2022 16:28:21 +0800 Subject: [PATCH 003/102] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=85=AC=E5=BC=80=E5=8F=8A=E7=A7=81=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- .../pages/modelmanage/local/modelmanage-local-create-1.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index fefcf4114..c46fe55c6 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -85,6 +85,15 @@ :placeholder="$t('modelManage.modelLabelInputTips')" @input="labelInput"> +
+
+
+ + 公开 + 私有 + +
+
@@ -93,6 +102,8 @@
+ +
@@ -220,6 +231,7 @@ export default { this.state.engine = data.engine.toString(); this.state.label = data.label; this.state.description = data.description; + this.state.isPrivate = data.isPrivate; } }).catch(err => { this.loading = false; From 3128e9d67e8a12210d26c61a7af066fd3a41e57d Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 1 Dec 2022 16:31:51 +0800 Subject: [PATCH 004/102] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=85=AC=E5=BC=80=E5=8F=8A=E7=A7=81=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- .../vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index c46fe55c6..b0876b8ac 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -85,6 +85,7 @@ :placeholder="$t('modelManage.modelLabelInputTips')" @input="labelInput">
+
@@ -92,6 +93,7 @@ 公开 私有 +
@@ -103,7 +105,6 @@
-
From c311bad561c7821f3aaf5b7e12007e1f537f2597 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 1 Dec 2022 16:38:01 +0800 Subject: [PATCH 005/102] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=85=AC=E5=BC=80=E5=8F=8A=E7=A7=81=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index b0876b8ac..b3c45ff01 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -157,6 +157,7 @@ export default { const hasEndSpace = this.state.label[this.state.label.length - 1] == ' '; const list = this.state.label.trim().split(' ').filter(label => label != ''); this.state.label = list.slice(0, MAX_LABEL_COUNT).join(' ') + (hasEndSpace && list.length < MAX_LABEL_COUNT ? ' ' : ''); + this.state.isPrivate = false; }, submit() { if (!this.checkName()) { From 6fbdfdbd73aaed468a711560f1571ae02de7e694 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 1 Dec 2022 16:43:03 +0800 Subject: [PATCH 006/102] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=85=AC=E5=BC=80=E5=8F=8A=E7=A7=81=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- .../vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index b3c45ff01..2c3ec062b 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -90,8 +90,8 @@
- 公开 - 私有 + 公开 + 私有
@@ -157,7 +157,7 @@ export default { const hasEndSpace = this.state.label[this.state.label.length - 1] == ' '; const list = this.state.label.trim().split(' ').filter(label => label != ''); this.state.label = list.slice(0, MAX_LABEL_COUNT).join(' ') + (hasEndSpace && list.length < MAX_LABEL_COUNT ? ' ' : ''); - this.state.isPrivate = false; + this.state.isPrivate = "false"; }, submit() { if (!this.checkName()) { From 0cbbf90f9de9cbeec95d7d076882acda032dc673 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 1 Dec 2022 16:55:12 +0800 Subject: [PATCH 007/102] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=85=AC=E5=BC=80=E5=8F=8A=E7=A7=81=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- .../pages/modelmanage/local/modelmanage-local-create-1.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index 2c3ec062b..b8fb9058e 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -90,8 +90,8 @@
- 公开 - 私有 + 公开 + 私有
@@ -141,6 +141,7 @@ export default { engine: '0', label: '', description: '', + isPrivate : 'false', }, nameErr: false, isShowVersion: false, @@ -157,7 +158,7 @@ export default { const hasEndSpace = this.state.label[this.state.label.length - 1] == ' '; const list = this.state.label.trim().split(' ').filter(label => label != ''); this.state.label = list.slice(0, MAX_LABEL_COUNT).join(' ') + (hasEndSpace && list.length < MAX_LABEL_COUNT ? ' ' : ''); - this.state.isPrivate = "false"; + }, submit() { if (!this.checkName()) { From 00a4b5cb405826229dbc32497102dff7cc72119d Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 1 Dec 2022 17:30:06 +0800 Subject: [PATCH 008/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- web_src/vuepages/langs/config/en-US.js | 1 + web_src/vuepages/langs/config/zh-CN.js | 1 + 2 files changed, 2 insertions(+) diff --git a/web_src/vuepages/langs/config/en-US.js b/web_src/vuepages/langs/config/en-US.js index 0488d682d..c943bf619 100644 --- a/web_src/vuepages/langs/config/en-US.js +++ b/web_src/vuepages/langs/config/en-US.js @@ -281,6 +281,7 @@ const en = { infoModificationFailed: 'Information modify failed', deleteModelFileConfirmTips: 'Are you sure you want to delete the current model file?', modelFileDeleteFailed: 'Model file delete failed', + isPrivate:'Model Access', }, } diff --git a/web_src/vuepages/langs/config/zh-CN.js b/web_src/vuepages/langs/config/zh-CN.js index 1d915749e..3190d0a65 100644 --- a/web_src/vuepages/langs/config/zh-CN.js +++ b/web_src/vuepages/langs/config/zh-CN.js @@ -282,6 +282,7 @@ const zh = { infoModificationFailed: '信息修改失败', deleteModelFileConfirmTips: '请确认是否删除当前模型文件?', modelFileDeleteFailed: '模型文件删除失败', + isPrivate:'模型权限', }, }; From 74019d17a96ee020ba785cfd912e57ff7b3855c7 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 1 Dec 2022 17:31:26 +0800 Subject: [PATCH 009/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- .../pages/modelmanage/common/modelmanage-common-detail.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue b/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue index d78a4cfec..565a27bbf 100644 --- a/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue +++ b/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue @@ -51,6 +51,12 @@ +
+
{{ $t('modelManage.isPrivate') }}:
+
+
{{ state.isPrivate }}
+
+
@@ -298,6 +304,7 @@ export default { this.state._label = data.label; this.state.description = data.description || '--'; this.state._description = data.description; + this.state.isPrivate= data.isPrivate.toString(); this.state.createTime = formatDate(new Date(data.createdUnix * 1000), 'yyyy-MM-dd HH:mm:ss'); const trainTaskInfo = data.trainTaskInfo ? JSON.parse(data.trainTaskInfo) : ''; From fdf9015c37ba280ea917fd8ea6b55f11936b2671 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 1 Dec 2022 17:41:24 +0800 Subject: [PATCH 010/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue b/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue index 565a27bbf..5c8b419f9 100644 --- a/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue +++ b/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue @@ -304,7 +304,7 @@ export default { this.state._label = data.label; this.state.description = data.description || '--'; this.state._description = data.description; - this.state.isPrivate= data.isPrivate.toString(); + this.state.isPrivate= data.isPrivate == true ? '私有':'公开' this.state.createTime = formatDate(new Date(data.createdUnix * 1000), 'yyyy-MM-dd HH:mm:ss'); const trainTaskInfo = data.trainTaskInfo ? JSON.parse(data.trainTaskInfo) : ''; From c713101fea0a5eab70bf7d54f58f3b76ddd68e2d Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 2 Dec 2022 10:08:30 +0800 Subject: [PATCH 011/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/modelmanage/index.tmpl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/templates/repo/modelmanage/index.tmpl b/templates/repo/modelmanage/index.tmpl index 44cc5d8cc..186d5bbd5 100644 --- a/templates/repo/modelmanage/index.tmpl +++ b/templates/repo/modelmanage/index.tmpl @@ -235,6 +235,23 @@
+
+ +
+
+
+ + +
+
+
+
+ + +
+
+
+
From 881de9b7ae303f417010b478afd360febdca49c4 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 2 Dec 2022 10:13:23 +0800 Subject: [PATCH 012/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/modelmanage/create_online.tmpl | 17 +++++++++++++++++ templates/repo/modelmanage/index.tmpl | 18 +----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/templates/repo/modelmanage/create_online.tmpl b/templates/repo/modelmanage/create_online.tmpl index 32503d1f0..26c3a4d31 100644 --- a/templates/repo/modelmanage/create_online.tmpl +++ b/templates/repo/modelmanage/create_online.tmpl @@ -136,6 +136,23 @@
+
+ +
+
+
+ + +
+
+
+
+ + +
+
+
+
diff --git a/templates/repo/modelmanage/index.tmpl b/templates/repo/modelmanage/index.tmpl index 186d5bbd5..ebc4b5ca1 100644 --- a/templates/repo/modelmanage/index.tmpl +++ b/templates/repo/modelmanage/index.tmpl @@ -234,23 +234,7 @@
-
-
- -
-
-
- - -
-
-
-
- - -
-
-
+
From 4e964a5d992b04ce54a5c1cdddf876e403c08538 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 2 Dec 2022 10:16:27 +0800 Subject: [PATCH 013/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/modelmanage/create_online.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/modelmanage/create_online.tmpl b/templates/repo/modelmanage/create_online.tmpl index 26c3a4d31..dea8ab86d 100644 --- a/templates/repo/modelmanage/create_online.tmpl +++ b/templates/repo/modelmanage/create_online.tmpl @@ -137,7 +137,7 @@
- +
From c7740cf23f261870e31620eba551a0184370dd7e Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 2 Dec 2022 10:23:53 +0800 Subject: [PATCH 014/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- .../modelmanage/local/modelmanage-local-create-1.vue | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index b8fb9058e..5ea2ff23a 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -88,12 +88,20 @@
-
- - 公开 - 私有 - +
+
+ + +
+
+
+
+ + +
+ +
From 39a0bd8ba28a0acba6386c5d705e92fafee14ff9 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 2 Dec 2022 10:31:54 +0800 Subject: [PATCH 015/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- .../vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index 5ea2ff23a..baecf0bff 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -95,6 +95,9 @@
+ +
+
From b2c8137721a5085c813862a8ec4991edb7719a43 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 2 Dec 2022 10:47:56 +0800 Subject: [PATCH 016/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/modelmanage/create_online.tmpl | 4 ++-- .../pages/modelmanage/local/modelmanage-local-create-1.vue | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/templates/repo/modelmanage/create_online.tmpl b/templates/repo/modelmanage/create_online.tmpl index dea8ab86d..7169e2d7c 100644 --- a/templates/repo/modelmanage/create_online.tmpl +++ b/templates/repo/modelmanage/create_online.tmpl @@ -141,13 +141,13 @@
- +
- +
diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index baecf0bff..ebae767e1 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -90,16 +90,16 @@
- +
- +
- +
@@ -179,6 +179,12 @@ export default { // }); return; } + var radio = document.getElementsByName("isPrivate"); + for (i=0; i Date: Fri, 2 Dec 2022 10:54:05 +0800 Subject: [PATCH 017/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index ebae767e1..21560e724 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -180,7 +180,7 @@ export default { return; } var radio = document.getElementsByName("isPrivate"); - for (i=0; i Date: Fri, 2 Dec 2022 11:13:09 +0800 Subject: [PATCH 018/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/cron/tasks_basic.go | 17 ++++++- modules/setting/setting.go | 5 ++ services/cloudbrain/clear.go | 108 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 services/cloudbrain/clear.go diff --git a/modules/cron/tasks_basic.go b/modules/cron/tasks_basic.go index 985a82cdb..9b74c1637 100755 --- a/modules/cron/tasks_basic.go +++ b/modules/cron/tasks_basic.go @@ -5,10 +5,12 @@ package cron import ( - "code.gitea.io/gitea/modules/urfs_client/urchin" "context" "time" + "code.gitea.io/gitea/modules/urfs_client/urchin" + cloudbrainService "code.gitea.io/gitea/services/cloudbrain" + "code.gitea.io/gitea/modules/modelarts" "code.gitea.io/gitea/services/cloudbrain/resource" "code.gitea.io/gitea/services/reward" @@ -190,6 +192,17 @@ func registerHandleRepoAndUserStatistic() { }) } +func registerHandleClearCloudbrainResult() { + RegisterTaskFatal("handle_cloudbrain_one_result_clear", &BaseConfig{ + Enabled: true, + RunAtStart: false, + Schedule: "* 0,30 2-8 * * ? *", + }, func(ctx context.Context, _ *models.User, _ Config) error { + cloudbrainService.ClearCloudbrainResultSpace() + return nil + }) +} + func registerHandleSummaryStatistic() { RegisterTaskFatal("handle_summary_statistic", &BaseConfig{ Enabled: true, @@ -317,6 +330,6 @@ func initBasicTasks() { registerHandleModelSafetyTask() - registerHandleScheduleRecord() + registerHandleScheduleRecord() registerHandleCloudbrainDurationStatistic() } diff --git a/modules/setting/setting.go b/modules/setting/setting.go index a473dad6a..2b2ded678 100755 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -518,6 +518,8 @@ var ( MaxDatasetNum int CullIdleTimeout string CullInterval string + ResultSaveDays int64 + ResultBatchSize int //benchmark config IsBenchmarkEnabled bool @@ -1480,6 +1482,9 @@ func NewContext() { CullIdleTimeout = sec.Key("CULL_IDLE_TIMEOUT").MustString("900") CullInterval = sec.Key("CULL_INTERVAL").MustString("60") + ResultSaveDays = sec.Key("RESULT_SAVE_DAYS").MustInt64(30) + ResultBatchSize = sec.Key("BATCH_SIZE").MustInt(500) + sec = Cfg.Section("benchmark") IsBenchmarkEnabled = sec.Key("ENABLED").MustBool(false) BenchmarkOwner = sec.Key("OWNER").MustString("") diff --git a/services/cloudbrain/clear.go b/services/cloudbrain/clear.go new file mode 100644 index 000000000..52e5c5cf1 --- /dev/null +++ b/services/cloudbrain/clear.go @@ -0,0 +1,108 @@ +package cloudbrain + +import ( + "io/ioutil" + "os" + "sort" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" +) + +func ClearCloudbrainResultSpace() { + + tasks, err := models.GetCloudBrainOneStoppedJobDaysAgo(setting.ResultSaveDays, setting.ResultBatchSize) + + if err != nil { + log.Warn("Failed to get cloudbrain, clear result failed.", err) + return + } + var ids []int64 + for _, task := range tasks { + err := DeleteCloudbrainOneJobStorage(task.JobName) + if err == nil { + ids = append(ids, task.ID) + } + } + + err = models.UpdateCloudBrainRecordsCleared(ids) + if err != nil { + log.Warn("Failed to set cloudbrain cleared status", err) + } + if len(tasks) < setting.ResultBatchSize { //云脑表处理完了,处理历史垃圾数据,如果存在 + files, err := ioutil.ReadDir(setting.JobPath) + if err != nil { + log.Warn("Can not browser local job path.") + } else { + SortModTimeAscend(files) + for _, file := range files { + //清理4个月前的任务 + if file.ModTime().Before(time.Now().AddDate(0, -4, 0)) { + //os.RemoveAll(setting.JobPath + file.Name()) + } else { + break + } + } + + } + + minioFiles, err := storage.GetAllObjectByBucketAndPrefixMinio(setting.Attachment.Minio.Bucket, setting.CBCodePathPrefix) + + if err != nil { + log.Warn("Can not browser minio job path.") + } else { + SortModTimeAscendForMinio(minioFiles) + for _, file := range minioFiles { + //清理4个月前的任务 + timeConvert, err := time.Parse("2006-01-02 15:04:05", file.ModTime) + if err == nil && timeConvert.Before(time.Now().AddDate(0, -4, 0)) { + dirPath := setting.CBCodePathPrefix + file.FileName + "/" + log.Info(dirPath) + //storage.Attachments.DeleteDir(dirPath) + } else { + break + } + } + + } + + } + +} + +func SortModTimeAscend(files []os.FileInfo) { + sort.Slice(files, func(i, j int) bool { + return files[i].ModTime().Before(files[j].ModTime()) + }) +} +func SortModTimeAscendForMinio(files []storage.FileInfo) { + sort.Slice(files, func(i, j int) bool { + timeI, _ := time.Parse("2006-01-02 15:04:05", files[i].ModTime) + timeJ, _ := time.Parse("2006-01-02 15:04:05", files[i].ModTime) + return timeI.Before(timeJ) + }) +} + +func DeleteCloudbrainOneJobStorage(jobName string) error { + //delete local + localJobPath := setting.JobPath + jobName + err := os.RemoveAll(localJobPath) + if err != nil { + log.Error("RemoveAll(%s) failed:%v", localJobPath, err) + } + + dirPath := setting.CBCodePathPrefix + jobName + "/" + err1 := storage.Attachments.DeleteDir(dirPath) + + if err1 != nil { + log.Error("DeleteDir(%s) failed:%v", localJobPath, err) + } + if err == nil { + err = err1 + } + + return err +} From 9b565469d1d02ce020cfd4a7a36159ae32080198 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Fri, 2 Dec 2022 11:19:55 +0800 Subject: [PATCH 019/102] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/cloudbrain.go | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/models/cloudbrain.go b/models/cloudbrain.go index 1e7c702ab..e492d9eb9 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -2050,6 +2050,64 @@ func GetCloudBrainUnStoppedJob() ([]*Cloudbrain, error) { Find(&cloudbrains) } +func GetCloudBrainOneStoppedJobDaysAgo(days int64, limit int) ([]*Cloudbrain, error) { + cloudbrains := make([]*Cloudbrain, 0, 10) + endTimeBefore := time.Now().Unix() - days*24*3600 + missEndTimeBefore := endTimeBefore - 24*3600 + return cloudbrains, x.Cols("id,job_name,job_id"). + In("status", + JobStopped, JobSucceeded, JobFailed, ModelArtsCreateFailed, ModelArtsStartFailed, ModelArtsUnavailable, ModelArtsResizFailed, ModelArtsDeleted, + ModelArtsStopped, ModelArtsTrainJobCanceled, ModelArtsTrainJobCheckFailed, ModelArtsTrainJobCompleted, ModelArtsTrainJobDeleteFailed, ModelArtsTrainJobDeployServiceFailed, + ModelArtsTrainJobFailed, ModelArtsTrainJobImageFailed, ModelArtsTrainJobKilled, ModelArtsTrainJobLost, ModelArtsTrainJobSubmitFailed, ModelArtsTrainJobSubmitModelFailed). + Where("((end_time is null and created_unix 0 { + idsIn := "" + for i, id := range tempIds { + if i == 0 { + idsIn += strconv.FormatInt(id, 10) + } else { + idsIn += "," + strconv.FormatInt(id, 10) + } + } + _, errTemp := x.Exec("update cloudbrain set cleared=true where id in (?)", ids) + if errTemp != nil { + err = errTemp + } + + } + + } + return err + +} + +func getPageIds(ids []int64, page int, pagesize int) []int64 { + begin := (page - 1) * pagesize + end := (page) * pagesize + + if begin > len(ids)-1 { + return []int64{} + } + if end > len(ids)-1 { + return ids[begin:] + } else { + return ids[begin:end] + } + +} + func GetStoppedJobWithNoDurationJob() ([]*Cloudbrain, error) { cloudbrains := make([]*Cloudbrain, 0) return cloudbrains, x. From 9594ada81674f8f4d2a15f651f27f9bcf96dfbba Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 2 Dec 2022 11:39:51 +0800 Subject: [PATCH 020/102] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 5 +++++ options/locale/locale_zh-CN.ini | 5 +++++ templates/repo/modelmanage/create_online.tmpl | 6 +++--- web_src/vuepages/langs/config/en-US.js | 4 +++- .../vuepages/pages/modelmanage/common/modelmanage-common-detail.vue | 2 +- .../vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue | 6 +++--- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 647bdb1ad..bcb170f7a 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1305,6 +1305,11 @@ model.manage.select.engine=Select model engine model.manage.modelfile=Model file model.manage.modellabel=Model label model.manage.modeldesc=Model description +model.manage.modelaccess=Model Access +model.manage.modelaccess.public=Public +model.manage.modelaccess.private=Private +model.manage.modelaccess.setpublic=Set Public +model.manage.modelaccess.setprivate=Set Private model.manage.baseinfo=Base Information modelconvert.notcreate=No model conversion task has been created. modelconvert.importfirst1=Please import the diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 8f9e6b664..d014878c2 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -1318,6 +1318,11 @@ model.manage.select.engine=选择模型框架 model.manage.modelfile=模型文件 model.manage.modellabel=模型标签 model.manage.modeldesc=模型描述 +model.manage.modelaccess=模型权限 +model.manage.modelaccess.public=公开 +model.manage.modelaccess.private=私有 +model.manage.modelaccess.setpublic=设为公开 +model.manage.modelaccess.setprivate=设为私有 model.manage.baseinfo=基本信息 modelconvert.notcreate=未创建过模型转换任务 modelconvert.importfirst1=请您先导入 diff --git a/templates/repo/modelmanage/create_online.tmpl b/templates/repo/modelmanage/create_online.tmpl index 7169e2d7c..968f82fc3 100644 --- a/templates/repo/modelmanage/create_online.tmpl +++ b/templates/repo/modelmanage/create_online.tmpl @@ -137,18 +137,18 @@
- +
- +
- +
diff --git a/web_src/vuepages/langs/config/en-US.js b/web_src/vuepages/langs/config/en-US.js index c943bf619..9eda16e0a 100644 --- a/web_src/vuepages/langs/config/en-US.js +++ b/web_src/vuepages/langs/config/en-US.js @@ -281,7 +281,9 @@ const en = { infoModificationFailed: 'Information modify failed', deleteModelFileConfirmTips: 'Are you sure you want to delete the current model file?', modelFileDeleteFailed: 'Model file delete failed', - isPrivate:'Model Access', + modelAccess:'Model Access', + modelAccessPublic:'Public', + modelAccessPrivate:'Private', }, } diff --git a/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue b/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue index 5c8b419f9..debc924fd 100644 --- a/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue +++ b/web_src/vuepages/pages/modelmanage/common/modelmanage-common-detail.vue @@ -304,7 +304,7 @@ export default { this.state._label = data.label; this.state.description = data.description || '--'; this.state._description = data.description; - this.state.isPrivate= data.isPrivate == true ? '私有':'公开' + this.state.isPrivate= (data.isPrivate == true ? this.$t('modelManage.modelAccessPrivate'):this.$t('modelManage.modelAccessPublic')); this.state.createTime = formatDate(new Date(data.createdUnix * 1000), 'yyyy-MM-dd HH:mm:ss'); const trainTaskInfo = data.trainTaskInfo ? JSON.parse(data.trainTaskInfo) : ''; diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue index 21560e724..eded627ca 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue @@ -87,11 +87,11 @@
-
+
- +
@@ -100,7 +100,7 @@
- +
From 0d4fd900299b4830c0d028594d0112b2fccecbc2 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 2 Dec 2022 11:45:03 +0800 Subject: [PATCH 021/102] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- web_src/vuepages/langs/config/zh-CN.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_src/vuepages/langs/config/zh-CN.js b/web_src/vuepages/langs/config/zh-CN.js index 3190d0a65..355f972c9 100644 --- a/web_src/vuepages/langs/config/zh-CN.js +++ b/web_src/vuepages/langs/config/zh-CN.js @@ -282,7 +282,9 @@ const zh = { infoModificationFailed: '信息修改失败', deleteModelFileConfirmTips: '请确认是否删除当前模型文件?', modelFileDeleteFailed: '模型文件删除失败', - isPrivate:'模型权限', + modelAccess:'模型权限', + modelAccessPublic:'公开', + modelAccessPrivate:'私有', }, }; From 6e0d31720fc2d5ee46d1f4b4c2974c4a71d740c0 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 2 Dec 2022 11:51:48 +0800 Subject: [PATCH 022/102] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/trainjob/show.tmpl | 17 +++++++++++++++++ templates/repo/modelarts/trainjob/show.tmpl | 17 +++++++++++++++++ .../modelmanage/common/modelmanage-common-detail.vue | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/templates/repo/cloudbrain/trainjob/show.tmpl b/templates/repo/cloudbrain/trainjob/show.tmpl index 69bec19e7..8b788e17c 100644 --- a/templates/repo/cloudbrain/trainjob/show.tmpl +++ b/templates/repo/cloudbrain/trainjob/show.tmpl @@ -647,6 +647,23 @@
+
+
+ +
+
+
+ + +
+
+
+
+ + +
+
+