| @@ -334,9 +334,9 @@ | |||||
| </div> | </div> | ||||
| <!-- 删除任务 --> | <!-- 删除任务 --> | ||||
| <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{if not .CanDel}}javascript:void(0){{else}}{{$.Link}}/{{.JobID}}/del{{end}}" method="post"> | |||||
| <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{if eq .Status "RUNNING"}}javascript:void(0){{else}}{{$.Link}}/{{.JobID}}/del{{end}}" method="post"> | |||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| <a class="ui compact {{if not .CanDel}}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | |||||
| <a class="ui compact {{if eq .Status "RUNNING"}}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | |||||
| 删除 | 删除 | ||||
| </a> | </a> | ||||
| </form> | </form> | ||||
| @@ -432,7 +432,7 @@ | |||||
| return | return | ||||
| } | } | ||||
| $.get(`/api/v1/repos/${repoPath}/modelarts/${jobID}`, (data) => { | |||||
| $.get(`/api/v1/repos/${repoPath}/modelarts/notebook/${jobID}`, (data) => { | |||||
| const jobID = data.JobID | const jobID = data.JobID | ||||
| const status = data.JobStatus | const status = data.JobStatus | ||||
| if (status != job.textContent.trim()) { | if (status != job.textContent.trim()) { | ||||
| @@ -328,11 +328,11 @@ | |||||
| <!-- <span class="ui compact button job-status" id="{{.JobID}}" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.JobID}}"> | <!-- <span class="ui compact button job-status" id="{{.JobID}}" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.JobID}}"> | ||||
| {{.Status}} | {{.Status}} | ||||
| </span> --> | </span> --> | ||||
| <span class="job-status" id="{{.JobID}}" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.JobID}}"> | |||||
| <span><i style="vertical-align: middle;" class="{{.Status}}"></i><span style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | |||||
| </span> | |||||
| <span>{{.TrainJobDuration}}</span> | |||||
| <!-- 任务创建时间 --> | <!-- 任务创建时间 --> | ||||
| <span style="font-size: 12px;margin-left: 0.4rem;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | |||||
| <!-- <span style="font-size: 12px;margin-left: 0.4rem;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> --> | |||||
| </div> | </div> | ||||
| <div class="one wide column"> | <div class="one wide column"> | ||||
| @@ -344,7 +344,7 @@ | |||||
| </div> | </div> | ||||
| <div class="four wide column text right"> | <div class="four wide column text right"> | ||||
| <div class="ui compact buttons" style="margin-right:10px;"> | |||||
| <div class="ui compact buttons"> | |||||
| <!-- <a class="ui basic blue button" href="{{$.Link}}/{{.JobID}}"> | <!-- <a class="ui basic blue button" href="{{$.Link}}/{{.JobID}}"> | ||||
| 查看 | 查看 | ||||
| </a> | </a> | ||||
| @@ -370,9 +370,9 @@ | |||||
| </div> | </div> | ||||
| <!-- 删除任务 --> | <!-- 删除任务 --> | ||||
| <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{if not .CanDel}}javascript:void(0){{else}}{{$.Link}}/{{.JobID}}/del{{end}}" method="post"> | |||||
| <form class="ui compact buttons" id="delForm-{{.JobID}}" action="{{if eq .Status "RUNNING"}}javascript:void(0){{else}}{{$.Link}}/{{.JobID}}/del{{end}}" method="post"> | |||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| <a class="ui compact {{if not .CanDel}}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | |||||
| <a class="ui compact {{if eq .Status "RUNNING" }}disabled {{else}}red {{end}}button" onclick="assertDelete(this)" style="border-radius: .28571429rem;"> | |||||
| 删除 | 删除 | ||||
| </a> | </a> | ||||
| </form> | </form> | ||||
| @@ -468,7 +468,7 @@ | |||||
| return | return | ||||
| } | } | ||||
| $.get(`/api/v1/repos/${repoPath}/modelarts/${jobID}`, (data) => { | |||||
| $.get(`/api/v1/repos/${repoPath}/modelarts/train-job/${jobID}`, (data) => { | |||||
| const jobID = data.JobID | const jobID = data.JobID | ||||
| const status = data.JobStatus | const status = data.JobStatus | ||||
| if (status != job.textContent.trim()) { | if (status != job.textContent.trim()) { | ||||
| @@ -224,7 +224,7 @@ footer .column{margin-bottom:0!important; padding-bottom:0!important;} | |||||
| // icon cloudbrain | // icon cloudbrain | ||||
| .i-round{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;} | .i-round{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;} | ||||
| .i-bg-organ{background-position: -496px -52px;} | .i-bg-organ{background-position: -496px -52px;} | ||||
| .STOPPED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -459px -52px;} | |||||
| .STOPPED, .KILLED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -459px -52px;} | |||||
| .RUNNING{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -478px -52px;} | .RUNNING{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -478px -52px;} | ||||
| .i-bg-orange{background-position: -495px -51px;} | .i-bg-orange{background-position: -495px -51px;} | ||||
| .FAILED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -532px -52px;} | .FAILED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -532px -52px;} | ||||