| @@ -247,7 +247,7 @@ document.onreadystatechange = function () { | |||||
| html += recordPrefix + actionName; | html += recordPrefix + actionName; | ||||
| html += " <a href=\"" + getTaskLink(record) + "\" rel=\"nofollow\">" + record.RefName + "</a>" | html += " <a href=\"" + getTaskLink(record) + "\" rel=\"nofollow\">" + record.RefName + "</a>" | ||||
| } | } | ||||
| else if(record.OpType == "25" || record.OpType == "29"){ | |||||
| else if(record.OpType == "25" || record.OpType == "29" || record.OpType == "39" || record.OpType == "40"){ | |||||
| html += recordPrefix + actionName; | html += recordPrefix + actionName; | ||||
| html += " <a href=\"" + getTaskLink(record) + "\" rel=\"nofollow\">" + record.RefName + "</a>" | html += " <a href=\"" + getTaskLink(record) + "\" rel=\"nofollow\">" + record.RefName + "</a>" | ||||
| } | } | ||||
| @@ -294,7 +294,10 @@ function getTaskLink(record){ | |||||
| re = re + "/cloudbrain/train-job/" + record.Content; | re = re + "/cloudbrain/train-job/" + record.Content; | ||||
| }else if(record.OpType == 32 || record.OpType == 33){ | }else if(record.OpType == 32 || record.OpType == 33){ | ||||
| re = re + "/grampus/train-job/" + record.Content; | re = re + "/grampus/train-job/" + record.Content; | ||||
| }else if(record.OpType == 39 || record.OpType == 40){ | |||||
| re = re + "/grampus/notebook/" + record.Content; | |||||
| } | } | ||||
| re = encodeURI(re); | re = encodeURI(re); | ||||
| return re; | return re; | ||||
| } | } | ||||
| @@ -90,14 +90,14 @@ | |||||
| <div class="required min_title inline field"> | <div class="required min_title inline field"> | ||||
| <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.compute_resource"}}</label> | <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.compute_resource"}}</label> | ||||
| <div class="ui blue mini menu compact selectcloudbrain"> | <div class="ui blue mini menu compact selectcloudbrain"> | ||||
| <a {{if.GPUEnabled}}class="active item" href="{{.RepoLink}}/grampus/train-job/gpu/create"{{else}}href="javascript:return false;" class="item disabled" {{end}}> | |||||
| <a class="active item" href="{{.RepoLink}}/grampus/train-job/gpu/create"> | |||||
| <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | ||||
| <path fill="none" d="M0 0h24v24H0z"/> | <path fill="none" d="M0 0h24v24H0z"/> | ||||
| <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/> | <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/> | ||||
| </svg> | </svg> | ||||
| CPU/GPU | CPU/GPU | ||||
| </a> | </a> | ||||
| <a {{if.NPUEnabled}}class="item" href="{{.RepoLink}}/grampus/train-job/npu/create"{{else}}href="javascript:return false;" class="item disabled" {{end}} > | |||||
| <a class="item" href="{{.RepoLink}}/grampus/train-job/npu/create"> | |||||
| <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | ||||
| <path fill="none" d="M0 0h24v24H0z"/> | <path fill="none" d="M0 0h24v24H0z"/> | ||||
| <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/> | <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/> | ||||
| @@ -76,14 +76,14 @@ | |||||
| <div class="required min_title inline field"> | <div class="required min_title inline field"> | ||||
| <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.compute_resource"}}</label> | <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.compute_resource"}}</label> | ||||
| <div class="ui blue mini menu compact selectcloudbrain"> | <div class="ui blue mini menu compact selectcloudbrain"> | ||||
| <a {{if.GPUEnabled}}class="item" href="{{.RepoLink}}/grampus/train-job/gpu/create"{{else}}href="javascript:return false;" class="item disabled" {{end}}> | |||||
| <a class="item" href="{{.RepoLink}}/grampus/train-job/gpu/create"> | |||||
| <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | ||||
| <path fill="none" d="M0 0h24v24H0z"/> | <path fill="none" d="M0 0h24v24H0z"/> | ||||
| <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/> | <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/> | ||||
| </svg> | </svg> | ||||
| CPU/GPU | CPU/GPU | ||||
| </a> | </a> | ||||
| <a {{if.NPUEnabled}}class="active item" href="{{.RepoLink}}/grampus/train-job/npu/create"{{else}}href="javascript:return false;" class="item disabled" {{end}} > | |||||
| <a class="active item" href="{{.RepoLink}}/grampus/train-job/npu/create"> | |||||
| <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | ||||
| <path fill="none" d="M0 0h24v24H0z"/> | <path fill="none" d="M0 0h24v24H0z"/> | ||||
| <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/> | <path d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z"/> | ||||
| @@ -72,9 +72,9 @@ | |||||
| {{$.i18n.Tr "action.comment_pull" .GetRepoLink $index .ShortRepoPath | Str2html}} | {{$.i18n.Tr "action.comment_pull" .GetRepoLink $index .ShortRepoPath | Str2html}} | ||||
| {{else if eq .GetOpType 24}} | {{else if eq .GetOpType 24}} | ||||
| {{$.i18n.Tr "action.upload_dataset" .GetRepoLink .RefName | Str2html}} | {{$.i18n.Tr "action.upload_dataset" .GetRepoLink .RefName | Str2html}} | ||||
| {{else if eq .GetOpType 25}} | |||||
| {{else if or (eq .GetOpType 25) (eq .GetOpType 39)}} | |||||
| {{$.i18n.Tr "action.task_gpudebugjob" .GetRepoLink .Content .RefName | Str2html}} | {{$.i18n.Tr "action.task_gpudebugjob" .GetRepoLink .Content .RefName | Str2html}} | ||||
| {{else if eq .GetOpType 26}} | |||||
| {{else if or (eq .GetOpType 26) (eq .GetOpType 40)}} | |||||
| {{$.i18n.Tr "action.task_npudebugjob" .GetRepoLink .Content .RefName | Str2html}} | {{$.i18n.Tr "action.task_npudebugjob" .GetRepoLink .Content .RefName | Str2html}} | ||||
| {{else if eq .GetOpType 27}} | {{else if eq .GetOpType 27}} | ||||
| {{$.i18n.Tr "action.task_nputrainjob" .GetRepoLink .Content .RefName | Str2html}} | {{$.i18n.Tr "action.task_nputrainjob" .GetRepoLink .Content .RefName | Str2html}} | ||||
| @@ -344,7 +344,7 @@ export default { | |||||
| location.href=`${AppSubUrl}/authentication/wechat/bind` | location.href=`${AppSubUrl}/authentication/wechat/bind` | ||||
| } | } | ||||
| if(err.response.status===401){ | if(err.response.status===401){ | ||||
| location.href=`${AppSubUrl}/user/login` | |||||
| location.href=`${AppSubUrl}/user/login?redirect_to=${location.href}?type=login` | |||||
| return | return | ||||
| } | } | ||||
| this.btnStatus[index]=0 | this.btnStatus[index]=0 | ||||
| @@ -411,6 +411,9 @@ export default { | |||||
| this.fileInfo.project_name = selfData.getAttribute('data-project') | this.fileInfo.project_name = selfData.getAttribute('data-project') | ||||
| this.fileInfo.sign_name = selfData.getAttribute('data-name') | this.fileInfo.sign_name = selfData.getAttribute('data-name') | ||||
| let that = this; | let that = this; | ||||
| if(new URLSearchParams(window.location.search).get("type")==='login'){ | |||||
| that.dialogVisible = true; | |||||
| } | |||||
| document | document | ||||
| .querySelector("#notebook-debug") | .querySelector("#notebook-debug") | ||||
| .addEventListener("click", function () { | .addEventListener("click", function () { | ||||