Browse Source

feed

tags/v1.22.3.2^2
lewis 3 years ago
parent
commit
20fb568aea
5 changed files with 15 additions and 10 deletions
  1. +2
    -1
      options/locale/locale_zh-CN.ini
  2. +7
    -5
      public/home/home.js
  3. +2
    -2
      routers/repo/cloudbrain.go
  4. +1
    -1
      services/socketwrap/clientManager.go
  5. +3
    -1
      templates/user/dashboard/feeds.tmpl

+ 2
- 1
options/locale/locale_zh-CN.ini View File

@@ -2751,10 +2751,11 @@ reject_pull_request=`建议变更 <a href="%s/pulls/%s">%s#%[2]s</a>`
upload_dataset=`上传了数据集文件 <a href="%s/datasets?type=%s">%s</a>`
task_gpudebugjob=`创建了CPU/GPU类型调试任务 <a href="%s/cloudbrain/%s">%s</a>`
task_npudebugjob=`创建了NPU类型调试任务 <a href="%s/modelarts/notebook/%s">%s</a>`
task_trainjob=`创建了训练任务 <a href="%s/modelarts/train-job/%s">%s</a>`
task_nputrainjob=`创建了NPU类型训练任务 <a href="%s/modelarts/train-job/%s">%s</a>`
task_inferencejob=`创建了推理任务 <a href="%s/modelarts/inference-job/%s">%s</a>`
task_benchmark=`创建了评测任务 <a href="%s/cloudbrain/benchmark/%s">%s</a>`
task_createmodel=`导入了新模型 <a href="%s/modelmanage/show_model_info?name=%s">%s</a>`
task_gputrainjob=`创建了CPU/GPU类型训练任务 <a href="%s/modelarts/train-job/%s">%s</a>`

[tool]
ago=%s前


+ 7
- 5
public/home/home.js View File

@@ -135,7 +135,7 @@ socket.onmessage = function (e) {
html += recordPrefix + actionName;
html += " <a href=\"" + getRepoLink(record) + "\" rel=\"nofollow\">" + getRepotext(record) + "</a>"
}
else if(record.OpType == "24" || record.OpType == "26" || record.OpType == "27" || record.OpType == "28" || record.OpType == "30"){
else if(record.OpType == "24" || record.OpType == "26" || record.OpType == "27" || record.OpType == "28" || record.OpType == "30" || record.OpType == "31"){
html += recordPrefix + actionName;
html += " <a href=\"" + getTaskLink(record) + "\" rel=\"nofollow\">" + record.RefName + "</a>"
}
@@ -321,10 +321,11 @@ var actionNameZH={
"24":"上传了数据集文件",
"25":"创建了CPU/GPU类型调试任务",
"26":"创建了NPU类型调试任务",
"27":"创建了训练任务",
"27":"创建了NPU类型训练任务",
"28":"创建了推理任务",
"29":"创建了评测任务",
"30":"导入了新模型"
"30":"导入了新模型",
"31":"创建了CPU/GPU类型训练任务"
};

var actionNameEN={
@@ -346,10 +347,11 @@ var actionNameEN={
"24":" upload dataset ",
"25":" created CPU/GPU type debugging task ",
"26":" created NPU type debugging task ",
"27":" created training task",
"27":" created NPU type training task",
"28":" created reasoning task",
"29":" created profiling task",
"30":" created new model"
"30":" created new model",
"31":" created CPU/GPU type training task",
};

var repoAndOrgZH={


+ 2
- 2
routers/repo/cloudbrain.go View File

@@ -1459,14 +1459,14 @@ func getTrainJobCommand(form auth.CreateCloudBrainForm) (string, error) {
}

func CloudBrainTrainJobDel(ctx *context.Context) {
var listType= ctx.Query("listType")
var listType = ctx.Query("listType")
if err := deleteCloudbrainJob(ctx); err != nil {
log.Error("deleteCloudbrainJob failed: %v", err, ctx.Data["msgID"])
ctx.ServerError(err.Error(), err)
return
}

var isAdminPage= ctx.Query("isadminpage")
var isAdminPage = ctx.Query("isadminpage")
if ctx.IsUserSiteAdmin() && isAdminPage == "true" {
ctx.Redirect(setting.AppSubURL + "/admin" + "/cloudbrains")
} else {


+ 1
- 1
services/socketwrap/clientManager.go View File

@@ -10,7 +10,7 @@ import (
"github.com/elliotchance/orderedmap"
)

var opTypes = []int{1, 2, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 22, 23, 25, 26, 27, 28, 29, 30}
var opTypes = []int{1, 2, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 22, 23, 25, 26, 27, 28, 29, 30, 31}

type ClientsManager struct {
Clients *orderedmap.OrderedMap


+ 3
- 1
templates/user/dashboard/feeds.tmpl View File

@@ -77,13 +77,15 @@
{{else if eq .GetOpType 26}}
{{$.i18n.Tr "action.task_npudebugjob" .GetRepoLink .Content .RefName | Str2html}}
{{else if eq .GetOpType 27}}
{{$.i18n.Tr "action.task_trainjob" .GetRepoLink .Content .RefName | Str2html}}
{{$.i18n.Tr "action.task_nputrainjob" .GetRepoLink .Content .RefName | Str2html}}
{{else if eq .GetOpType 28}}
{{$.i18n.Tr "action.task_inferencejob" .GetRepoLink .Content .RefName | Str2html}}
{{else if eq .GetOpType 29}}
{{$.i18n.Tr "action.task_benchmark" .GetRepoLink .Content .RefName | Str2html}}
{{else if eq .GetOpType 30}}
{{$.i18n.Tr "action.task_createmodel" .GetRepoLink .RefName .RefName | Str2html}}
{{else if eq .GetOpType 31}}
{{$.i18n.Tr "action.task_gputrainjob" .GetRepoLink .RefName .RefName | Str2html}}
{{end}}
</p>
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}


Loading…
Cancel
Save