From e3dd4f9abb5b9d3bdf2997fd098a48f18270f569 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 22 Feb 2022 10:09:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3#1538?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/home.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/home/home.js b/public/home/home.js index 8fb64b611..8f7d6a626 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -125,7 +125,7 @@ socket.onmessage = function (e) { else if(record.OpType == "2"){ actionName = actionName.replace("{oldRepoName}",record.Content); html += recordPrefix + actionName; - html += " " + getRepoLink(record) + "" + html += " " + getRepotext(record) + "" } else if(record.OpType == "24" || record.OpType == "25" || record.OpType == "26" || record.OpType == "27" || record.OpType == "28" || record.OpType == "29" || record.OpType == "30"){ html += recordPrefix + actionName; From 4926ca8471b38da788e77887b58b01cb45ad2687 Mon Sep 17 00:00:00 2001 From: liuzx Date: Tue, 22 Feb 2022 10:54:02 +0800 Subject: [PATCH 2/3] fix-1541 --- modules/modelarts/modelarts.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/modelarts/modelarts.go b/modules/modelarts/modelarts.go index 1b7341a56..fed6f8013 100755 --- a/modules/modelarts/modelarts.go +++ b/modules/modelarts/modelarts.go @@ -306,7 +306,7 @@ func GenerateNotebook2(ctx *context.Context, jobName, uuid, description, flavor, Type: models.TypeCloudBrainTwo, Uuid: uuid, ComputeResource: models.NPUResource, - Image: imageName, + Image: imageName, }) if err != nil { @@ -594,6 +594,7 @@ func GenerateInferenceJob(ctx *context.Context, req *GenerateInferenceJobReq) (e EngineName: req.EngineName, LabelName: req.LabelName, IsLatestVersion: req.IsLatestVersion, + ComputeResource: models.NPUResource, VersionCount: req.VersionCount, TotalVersionCount: req.TotalVersionCount, ModelName: req.ModelName, From ab982c3e40fb7ca23fda80550cee1c633b94315e Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Tue, 22 Feb 2022 11:00:33 +0800 Subject: [PATCH 3/3] fix 1542 --- routers/repo/modelarts.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index b21d633bd..edfa2e4b1 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -257,13 +257,15 @@ func NotebookShow(ctx *context.Context) { } var datasetDownloadLink string - if task.Uuid != "" && task.UserID == ctx.User.ID { - attachment, err := models.GetAttachmentByUUID(task.Uuid) - if err == nil { - datasetDownloadLink = attachment.S3DownloadURL() + if ctx.IsSigned { + if task.Uuid != "" && task.UserID == ctx.User.ID { + attachment, err := models.GetAttachmentByUUID(task.Uuid) + if err == nil { + datasetDownloadLink = attachment.S3DownloadURL() + } } } - + ctx.Data["datasetDownloadLink"] = datasetDownloadLink ctx.Data["task"] = task ctx.Data["jobID"] = jobID