|
|
@@ -64,22 +64,29 @@ |
|
|
|
<div class="ui grid stackable item"> |
|
|
|
<div class="row"> |
|
|
|
<!-- 任务名 --> |
|
|
|
{{$JobID := '0'}} |
|
|
|
{{if eq .JobType "DEBUG" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK"}} |
|
|
|
{{$JobID = .Cloudbrain.ID}} |
|
|
|
{{else}} |
|
|
|
{{$JobID = .JobID}} |
|
|
|
{{end}} |
|
|
|
<!-- {{$JobID}} --> |
|
|
|
<div class="two wide column nowrap"> |
|
|
|
{{if or (eq .JobType "DEBUG") (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE")}} |
|
|
|
<a class="title" href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain/{{.JobName}}{{else}}/modelarts/notebook/{{.JobID}}{{end}}" title="{{.JobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.JobName}}</span> |
|
|
|
<a class="title" href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain/{{$JobID}}{{else}}/modelarts/notebook/{{$JobID}}{{end}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "INFERENCE"}} |
|
|
|
<a class="title" href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/modelarts/inference-job/{{.JobID}}" title="{{.JobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.JobName}}</span> |
|
|
|
<a class="title" href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/modelarts/inference-job/{{$JobID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "TRAIN"}} |
|
|
|
<a class="title" href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/modelarts/train-job/{{.JobID}}" title="{{.JobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.JobName}}</span> |
|
|
|
<a class="title" href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/modelarts/train-job/{{$JobID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "BENCHMARK"}} |
|
|
|
<a class="title" href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/cloudbrain/benchmark/{{.JobName}}" title="{{.JobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.JobName}}</span> |
|
|
|
<a class="title" href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/cloudbrain/benchmark/{{$JobID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
@@ -89,8 +96,8 @@ |
|
|
|
</div> |
|
|
|
<!-- 任务状态 --> |
|
|
|
<div class="two wide column text center nowrap" style="padding-left: 2.2rem !important; width: 10% !important;"> |
|
|
|
<span class="job-status" id="{{.JobID}}" data-repopath='{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "DEBUG"}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{else if eq .JobType "INFERENCE"}}/modelarts/inference-job{{else if eq .JobType "TRAIN"}}/modelarts/train-job{{else if eq .JobType "BENCHMARK"}}/cloudbrain{{end}}' data-jobid="{{.JobID}}" data-version="{{.VersionName}}"> |
|
|
|
<span><i id="{{.JobID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{.JobID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> |
|
|
|
<span class="job-status" id="{{$JobID}}" data-repopath='{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "DEBUG"}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{else if eq .JobType "INFERENCE"}}/modelarts/inference-job{{else if eq .JobType "TRAIN"}}/modelarts/train-job{{else if eq .JobType "BENCHMARK"}}/cloudbrain{{end}}' data-jobid="{{$JobID}}" data-version="{{.VersionName}}"> |
|
|
|
<span><i id="{{$JobID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{$JobID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<!-- 任务创建时间 --> |
|
|
@@ -99,7 +106,7 @@ |
|
|
|
</div> |
|
|
|
<!-- 任务运行时间 --> |
|
|
|
<div class="one wide column text center nowrap"> |
|
|
|
<span style="font-size: 12px;" id="duration-{{.JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> |
|
|
|
<span style="font-size: 12px;" id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- 计算资源 --> |
|
|
|
<div class="one wide column text center nowrap"> |
|
|
@@ -124,14 +131,14 @@ |
|
|
|
<div class="two wide column text center nowrap" style="width: 17.5%!important;"> |
|
|
|
{{if eq .JobType "DEBUG" "SNN4IMAGENET" "BRAINSCORE"}} |
|
|
|
<div class="ui compact buttons"> |
|
|
|
<form id="debugAgainForm-{{.JobID}}"> |
|
|
|
<form id="debugAgainForm-{{$JobID}}"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
{{if eq .Status "RUNNING" "WAITING" "CREATING" "STARTING"}} |
|
|
|
<a style="margin: 0 1rem;" id="ai-debug-{{.JobID}}" class='ui basic ai_debug {{if eq .Status "CREATING" "STOPPING" "WAITING" "STARTING"}}disabled {{else}}blue {{end}}button' data-jobid="{{.JobID}}" data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{.JobID}}/'> |
|
|
|
<a style="margin: 0 1rem;" id="ai-debug-{{$JobID}}" class='ui basic ai_debug {{if eq .Status "CREATING" "STOPPING" "WAITING" "STARTING"}}disabled {{else}}blue {{end}}button' data-jobid="{{$JobID}}" data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{$JobID}}/'> |
|
|
|
{{$.i18n.Tr "repo.debug"}} |
|
|
|
</a> |
|
|
|
{{else}} |
|
|
|
<a id="ai-debug-{{.JobID}}" class='ui basic ai_debug {{if eq .Status "CREATING" "STOPPING" "WAITING" "STARTING"}} disabled {{else}}blue {{end}}button' data-jobid="{{.JobID}}" data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{.JobID}}/'> |
|
|
|
<a id="ai-debug-{{$JobID}}" class='ui basic ai_debug {{if eq .Status "CREATING" "STOPPING" "WAITING" "STARTING"}} disabled {{else}}blue {{end}}button' data-jobid="{{$JobID}}" data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{$JobID}}/'> |
|
|
|
{{$.i18n.Tr "repo.debug_again"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
@@ -141,22 +148,22 @@ |
|
|
|
<!-- 停止任务 --> |
|
|
|
<div class="ui compact buttons"> |
|
|
|
{{if eq .JobType "DEBUG" "BENCHMARK" "SNN4IMAGENET" "BRAINSCORE"}} |
|
|
|
<form id="stopForm-{{.JobID}}" style="margin-left:-1px;"> |
|
|
|
<form id="stopForm-{{$JobID}}" style="margin-left:-1px;"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{.JobID}}" class='ui basic ai_stop {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED" "SUCCEEDED" "STOPPED" "STOPPING"}}disabled {{else}} blue {{end}}button' data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else if eq .JobType "BENCHMARK" }}/cloudbrain/benchmark{{else if eq .ComputeResource "NPU" }}/modelarts/notebook{{end}}/{{.JobID}}/stop' data-jobid="{{.JobID}}"> |
|
|
|
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{$JobID}}" class='ui basic ai_stop {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED" "SUCCEEDED" "STOPPED" "STOPPING"}}disabled {{else}} blue {{end}}button' data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else if eq .JobType "BENCHMARK" }}/cloudbrain/benchmark{{else if eq .ComputeResource "NPU" }}/modelarts/notebook{{end}}/{{$JobID}}/stop' data-jobid="{{$JobID}}"> |
|
|
|
{{$.i18n.Tr "repo.stop"}} |
|
|
|
</a> |
|
|
|
</form> |
|
|
|
{{else}} |
|
|
|
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{.JobID}}" class="ui basic ai_stop_version {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED"}}disabled {{else}} blue {{end}}button" data-repopath="{{.Repo.OwnerName}}/{{.Repo.Name}}/modelarts/{{if eq .JobType "INFERENCE"}}inference-job{{else}}train-job{{end}}" data-jobid="{{.JobID}}" data-version="{{.VersionName}}" > |
|
|
|
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{$JobID}}" class="ui basic ai_stop_version {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED"}}disabled {{else}} blue {{end}}button" data-repopath="{{.Repo.OwnerName}}/{{.Repo.Name}}/modelarts/{{if eq .JobType "INFERENCE"}}inference-job{{else}}train-job{{end}}" data-jobid="{{$JobID}}" data-version="{{.VersionName}}" > |
|
|
|
{{$.i18n.Tr "repo.stop"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
<!-- 删除任务 --> |
|
|
|
<form class="ui compact buttons" id="delForm-{{.JobID}}" action='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "BENCHMARK"}}/cloudbrain/benchmark{{else if eq .JobType "DEBUG"}}{{if eq .ComputeResource "NPU"}}/modelarts/notebook{{else}}/cloudbrain{{end}}{{else if eq .JobType "TRAIN"}}/modelarts/train-job{{end}}/{{.JobID}}/del?isadminpage=true' method="post"> |
|
|
|
<form class="ui compact buttons" id="delForm-{{$JobID}}" action='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "BENCHMARK"}}/cloudbrain/benchmark{{else if eq .JobType "DEBUG"}}{{if eq .ComputeResource "NPU"}}/modelarts/notebook{{else}}/cloudbrain{{end}}{{else if eq .JobType "TRAIN"}}/modelarts/train-job{{end}}/{{$JobID}}/del?isadminpage=true' method="post"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="ai-delete-{{.JobID}}" data-repopath="{{.Repo.OwnerName}}/{{.Repo.Name}}/modelarts/inference-job/{{.JobID}}/del_version?isadminpage=true" data-version="{{.VersionName}}" class="ui basic ai_delete blue button" style="border-radius: .28571429rem;"> |
|
|
|
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="ai-delete-{{$JobID}}" data-repopath="{{.Repo.OwnerName}}/{{.Repo.Name}}/modelarts/inference-job/{{$JobID}}/del_version?isadminpage=true" data-version="{{.VersionName}}" class="ui basic ai_delete blue button" style="border-radius: .28571429rem;"> |
|
|
|
{{$.i18n.Tr "repo.delete"}} |
|
|
|
</a> |
|
|
|
</form> |
|
|
@@ -169,20 +176,20 @@ |
|
|
|
<!-- 任务名 --> |
|
|
|
<div class="two wide column nowrap"> |
|
|
|
{{if eq .JobType "DEBUG"}} |
|
|
|
<a class="title" href="" title="{{.JobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.JobName}}</span> |
|
|
|
<a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "INFERENCE"}} |
|
|
|
<a class="title" href="" title="{{.JobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.JobName}}</span> |
|
|
|
<a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "TRAIN"}} |
|
|
|
<a class="title" href="" title="{{.JobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.JobName}}</span> |
|
|
|
<a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "BENCHMARK"}} |
|
|
|
<a class="title" href="" title="{{.JobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.JobName}}</span> |
|
|
|
<a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;"> |
|
|
|
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
@@ -192,8 +199,8 @@ |
|
|
|
</div> |
|
|
|
<!-- 任务状态 --> |
|
|
|
<div class="two wide column text center nowrap" style="padding-left: 2.2rem !important; width: 10% !important;"> |
|
|
|
<span class="job-status" id="{{.JobID}}" data-jobid="{{.JobID}}" data-version="{{.VersionName}}"> |
|
|
|
<span><i id="{{.JobID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{.JobID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> |
|
|
|
<span class="job-status" id="{{$JobID}}" data-jobid="{{$JobID}}" data-version="{{.VersionName}}"> |
|
|
|
<span><i id="{{$JobID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{$JobID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<!-- 任务创建时间 --> |
|
|
@@ -202,7 +209,7 @@ |
|
|
|
</div> |
|
|
|
<!-- 任务运行时间 --> |
|
|
|
<div class="one wide column text center nowrap"> |
|
|
|
<span style="font-size: 12px;" id="duration-{{.JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> |
|
|
|
<span style="font-size: 12px;" id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- 计算资源 --> |
|
|
|
<div class="one wide column text center nowrap"> |
|
|
@@ -227,14 +234,14 @@ |
|
|
|
<div class="two wide column text center nowrap" style="width: 17.5%!important;"> |
|
|
|
{{if eq .JobType "DEBUG"}} |
|
|
|
<div class="ui compact buttons"> |
|
|
|
<form id="debugAgainForm-{{.JobID}}"> |
|
|
|
<form id="debugAgainForm-{{$JobID}}"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
{{if eq .Status "RUNNING" "WAITING" "CREATING" "STARTING"}} |
|
|
|
<a style="margin: 0 1rem;" id="ai-debug-{{.JobID}}" class='ui basic disabled button' > |
|
|
|
<a style="margin: 0 1rem;" id="ai-debug-{{$JobID}}" class='ui basic disabled button' > |
|
|
|
{{$.i18n.Tr "repo.debug"}} |
|
|
|
</a> |
|
|
|
{{else}} |
|
|
|
<a id="ai-debug-{{.JobID}}" class='ui basic disabled button' > |
|
|
|
<a id="ai-debug-{{$JobID}}" class='ui basic disabled button' > |
|
|
|
{{$.i18n.Tr "repo.debug_again"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
@@ -243,14 +250,14 @@ |
|
|
|
{{end}} |
|
|
|
<!-- 停止任务 --> |
|
|
|
<div class="ui compact buttons"> |
|
|
|
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{.JobID}}" class="ui basic disabled button" data-jobid="{{.JobID}}" data-version="{{.VersionName}}" > |
|
|
|
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{$JobID}}" class="ui basic disabled button" data-jobid="{{$JobID}}" data-version="{{.VersionName}}" > |
|
|
|
{{$.i18n.Tr "repo.stop"}} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<!-- 删除任务 --> |
|
|
|
<form class="ui compact buttons" id="delForm-{{.JobID}}" action='' method="post"> |
|
|
|
<form class="ui compact buttons" id="delForm-{{$JobID}}" action='' method="post"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="ai-delete-{{.JobID}}" class="ui basic disabled button" style="border-radius: .28571429rem;"> |
|
|
|
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="ai-delete-{{$JobID}}" class="ui basic disabled button" style="border-radius: .28571429rem;"> |
|
|
|
{{$.i18n.Tr "repo.delete"}} |
|
|
|
</a> |
|
|
|
</form> |
|
|
@@ -313,4 +320,5 @@ function getParams(){ |
|
|
|
}) |
|
|
|
} |
|
|
|
getParams() |
|
|
|
console.log({{.Tasks}}) |
|
|
|
</script> |