From b00431ea07cf0cedfb6b26660d3669a92afc91f8 Mon Sep 17 00:00:00 2001 From: linfengjun Date: Tue, 23 Aug 2022 11:26:23 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E8=AE=AD=E7=BB=83=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=AE=97=E6=B3=95=E5=88=B0/code=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=EF=BC=8C=E5=85=81=E8=AE=B8=E5=8F=AF=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/service/trainjob/train_job.go | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/server/base-server/internal/service/trainjob/train_job.go b/server/base-server/internal/service/trainjob/train_job.go index a4020da0..ff12774d 100644 --- a/server/base-server/internal/service/trainjob/train_job.go +++ b/server/base-server/internal/service/trainjob/train_job.go @@ -32,6 +32,7 @@ const ( k8sTaskNamePrefix = "task" NoDistributedJobNum = 1 shmResource = "shm" + readonlyCodeDir = "/readonlycode" ) type trainJobService struct { @@ -164,8 +165,11 @@ func (s *trainJobService) TrainJob(ctx context.Context, req *api.TrainJobRequest return &api.TrainJobReply{JobId: trainJobId}, nil } -func (s *trainJobService) buildCmd(config *model.Config) []string { - cmd := fmt.Sprintf("cd %s;%s ", s.conf.Service.DockerCodePath, config.Command) +func (s *trainJobService) buildCmd(job *model.TrainJob, config *model.Config) []string { + cmd := config.Command + if job.AlgorithmId != "" { + cmd = fmt.Sprintf("cp -r %s/* %s;cd %s;%s ", readonlyCodeDir, s.conf.Service.DockerCodePath, s.conf.Service.DockerCodePath, config.Command) + } if len(config.Parameters) == 0 { return []string{"sh", "-c", cmd} } else { @@ -513,7 +517,7 @@ func (s *trainJobService) submitJob(ctx context.Context, job *model.TrainJob, st volumeMounts := []v1.VolumeMount{ { Name: "data", - MountPath: s.conf.Service.DockerCodePath, + MountPath: readonlyCodeDir, SubPath: startJobInfo.algorithmPath, ReadOnly: true, }, @@ -539,6 +543,11 @@ func (s *trainJobService) submitJob(ctx context.Context, job *model.TrainJob, st Name: "localtime", MountPath: "/etc/localtime", }, + { + Name: "code", + MountPath: s.conf.Service.DockerCodePath, + ReadOnly: false, + }, } volumes := []v1.Volume{ @@ -557,6 +566,11 @@ func (s *trainJobService) submitJob(ctx context.Context, job *model.TrainJob, st Path: "/etc/localtime", }}, }, + { + Name: "code", + VolumeSource: v1.VolumeSource{ + EmptyDir: &v1.EmptyDirVolumeSource{}}, + }, } //add shareMemory for each subTask @@ -594,7 +608,7 @@ func (s *trainJobService) submitJob(ctx context.Context, job *model.TrainJob, st Limits: startJobInfo.specs[i.ResourceSpecId].resources, }, VolumeMounts: volumeMounts, - Command: s.buildCmd(i), + Command: s.buildCmd(job, i), }, }, NodeSelector: startJobInfo.specs[i.ResourceSpecId].nodeSelectors, @@ -627,8 +641,7 @@ func (s *trainJobService) submitJob(ctx context.Context, job *model.TrainJob, st //1. privileged //处理空情况 if task.Template.Spec.Containers[0].SecurityContext == nil { - task.Template.Spec.Containers[0].SecurityContext = &v1.SecurityContext{ - } + task.Template.Spec.Containers[0].SecurityContext = &v1.SecurityContext{} } privileged := true task.Template.Spec.Containers[0].SecurityContext.Privileged = &privileged @@ -640,7 +653,7 @@ func (s *trainJobService) submitJob(ctx context.Context, job *model.TrainJob, st Path: "/usr/local/Ascend/driver", }, }, - },v1.Volume{ + }, v1.Volume{ Name: "ascend-driver-info", VolumeSource: v1.VolumeSource{ HostPath: &v1.HostPathVolumeSource{ @@ -655,9 +668,9 @@ func (s *trainJobService) submitJob(ctx context.Context, job *model.TrainJob, st MountPath: "/usr/local/Ascend/driver", }, v1.VolumeMount{ - Name: "ascend-driver-info", + Name: "ascend-driver-info", MountPath: "/etc/ascend_install.info", - }) + }) } } @@ -879,7 +892,7 @@ func (s *trainJobService) checkParamForTemplate(ctx context.Context, template *m return err } //数据集 - if template.DataSetId != "" { //判空,允许通过API调用不传此参数 + if template.DataSetId != "" { //判空,允许通过API调用不传此参数 _, err = s.getDatasetAndCheckPerm(ctx, template.UserId, template.WorkspaceId, template.DataSetId, template.DataSetVersion) if err != nil { return err -- 2.34.1 From d3765b98550e72942c49567801db3de61708b209 Mon Sep 17 00:00:00 2001 From: denglei <2522636547@qq.com> Date: Tue, 6 Sep 2022 17:27:34 +0800 Subject: [PATCH 02/12] release4.2.3 --- server/admin-server/api/v1/user.proto | 3 +++ server/admin-server/configs/config.yaml | 2 +- server/admin-server/internal/service/user.go | 9 ++++++--- server/base-server/api/v1/user.proto | 4 ++++ server/base-server/configs/config.yaml | 4 ++-- .../internal/data/dao/model/user.go | 6 ++++++ server/base-server/internal/data/dao/user.go | 10 ++++------ .../base-server/internal/service/user/user.go | 13 ++++++++----- server/go.mod | 2 +- server/go.sum | 19 +++++++++++++++++++ 10 files changed, 54 insertions(+), 18 deletions(-) diff --git a/server/admin-server/api/v1/user.proto b/server/admin-server/api/v1/user.proto index fd9936f6..7d2bd305 100644 --- a/server/admin-server/api/v1/user.proto +++ b/server/admin-server/api/v1/user.proto @@ -76,6 +76,7 @@ message UserItem { int32 gender = 7; int32 status = 8; repeated string resourcePools = 9; + string desc=10; } message ListUserRequest { @@ -111,6 +112,7 @@ message AddUserRequest { string phone = 3 [(validate.rules).string = {pattern: "^(13|14|15|17|18|19)[0-9]{9}$", ignore_empty:true}]; string password = 4 [(validate.rules).string = {min_len: 8, max_len: 30}]; int32 gender = 5 [(validate.rules).int32 = {in: [1,2]}]; + string desc = 6 ; } message AddUserReply { @@ -125,6 +127,7 @@ message UpdateUserRequest { string phone = 3 [(validate.rules).string = {pattern: "^(13|14|15|17|18|19)[0-9]{9}$", ignore_empty:true}]; int32 gender = 4 [(validate.rules).int32 = {in: [1,2],ignore_empty: true}]; repeated string resourcePools = 5; + string desc = 6 ; } UpdateItem user = 2 [(validate.rules).message.required = true]; } diff --git a/server/admin-server/configs/config.yaml b/server/admin-server/configs/config.yaml index 112d75f5..e2eca6dc 100644 --- a/server/admin-server/configs/config.yaml +++ b/server/admin-server/configs/config.yaml @@ -12,7 +12,7 @@ data: baseServerAddr: dns:///127.0.0.1:9001 baseServerRequestTimeout: 30s redis: - addr: 192.168.202.73:30635 + addr: 192.168.202.73:30207 username: password: abcde service: diff --git a/server/admin-server/internal/service/user.go b/server/admin-server/internal/service/user.go index c0130542..2af0fad3 100644 --- a/server/admin-server/internal/service/user.go +++ b/server/admin-server/internal/service/user.go @@ -2,6 +2,7 @@ package service import ( "context" + "github.com/jinzhu/copier" pb "server/admin-server/api/v1" "server/admin-server/internal/conf" "server/admin-server/internal/data" @@ -10,8 +11,6 @@ import ( "server/common/errors" "server/common/log" "time" - - "github.com/jinzhu/copier" ) type UserService struct { @@ -58,6 +57,7 @@ func (s *UserService) ListUser(ctx context.Context, req *pb.ListUserRequest) (*p Gender: int32(user.Gender), Status: int32(user.Status), ResourcePools: user.ResourcePools, + Desc: user.Desc, } } @@ -102,6 +102,7 @@ func (s *UserService) GetUser(ctx context.Context, req *pb.GetUserRequest) (*pb. Gender: int32(user.Gender), Status: int32(user.Status), ResourcePools: user.ResourcePools, + Desc: user.Desc, }, Workspaces: workspaces, }, nil @@ -114,12 +115,12 @@ func (s *UserService) AddUser(ctx context.Context, req *pb.AddUserRequest) (*pb. Email: req.Email, Phone: req.Phone, Gender: innterapi.GenderType(req.Gender), + Desc: req.Desc, }) if err != nil { return nil, err } - user := addUserReply.User _, err = s.data.BillingClient.CreateBillingOwner(ctx, &innterapi.CreateBillingOwnerRequest{ @@ -151,6 +152,7 @@ func (s *UserService) UpdateUser(ctx context.Context, req *pb.UpdateUserRequest) Phone: req.User.Phone, Gender: innterapi.GenderType(req.User.Gender), ResourcePools: req.User.ResourcePools, + Desc: req.User.Desc, }) if err != nil { @@ -167,6 +169,7 @@ func (s *UserService) UpdateUser(ctx context.Context, req *pb.UpdateUserRequest) Phone: result.User.Phone, Gender: int32(result.User.Gender), Status: int32(result.User.Status), + Desc: result.User.Desc, }, }, nil } diff --git a/server/base-server/api/v1/user.proto b/server/base-server/api/v1/user.proto index 0cc96f95..807de6a5 100644 --- a/server/base-server/api/v1/user.proto +++ b/server/base-server/api/v1/user.proto @@ -49,6 +49,7 @@ message UserItem { repeated Bind bind = 10; string ftpUserName = 11; repeated string resourcePools = 12; + string desc=13; } message Bind { @@ -64,6 +65,7 @@ message AddUserRequest { string password = 4 [(validate.rules).string = {min_len: 8, max_len: 30}]; GenderType gender = 5 [(validate.rules).enum = {in: [1,2]}]; Bind bind = 6; + string desc=7; } message AddUserReply { @@ -99,6 +101,7 @@ message ListUserRequest { string phone = 7 [(validate.rules).string = {pattern: "^(13|14|15|17|18|19)[0-9]{9}$", ignore_empty:true}]; string searchKey = 8 [(validate.rules).string = {max_len: 50}]; UserStatus status = 9 [(validate.rules).enum = {defined_only: true}]; + string desc = 10; } message ListUserReply { @@ -116,6 +119,7 @@ message UpdateUserRequest { UserStatus status = 7 [(validate.rules).enum = {defined_only: true}]; repeated Bind bind = 8; repeated string resourcePools = 9; + string desc=10; } message UpdateUserReply { diff --git a/server/base-server/configs/config.yaml b/server/base-server/configs/config.yaml index 32e6d7f0..173f4c21 100644 --- a/server/base-server/configs/config.yaml +++ b/server/base-server/configs/config.yaml @@ -16,7 +16,7 @@ data: source: root:root@tcp(192.168.202.73:30336)/octopus?charset=utf8&parseTime=True&loc=Local kubernetes: masterUrl: https://192.168.202.73:6443/ - configPath: ./73kubeconfig + configPath: C:\Users\dell\Desktop/73_k8s_config pipeline: baseUrl: http://127.0.0.1:8080 token: KLtmMug9BDvvRjlg @@ -43,7 +43,7 @@ data: username: password: abcde influxdb: - addr: 192.168.202.73:30086 + addr: 192.168.202.73:8086 username: octopus password: octopus database: octopus diff --git a/server/base-server/internal/data/dao/model/user.go b/server/base-server/internal/data/dao/model/user.go index 10096ffe..21e3e112 100644 --- a/server/base-server/internal/data/dao/model/user.go +++ b/server/base-server/internal/data/dao/model/user.go @@ -54,6 +54,7 @@ type User struct { Bind Binds `gorm:"type:json;comment:'第三方账号绑定信息'"` FtpUserName string `gorm:"type:varchar(100);uniqueIndex:ftpUserName;comment:'ftp用户名'"` ResourcePools ResourcePools `gorm:"type:json;comment:'资源池'"` + Desc string `gorm:"type:varchar(100);default:'';index;comment:'备注'"` } func (User) TableName() string { @@ -74,6 +75,7 @@ type UserList struct { SearchKey string Status int32 Bind Binds + Desc string } func (u UserList) Where(db *gorm.DB) *gorm.DB { @@ -155,6 +157,7 @@ type UserQuery struct { Phone string Bind *Bind FtpUserName string + Desc string } type UserAdd struct { @@ -167,6 +170,7 @@ type UserAdd struct { Status int32 Bind *Bind ResourcePools []string + Desc string } type UserUpdate struct { @@ -179,12 +183,14 @@ type UserUpdate struct { Bind Binds FtpUserName string ResourcePools []string + Desc string } type UserUpdateCond struct { Id string Email string Phone string + Desc string } type UserListIn struct { diff --git a/server/base-server/internal/data/dao/user.go b/server/base-server/internal/data/dao/user.go index e68f289a..2b4babd9 100644 --- a/server/base-server/internal/data/dao/user.go +++ b/server/base-server/internal/data/dao/user.go @@ -10,9 +10,8 @@ import ( "gorm.io/gorm/clause" - commerrors "server/common/errors" - "gorm.io/gorm" + commerrors "server/common/errors" ) type UserDao interface { @@ -69,10 +68,7 @@ func (d *userDao) Find(ctx context.Context, condition *model.UserQuery) (*model. var result *gorm.DB if condition.Bind == nil { result = db.Where(&model.User{ - Id: condition.Id, Email: condition.Email, - Phone: condition.Phone, - FtpUserName: condition.FtpUserName, }).First(&user) } else { querySql := "1 = 1" @@ -97,7 +93,6 @@ func (d *userDao) Find(ctx context.Context, condition *model.UserQuery) (*model. } result = db.Where(querySql, params...).First(&user) } - if result.Error != nil { if errors.Is(result.Error, gorm.ErrRecordNotFound) { return nil, nil @@ -123,6 +118,7 @@ func (d *userDao) Add(ctx context.Context, user *model.UserAdd) (*model.User, er Status: user.Status, Bind: bindInfo, ResourcePools: user.ResourcePools, + Desc: user.Desc, } result := db.Omit("ftp_user_name").Create(&u) @@ -142,6 +138,7 @@ func (d *userDao) Update(ctx context.Context, cond *model.UserUpdateCond, user * Id: cond.Id, Email: cond.Email, Phone: cond.Phone, + Desc: cond.Desc, } result := d.db.Model(&condition).Updates(model.User{ @@ -154,6 +151,7 @@ func (d *userDao) Update(ctx context.Context, cond *model.UserUpdateCond, user * Bind: user.Bind, FtpUserName: user.FtpUserName, ResourcePools: user.ResourcePools, + Desc: user.Desc, }) if result.Error != nil { return nil, result.Error diff --git a/server/base-server/internal/service/user/user.go b/server/base-server/internal/service/user/user.go index a6a9a92f..9ead1af2 100644 --- a/server/base-server/internal/service/user/user.go +++ b/server/base-server/internal/service/user/user.go @@ -2,17 +2,15 @@ package user import ( "context" + "golang.org/x/crypto/bcrypt" api "server/base-server/api/v1" "server/base-server/internal/common" "server/base-server/internal/conf" "server/base-server/internal/data" "server/base-server/internal/data/dao/model" "server/common/errors" - "server/common/utils" - "server/common/log" - - "golang.org/x/crypto/bcrypt" + "server/common/utils" ) type UserService struct { @@ -52,6 +50,7 @@ func (s *UserService) ListUser(ctx context.Context, req *api.ListUserRequest) (* SearchKey: req.SearchKey, Phone: req.Phone, Status: int32(req.Status), + Desc: req.Desc, }) if err != nil { return nil, err @@ -91,6 +90,7 @@ func (s *UserService) ListUser(ctx context.Context, req *api.ListUserRequest) (* UpdatedAt: user.UpdatedAt.Unix(), Bind: bindInfo, ResourcePools: user.ResourcePools, + Desc: user.Desc, } users[idx] = item } @@ -156,6 +156,7 @@ func (s *UserService) FindUser(ctx context.Context, req *api.FindUserRequest) (* UpdatedAt: user.UpdatedAt.Unix(), Bind: bindInfo, ResourcePools: user.ResourcePools, + Desc: user.Desc, }, } @@ -238,6 +239,7 @@ func (s *UserService) AddUser(ctx context.Context, req *api.AddUserRequest) (*ap user.Status = int32(api.UserStatus_ACTIVITY) user.Bind = cond.Bind user.ResourcePools = []string{s.conf.Service.Resource.DefaultPoolName} + user.Desc=req.Desc u, err := s.data.UserDao.Add(ctx, &user) if err != nil { return nil, err @@ -295,6 +297,7 @@ func (s *UserService) UpdateUser(ctx context.Context, req *api.UpdateUserRequest Gender: int32(req.Gender), Status: int32(req.Status), ResourcePools: req.ResourcePools, + Desc: req.Desc, } if len(bindInfo) > 0 { user.Bind = bindInfo @@ -307,7 +310,6 @@ func (s *UserService) UpdateUser(ctx context.Context, req *api.UpdateUserRequest } user.Password = string(password) } - result, err := s.data.UserDao.Update(ctx, &model.UserUpdateCond{Id: userId}, &user) if err != nil { return nil, err @@ -333,6 +335,7 @@ func (s *UserService) UpdateUser(ctx context.Context, req *api.UpdateUserRequest Status: api.UserStatus(result.Status), Password: result.Password, Bind: bindInfo2, + Desc: result.Desc, }, }, nil } diff --git a/server/go.mod b/server/go.mod index 7d582290..41a9958c 100644 --- a/server/go.mod +++ b/server/go.mod @@ -20,7 +20,7 @@ require ( github.com/imdario/mergo v0.3.12 github.com/influxdata/influxdb v1.9.4 github.com/jinzhu/copier v0.2.5 - github.com/json-iterator/go v1.1.11 + github.com/json-iterator/go v1.1.11 // indirect github.com/minio/minio-go/v7 v7.0.11 github.com/seldonio/seldon-core/operator v1.11.2 github.com/sony/sonyflake v1.0.0 diff --git a/server/go.sum b/server/go.sum index c1da0e12..a9ec4847 100644 --- a/server/go.sum +++ b/server/go.sum @@ -54,6 +54,7 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.9.0/go.mod h1:m+/etGaqZbylxaNT876QGXqEHp4PR2Rq5GMqICWb9bU= +cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= code.gitea.io/sdk/gitea v0.12.0/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= @@ -163,6 +164,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.1.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= @@ -332,9 +334,11 @@ github.com/aws/aws-sdk-go v1.34.18/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZve github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.3.2 h1:RQj8l98yKUm0UV2Wd3w/Ms+TXV9Rs1E6Kr5tRRMfyU4= github.com/aws/aws-sdk-go-v2 v1.3.2/go.mod h1:7OaACgj2SX3XGWnrIjGlJM22h6yD6MEWKvm7levnnM8= +github.com/aws/aws-sdk-go-v2/config v1.1.5 h1:imDWOGwlIrRpHLallJ9mli2SIQ4egtGKtFUFsuGRIaQ= github.com/aws/aws-sdk-go-v2/config v1.1.5/go.mod h1:P3F1hku7qzC81txjwXnwOM6Ex6ezkU6+/557Teyb64E= github.com/aws/aws-sdk-go-v2/credentials v1.1.5 h1:R9v/eN5cXv5yMLC619xRYl5PgCSuy5SarizmM7+qqSA= github.com/aws/aws-sdk-go-v2/credentials v1.1.5/go.mod h1:Ir1R6tPiR1/2y1hes8yOijFMz54hzSmgcmCDo6F45Qc= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.6 h1:zoOz5V56jO/rGixsCDnrQtAzYRYM2hGA/43U6jVMFbo= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.6/go.mod h1:0+fWMitrmIpENiY8/1DyhdYPUCAPvd9UNz9mtCsEoLQ= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.1.2 h1:Doa5wabOIDA0XZzBX5yCTAPGwDCVZ8Ux0wh29AUDmN4= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.1.2/go.mod h1:Azf567f5wBUfUbwpyJJnLM/geFFIzEulGR30L+nQZOE= @@ -346,7 +350,9 @@ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.2.2 h1:aU8H58DoYxNo8R1 github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.2.2/go.mod h1:nnutjMLuna0s3GVY/MAkpLX03thyNER06gXvnMAPj5g= github.com/aws/aws-sdk-go-v2/service/s3 v1.5.0 h1:VbwXUI3L0hyhVmrFxbDxrs6cBX8TNFX0YxCpooMNjvY= github.com/aws/aws-sdk-go-v2/service/s3 v1.5.0/go.mod h1:uwA7gs93Qcss43astPUb1eq4RyceNmYWAQjZFDOAMLo= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.5 h1:B7ec5wE4+3Ldkurmq0C4gfQFtElGTG+/iTpi/YPMzi4= github.com/aws/aws-sdk-go-v2/service/sso v1.1.5/go.mod h1:bpGz0tidC4y39sZkQSkpO/J0tzWCMXHbw6FZ0j1GkWM= +github.com/aws/aws-sdk-go-v2/service/sts v1.2.2 h1:fKw6QSGcFlvZCBPYx3fo4sL0HfTmaT06ZtMHJfQQNQQ= github.com/aws/aws-sdk-go-v2/service/sts v1.2.2/go.mod h1:ssRzzJ2RZOVuKj2Vx1YE7ypfil/BIlgmQnCSW4DistU= github.com/aws/smithy-go v1.3.1 h1:xJFO4pK0y9J8fCl34uGsSJX5KNnGbdARDlA5BPhXnwE= github.com/aws/smithy-go v1.3.1/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= @@ -681,6 +687,7 @@ github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= +github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 h1:DddqAaWDpywytcG8w/qoQ5sAN8X12d3Z3koB0C3Rxsc= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -700,6 +707,7 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.8.1/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= +github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= @@ -949,6 +957,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= @@ -990,6 +999,7 @@ github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b/go.mod h1:Z4GIJBJO3Wa4gD4vbwQxXXZ+WHmW6E9ixmNrwvs0iZs= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/cadvisor v0.35.0/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1sTX6NE48= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -1035,8 +1045,10 @@ github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0/go.mod h1 github.com/google/licenseclassifier v0.0.0-20200708223521-3d09a0ea2f39/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M= github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3/go.mod h1:YzLcVlL+NqWnmUEPuhS1LxDDwGO9WNbVlEXaF4IH35g= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible h1:xmapqc1AyLoB+ddYT6r04bD9lIjlOqGaREovi0SzFaE= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -1260,6 +1272,7 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= @@ -1288,6 +1301,7 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= @@ -1331,6 +1345,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.0.0/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -1649,6 +1664,7 @@ github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0je github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7TFZY106KVlPVa5jcYD1gaQf98= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= @@ -2019,6 +2035,7 @@ github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCO github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -2596,6 +2613,7 @@ gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e h1:jRyg0XfpwWlhEV8mDfdNGBeSJM2fuyh9Yjrnd8kF2Ts= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -2960,6 +2978,7 @@ pack.ag/amqp v0.8.0/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= pack.ag/amqp v0.11.0/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -- 2.34.1 From 4447fd10115d54fcdcd6809bff09fa05f14d9288 Mon Sep 17 00:00:00 2001 From: denglei <2522636547@qq.com> Date: Tue, 6 Sep 2022 17:41:55 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E7=94=B5=E8=AF=9D=E9=80=89=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-portal/src/api/userManager.js | 2 +- admin-portal/src/styles/index.scss | 1 + .../components/ResourceSpec.vue | 4 +- .../traningManager/components/taskProfile.vue | 2 +- .../userManager/components/addDialog.vue | 35 ++++++++++++---- .../userManager/components/operateDialog.vue | 40 +++++++++++++++---- admin-portal/src/views/userManager/user.vue | 23 ++++++++--- admin-portal/vue.config.js | 6 +-- 8 files changed, 84 insertions(+), 29 deletions(-) diff --git a/admin-portal/src/api/userManager.js b/admin-portal/src/api/userManager.js index e95074bc..b963914f 100644 --- a/admin-portal/src/api/userManager.js +++ b/admin-portal/src/api/userManager.js @@ -28,7 +28,7 @@ export function editUser(data) { return request({ url: `/v1/usermanage/user/${data.id}`, method: 'put', - data: { fullname: data.fullname, password: data.password, resourcePools: data.resourcePools } + data }) } // 冻结账号 diff --git a/admin-portal/src/styles/index.scss b/admin-portal/src/styles/index.scss index e855d921..9ceeea18 100644 --- a/admin-portal/src/styles/index.scss +++ b/admin-portal/src/styles/index.scss @@ -18,6 +18,7 @@ label { } html { + min-width: 1200px; height: 100%; box-sizing: border-box; } diff --git a/admin-portal/src/views/resourceManager/components/ResourceSpec.vue b/admin-portal/src/views/resourceManager/components/ResourceSpec.vue index ce046c67..6dfdea14 100644 --- a/admin-portal/src/views/resourceManager/components/ResourceSpec.vue +++ b/admin-portal/src/views/resourceManager/components/ResourceSpec.vue @@ -38,8 +38,8 @@ - - 价格1~10,仅支持正整数 + + 仅支持正整数
diff --git a/admin-portal/src/views/traningManager/components/taskProfile.vue b/admin-portal/src/views/traningManager/components/taskProfile.vue index 07758eec..788cddae 100644 --- a/admin-portal/src/views/traningManager/components/taskProfile.vue +++ b/admin-portal/src/views/traningManager/components/taskProfile.vue @@ -19,7 +19,7 @@ -
选用数据集:{{ data.dataSetName + ":" + data.dataSetVersion }}
+
选用数据集:{{ (data.dataSetName&&data.dataSetVersion)?data.dataSetName + ":" + data.dataSetVersion:'' }}
是否分布式:{{ data.isDistributed?'是':'否' }}
diff --git a/admin-portal/src/views/userManager/components/addDialog.vue b/admin-portal/src/views/userManager/components/addDialog.vue index fb8d4a8c..c13dffe8 100644 --- a/admin-portal/src/views/userManager/components/addDialog.vue +++ b/admin-portal/src/views/userManager/components/addDialog.vue @@ -12,10 +12,9 @@ - + + + @@ -33,6 +32,9 @@ + + +