|
|
@@ -1,579 +1,10 @@ |
|
|
|
{{template "base/head" .}} |
|
|
|
<script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> |
|
|
|
<!-- 弹窗 --> |
|
|
|
<div id="mask"> |
|
|
|
<div id="loadingPage"> |
|
|
|
<div class="rect1"></div> |
|
|
|
<div class="rect2"></div> |
|
|
|
<div class="rect3"></div> |
|
|
|
<div class="rect4"></div> |
|
|
|
<div class="rect5"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 提示框 --> |
|
|
|
<div class="alert"></div> |
|
|
|
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/vp-cloudbrain-tasks.css?v={{MD5 AppVer}}" /> |
|
|
|
<div class="admin user"> |
|
|
|
<div class="cloudbrain_debug" style="display: none;" data-debug="{{$.i18n.Tr "repo.debug"}}" |
|
|
|
data-debug-again="{{$.i18n.Tr "repo.debug_again"}}" |
|
|
|
data-all-cluster="{{.i18n.Tr "cloudbrain.all_resource_cluster"}}" |
|
|
|
data-all-aiCenter="{{.i18n.Tr "cloudbrain.all_ai_center"}}" |
|
|
|
data-cluster-c2net="{{.i18n.Tr "cloudbrain.resource_cluster_c2net"}}" |
|
|
|
data-cluster-openi="{{.i18n.Tr "cloudbrain.resource_cluster_openi"}}" |
|
|
|
data-all-task="{{.i18n.Tr "admin.cloudbrain.all_task_types"}}" |
|
|
|
data-all-compute="{{.i18n.Tr "admin.cloudbrain.all_computing_resources"}}" |
|
|
|
data-all-status="{{.i18n.Tr "admin.cloudbrain.all_status"}}"></div> |
|
|
|
{{template "admin/navbar" .}} |
|
|
|
<div class="ui container"> |
|
|
|
{{template "base/alert" .}} |
|
|
|
<div class="ui grid" style="margin:0"> |
|
|
|
<div class="row" style="border: 1px solid #d4d4d5;margin-top: 0px;padding-top: 0;"> |
|
|
|
{{template "admin/cloudbrain/search" .}} |
|
|
|
<div class="ui six wide column right aligned" style="margin: 1rem 0;"> |
|
|
|
<a class="ui compact blue basic icon button" style="box-shadow: none !important; padding: 0.8em;" |
|
|
|
href="/admin/cloudbrains/download"><i |
|
|
|
class="ri-download-line middle aligned icon"></i>{{.i18n.Tr "admin.cloudbrain.download_report"}}</a> |
|
|
|
</div> |
|
|
|
<div class="ui sixteen wide column" style="overflow-x:auto;"> |
|
|
|
<!-- 任务展示 --> |
|
|
|
<div class="dataset list" style="min-width:2100px;margin-top:15px;margin-bottom:15px;"> |
|
|
|
<!-- 表头 --> |
|
|
|
<div class="ui grid stackable" style="background: #f0f0f0;;"> |
|
|
|
<div class="row"> |
|
|
|
<div class="two wide column nowrap" style="width:10% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.cloudbrain_task"}}</span> |
|
|
|
</div> |
|
|
|
<!-- 集群 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:6% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.modelarts.cluster"}}</span> |
|
|
|
</div> |
|
|
|
<div class="two wide column text center nowrap" style="width: 8% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.modelarts.status"}}</span> |
|
|
|
</div> |
|
|
|
<div class="one wide column text center nowrap" style="width:6% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.cloudbrain_task_type"}}</span> |
|
|
|
</div> |
|
|
|
<div class="two wide column text center nowrap" style="width: 8% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.modelarts.createtime"}}</span> |
|
|
|
</div> |
|
|
|
<div class="one wide column text center nowrap" style="width: 5% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> |
|
|
|
</div> |
|
|
|
<div class="one wide column text center nowrap" style="width: 5% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> |
|
|
|
</div> |
|
|
|
<!-- 智算中心 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:7% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.modelarts.ai_center"}}</span> |
|
|
|
</div> |
|
|
|
<!-- XPU类型 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:7% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.modelarts.card_type"}}</span> |
|
|
|
</div> |
|
|
|
<div class="one wide column text center nowrap" style="width:4% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> |
|
|
|
</div> |
|
|
|
<div class="two wide column text center nowrap" style="width:10% !important;"> |
|
|
|
<span>{{$.i18n.Tr "repository"}}</span> |
|
|
|
</div> |
|
|
|
<div class="two wide column text center nowrap" style="width:10% !important;"> |
|
|
|
<span>{{.i18n.Tr "admin.cloudbrain.cloudbrain_name"}}</span> |
|
|
|
</div> |
|
|
|
<div class="two wide column text center nowrap" style="width: 12%!important;"> |
|
|
|
<span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{range .Tasks}} |
|
|
|
{{if .Repo}} |
|
|
|
<div class="ui grid stackable item"> |
|
|
|
<div class="row"> |
|
|
|
<!-- 任务名 --> |
|
|
|
{{$JobID := '0'}} |
|
|
|
{{if eq .JobType "DEBUG" "TRAIN" "INFERENCE" "HPC" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "MODELSAFETY" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}} |
|
|
|
{{$JobID = .Cloudbrain.ID}} |
|
|
|
{{else}} |
|
|
|
{{$JobID = .JobID}} |
|
|
|
{{end}} |
|
|
|
<!-- {{$JobID}} --> |
|
|
|
<div class="two wide column nowrap" style="width:10% !important;"> |
|
|
|
{{if eq .JobType "DEBUG"}} |
|
|
|
<a class="title" |
|
|
|
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}/{{$JobID}}" |
|
|
|
title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<span class="fitted" |
|
|
|
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "HPC"}} |
|
|
|
<a class="title" |
|
|
|
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/supercompute/job/{{$JobID}}" |
|
|
|
title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<span class="fitted" |
|
|
|
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if or (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE") (eq .JobType "SNN4ECOSET") (eq .JobType "SIM2BRAIN_SNN")}} |
|
|
|
<a class="title" |
|
|
|
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/cloudbrain/benchmark/{{$JobID}}" |
|
|
|
title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<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}}/{{if eq .Cloudbrain.Type 2}}grampus{{else if eq .Cloudbrain.Type 1}}modelarts{{else if eq .Cloudbrain.Type 0}}cloudbrain{{end}}/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}}{{if eq .Cloudbrain.Type 0}}/cloudbrain{{else if eq .Cloudbrain.Type 1}}/modelarts{{else if eq .Cloudbrain.Type 2}}/grampus{{end}}/train-job/{{$JobID}}" |
|
|
|
title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<span class="fitted" |
|
|
|
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "BENCHMARK" "MODELSAFETY"}} |
|
|
|
<a class="title" |
|
|
|
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/cloudbrain/benchmark/{{$JobID}}" |
|
|
|
title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<span class="fitted" |
|
|
|
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "ONLINEINFERENCE"}} |
|
|
|
<a class="title" |
|
|
|
href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/grampus/onlineinfer/{{$JobID}}" |
|
|
|
title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<span class="fitted" |
|
|
|
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
<!-- 集群 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:6% !important;"> |
|
|
|
<span style="font-size: 12px;" class="cluster_{{.DisplayJobName}}_{{$JobID}}">{{if .Cluster}}{{.Cluster}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- 任务状态 --> |
|
|
|
<div class="two wide column text center nowrap" |
|
|
|
style="width: 8% !important;"> |
|
|
|
<span class="job-status" id="{{$JobID}}" |
|
|
|
data-repopath='{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "DEBUG" "ONLINEINFERENCE" "HPC"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "INFERENCE"}}/modelarts/train-job{{else if eq .JobType "TRAIN"}}/modelarts/train-job{{else if eq .JobType "BENCHMARK" "MODELSAFETY"}}/cloudbrain{{end}}' |
|
|
|
data-jobid="{{$JobID}}" data-version="{{.VersionName}}" |
|
|
|
data-cloudbrainid="{{.Cloudbrain.ID}}" data-datamigrate='{{$.i18n.Tr "repo.migratingData"}}' data-centerpend='{{$.i18n.Tr "repo.centerPending"}}'> |
|
|
|
<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> |
|
|
|
{{if eq .Status "WAITING"}}<i id="{{$JobID}}-icon-detail" class="{{.DetailedStatus}}" style="vertical-align: middle;" title='{{$.i18n.Tr (printf "repo.%s" .DetailedStatus)}}'></i>{{end}} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<!-- 任务类型 --> |
|
|
|
<div class="one wide column text center nowrap" style="width: 6% !important;"> |
|
|
|
<span style="font-size: 12px;">{{.JobType}} </span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 任务创建时间 --> |
|
|
|
<div class="two wide column text center nowrap" style="width: 8% !important;"> |
|
|
|
<span style="font-size: 12px;" |
|
|
|
class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> |
|
|
|
</div> |
|
|
|
<!-- 任务运行时间 --> |
|
|
|
<div class="one wide column text center nowrap" style="width: 5% !important;"> |
|
|
|
<span style="font-size: 12px;" |
|
|
|
id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- 计算资源 --> |
|
|
|
<div class="one wide column text center nowrap" style="width: 5% !important;"> |
|
|
|
<span |
|
|
|
style="font-size: 12px;" title="{{.ComputeResource}}">{{if .ComputeResource}}{{.ComputeResource}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- 智算中心 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:7% !important;"> |
|
|
|
<span style="font-size: 12px;" id="cluster-{{$JobID}}" class="aicenter_{{.DisplayJobName}}_{{$JobID}}" title="{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}">{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- XPU类型 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:7% !important;"> |
|
|
|
<span style="font-size: 12px;" title="" class="card_type_{{.DisplayJobName}}_{{$JobID}}"></span> |
|
|
|
</div> |
|
|
|
<script> |
|
|
|
(function(){ |
|
|
|
var spec = {{.Spec}} || {}; |
|
|
|
var cardType = getListValueWithKey(ACC_CARD_TYPE, spec.AccCardType) || '--'; |
|
|
|
var spanEl = document.querySelector('.card_type_{{.DisplayJobName}}_{{$JobID}}'); |
|
|
|
spanEl.setAttribute('title', cardType); |
|
|
|
spanEl.innerText = cardType; |
|
|
|
|
|
|
|
var cluster = {{.Cluster}} || '--'; |
|
|
|
var clusterName = document.querySelector('.cloudbrain_debug').dataset['cluster' + cluster[0] + cluster.toLocaleLowerCase().slice(1)] || '--'; |
|
|
|
spanEl = document.querySelector('.cluster_{{.DisplayJobName}}_{{$JobID}}'); |
|
|
|
spanEl.setAttribute('title', cluster); |
|
|
|
spanEl.innerText = clusterName; |
|
|
|
|
|
|
|
// var aiCenter = spec.AiCenterName || '--'; |
|
|
|
// spanEl = document.querySelector('.aicenter_{{.DisplayJobName}}_{{$JobID}}'); |
|
|
|
// spanEl.setAttribute('title', aiCenter); |
|
|
|
// spanEl.innerText = aiCenter; |
|
|
|
})(); |
|
|
|
</script> |
|
|
|
<!-- 创建者 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:4% !important;"> |
|
|
|
{{if .User.Name}} |
|
|
|
<a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img |
|
|
|
class="ui avatar image" src="{{.User.RelAvatarLink}}"></a> |
|
|
|
{{else}} |
|
|
|
<a title="Ghost"><img class="ui avatar image" |
|
|
|
src="{{AppSubUrl}}/user/avatar/Ghost/-1"></a> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
<!-- 项目 --> |
|
|
|
<div class="two wide column text center nowrap" style="width:10% !important;"> |
|
|
|
<a href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}" |
|
|
|
title="{{.Repo.OwnerName}}/{{.Repo.Alias}}">{{.Repo.OwnerName}}/{{.Repo.Alias}}</a> |
|
|
|
</div> |
|
|
|
<!-- 云脑侧名称 --> |
|
|
|
<div class="two wide column text center nowrap" |
|
|
|
style="overflow: hidden;text-overflow:ellipsis;width:10% !important;"> |
|
|
|
<span class="ui poping up clipboard" data-position="top center" id="clipboard-btn-{{.JobName}}" style="cursor:pointer" |
|
|
|
data-clipboard-text="{{.JobName}}" |
|
|
|
data-original="{{$.i18n.Tr "repo.copy"}}" |
|
|
|
data-success="{{$.i18n.Tr "repo.copied"}}" |
|
|
|
data-error="{{$.i18n.Tr "repo.copied_error"}}" |
|
|
|
data-content="{{$.i18n.Tr "repo.copy"}}" |
|
|
|
data-variation="inverted tiny" |
|
|
|
> |
|
|
|
<span class="fitted" title="{{.JobName}}">{{.JobName}}</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<div class="two wide column text center nowrap" style="width: 14%!important;"> |
|
|
|
{{if eq .JobType "DEBUG"}} |
|
|
|
<div class="ui compact buttons"> |
|
|
|
<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" "CREATED_FAILED"}}disabled {{else}}blue {{end}}button' |
|
|
|
data-jobid="{{$JobID}}" |
|
|
|
data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}/{{$JobID}}/'> |
|
|
|
{{$.i18n.Tr "repo.debug"}} |
|
|
|
</a> |
|
|
|
{{else}} |
|
|
|
{{if not .BootFile}} |
|
|
|
<a id="ai-debug-{{$JobID}}" |
|
|
|
class='ui basic ai_debug {{if eq .Status "CREATING" "STOPPING" "WAITING" "STARTING" "CREATED_FAILED"}} disabled {{else}}blue {{end}}button' |
|
|
|
data-jobid="{{$JobID}}" |
|
|
|
data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}/{{$JobID}}/'> |
|
|
|
{{$.i18n.Tr "repo.debug_again"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{if eq .JobType "ONLINEINFERENCE"}} |
|
|
|
<div class="ui compact buttons"> |
|
|
|
<form id="debugAgainForm-{{$JobID}}"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
<a id="ai-debug-infer-{{$JobID}}" |
|
|
|
class='ui basic ai_debug {{if eq .Status "RUNNING"}} blue {{else}} disabled {{end}}button' |
|
|
|
data-jobid="{{$JobID}}" |
|
|
|
data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}/{{$JobID}}/'> |
|
|
|
{{$.i18n.Tr "repo.online_debug"}} |
|
|
|
</a> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{if eq .JobType "HPC"}} |
|
|
|
<div class="ui compact buttons"> |
|
|
|
<form id="debugAgainForm-{{$JobID}}"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
<a id="ai-debug-infer-{{$JobID}}" |
|
|
|
class='ui basic ai_debug {{if eq .Status "RUNNING"}} blue {{else}} disabled {{end}}button' |
|
|
|
data-jobid="{{$JobID}}" |
|
|
|
data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}/{{$JobID}}/'> |
|
|
|
{{$.i18n.Tr "repo.start_use"}} |
|
|
|
</a> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
<!-- 停止任务 --> |
|
|
|
<div class="ui compact buttons"> |
|
|
|
{{if eq .JobType "MODELSAFETY"}} |
|
|
|
<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 "RUNNING" "WAITING"}} blue {{else}} disabled {{end}} button' |
|
|
|
data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/modelsafety/{{$JobID}}/stop' |
|
|
|
data-jobid="{{$JobID}}"> |
|
|
|
{{$.i18n.Tr "repo.stop"}} |
|
|
|
</a> |
|
|
|
</form> |
|
|
|
{{else}} |
|
|
|
{{if eq .JobType "DEBUG" "HPC" "BENCHMARK" "SNN4IMAGENET" "BRAINSCORE" "SNN4ECOSET" "SIM2BRAIN_SNN" "ONLINEINFERENCE"}} |
|
|
|
<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 "RUNNING" "WAITING"}} blue {{else}} disabled {{end}} button' |
|
|
|
data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else if eq .JobType "BENCHMARK" }}/cloudbrain/benchmark{{else if eq .ComputeResource "NPU" }}/modelarts/notebook{{end}}{{end}}/{{$JobID}}/stop' |
|
|
|
data-jobid="{{$JobID}}" data-bootfile="{{.BootFile}}"> |
|
|
|
{{$.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 "RUNNING" "WAITING"}} blue {{else}} disabled {{end}} button" |
|
|
|
data-repopath="{{.Repo.OwnerName}}/{{.Repo.Name}}/{{if eq .JobType "INFERENCE"}}{{if eq .Cloudbrain.Type 1}}modelarts/inference-job{{else}}cloudbrain/train-job{{end}}{{else if eq .JobType "TRAIN"}}{{if eq .Cloudbrain.Type 1}}modelarts/train-job{{else if eq .Cloudbrain.Type 0}}cloudbrain/train-job{{else if eq .Cloudbrain.Type 2}}grampus/train-job{{end}}{{end}}" |
|
|
|
data-jobid="{{$JobID}}" |
|
|
|
data-cloudbrainid="{{.Cloudbrain.ID}}" |
|
|
|
data-version="{{.VersionName}}"> |
|
|
|
{{$.i18n.Tr "repo.stop"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
<!-- 修改任务 --> |
|
|
|
{{if and (eq .JobType "TRAIN") (not .FineTune)}} |
|
|
|
<div class="ui compact buttons __btn_edit__"> |
|
|
|
<a style="padding: 0.5rem 1rem;" class="ui basic blue button" href='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .Cloudbrain.Type 1}}/modelarts/train-job{{else if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{else if eq .Cloudbrain.Type 2}}/grampus/train-job/{{if eq .ComputeResource "CPU/GPU"}}gpu{{else}}{{ToLower .ComputeResource}}{{end}}{{end}}/create?modify=true&id={{$JobID}}'> |
|
|
|
{{$.i18n.Tr "repo.modelarts.modify"}} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
<!-- 删除任务 --> |
|
|
|
{{if eq .JobType "MODELSAFETY"}} |
|
|
|
<form class="ui compact buttons" id="delForm-{{$JobID}}" |
|
|
|
action='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/modelsafety/{{$JobID}}/del?isadminpage=true' |
|
|
|
method="post"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
<input type="hidden" value="{{.Cloudbrain.ID}}" style="display:none" name="id" /> |
|
|
|
<a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="ai-delete-{{$JobID}}" |
|
|
|
class="ui basic ai_delete blue button" |
|
|
|
style="border-radius: .28571429rem;"> |
|
|
|
{{$.i18n.Tr "repo.delete"}} |
|
|
|
</a> |
|
|
|
</form> |
|
|
|
{{else}} |
|
|
|
<form class="ui compact buttons" id="delForm-{{$JobID}}" |
|
|
|
action='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "BENCHMARK"}}/cloudbrain/benchmark{{else if or (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE") (eq .JobType "SNN4ECOSET") (eq .JobType "SIM2BRAIN_SNN")}}/cloudbrain{{else if eq .JobType "DEBUG" "ONLINEINFERENCE" "HPC"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "TRAIN"}}{{if eq .Cloudbrain.Type 1}}/modelarts/train-job{{else if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{else if eq .Cloudbrain.Type 2}}/grampus/train-job{{end}}{{else if eq .JobType "INFERENCE"}}{{if eq .Cloudbrain.Type 0}}/cloudbrain/train-job{{else if eq .Cloudbrain.Type 1}}/modelarts/train-job{{else if eq .Cloudbrain.Type 2}}/grampus/train-job{{end}}{{end}}/{{$JobID}}/del?isadminpage=true' |
|
|
|
method="post"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
<input type="hidden" value="{{.Cloudbrain.ID}}" style="display:none" name="id" /> |
|
|
|
<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}}" |
|
|
|
data-cloudbrainid="{{.Cloudbrain.ID}}" |
|
|
|
class="ui basic ai_delete blue button" |
|
|
|
style="border-radius: .28571429rem;"> |
|
|
|
{{$.i18n.Tr "repo.delete"}} |
|
|
|
</a> |
|
|
|
</form> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{else}} |
|
|
|
{{$JobID := '0'}} |
|
|
|
{{if eq .JobType "DEBUG" "TRAIN" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK" "SNN4ECOSET" "SIM2BRAIN_SNN"}} |
|
|
|
{{$JobID = .Cloudbrain.ID}} |
|
|
|
{{else}} |
|
|
|
{{$JobID = .JobID}} |
|
|
|
{{end}} |
|
|
|
<div class="ui grid stackable item"> |
|
|
|
<div class="row"> |
|
|
|
<!-- 任务名 --> |
|
|
|
<div class="two wide column nowrap" style="width:10% !important;"> |
|
|
|
{{if eq .JobType "DEBUG"}} |
|
|
|
<a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<span class="fitted" |
|
|
|
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "INFERENCE"}} |
|
|
|
<a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<span class="fitted" |
|
|
|
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "TRAIN"}} |
|
|
|
<a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<span class="fitted" |
|
|
|
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{else if eq .JobType "BENCHMARK"}} |
|
|
|
<a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px"> |
|
|
|
<span class="fitted" |
|
|
|
style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
<!-- 集群 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:6% !important;"> |
|
|
|
<span |
|
|
|
style="font-size: 12px;">{{if .Cluster}}{{.Cluster}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- 任务状态 --> |
|
|
|
<div class="two wide column text center nowrap" |
|
|
|
style="width: 8% !important;"> |
|
|
|
<span class="job-status" id="{{$JobID}}" |
|
|
|
data-repopath='{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "DEBUG" "ONLINEINFERENCE" "HPC"}}{{if eq .Cloudbrain.Type 2}}/grampus/notebook{{else}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}{{end}}{{else if eq .JobType "INFERENCE"}}/modelarts/inference-job{{else if eq .JobType "TRAIN"}}/modelarts/train-job{{else if eq .JobType "BENCHMARK" "MODELSAFETY"}}/cloudbrain{{end}}' |
|
|
|
data-jobid="{{$JobID}}" data-version="{{.VersionName}}" |
|
|
|
data-cloudbrainid="{{.Cloudbrain.ID}}" data-datamigrate='{{$.i18n.Tr "repo.migratingData"}}' data-centerpend='{{$.i18n.Tr "repo.centerPending"}}'> |
|
|
|
<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> |
|
|
|
{{if eq .Status "WAITING"}}<i id="{{$JobID}}-icon-detail" class="{{.DetailedStatus}}" style="vertical-align: middle;" title='{{$.i18n.Tr (printf "repo.%s" .DetailedStatus)}}'></i>{{end}} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<!-- 任务类型 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:6% !important;"> |
|
|
|
<span style="font-size: 12px;">{{.JobType}} </span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 任务创建时间 --> |
|
|
|
<div class="two wide column text center nowrap" style="width: 8% !important;"> |
|
|
|
<span style="font-size: 12px;" |
|
|
|
class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> |
|
|
|
</div> |
|
|
|
<!-- 任务运行时间 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:5% !important;"> |
|
|
|
<span style="font-size: 12px;" |
|
|
|
id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- 计算资源 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:5% !important;"> |
|
|
|
<span |
|
|
|
style="font-size: 12px;" title="{{.ComputeResource}}">{{if .ComputeResource}}{{.ComputeResource}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- 智算中心 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:7% !important;"> |
|
|
|
<span |
|
|
|
style="font-size: 12px;">{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}</span> |
|
|
|
</div> |
|
|
|
<!-- XPU类型 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:7% !important;"> |
|
|
|
<span style="font-size: 12px;" title="{{.CardType}}"> |
|
|
|
{{if .CardType}}{{.CardType}}{{else}}--{{end}} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<!-- 创建者 --> |
|
|
|
<div class="one wide column text center nowrap" style="width:4% !important;"> |
|
|
|
{{if .User.Name}} |
|
|
|
<a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img |
|
|
|
class="ui avatar image" src="{{.User.RelAvatarLink}}"></a> |
|
|
|
{{else}} |
|
|
|
<a title="Ghost"><img class="ui avatar image" |
|
|
|
src="{{AppSubUrl}}/user/avatar/Ghost/-1"></a> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
<!-- 项目 --> |
|
|
|
<div class="two wide column text center nowrap" style="width:10% !important;"> |
|
|
|
<a href="" title="">--</a> |
|
|
|
</div> |
|
|
|
<!-- 云脑侧名称 --> |
|
|
|
<div class="two wide column text center nowrap" |
|
|
|
style="overflow: hidden;text-overflow:ellipsis;width:10% !important;"> |
|
|
|
<span class="ui poping up clipboard" data-position="top center" id="clipboard-btn" style="cursor:pointer" |
|
|
|
data-clipboard-text="{{.JobName}}" |
|
|
|
data-success="{{$.i18n.Tr "repo.copy_link_success"}}" |
|
|
|
data-error="{{$.i18n.Tr "repo.copy_link_error"}}" |
|
|
|
data-content="{{$.i18n.Tr "repo.copy_link"}}" |
|
|
|
data-variation="inverted tiny" |
|
|
|
> |
|
|
|
<span class="fitted" title="{{.JobName}}">{{.JobName}}</span> |
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="two wide column text center nowrap" style="width: 14%!important;"> |
|
|
|
{{if eq .JobType "DEBUG"}} |
|
|
|
<div class="ui compact buttons"> |
|
|
|
<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'> |
|
|
|
{{$.i18n.Tr "repo.debug"}} |
|
|
|
</a> |
|
|
|
{{else}} |
|
|
|
<a id="ai-debug-{{$JobID}}" class='ui basic disabled button'> |
|
|
|
{{$.i18n.Tr "repo.debug_again"}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
{{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}}"> |
|
|
|
{{$.i18n.Tr "repo.stop"}} |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<!-- 删除任务 --> |
|
|
|
<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;"> |
|
|
|
{{$.i18n.Tr "repo.delete"}} |
|
|
|
</a> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="app" style="margin-top: 2rem;width:100%;"> |
|
|
|
<div class="center"> |
|
|
|
<el-pagination background @current-change="handleCurrentChange" :current-page="page" |
|
|
|
:page-sizes="[10]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" |
|
|
|
:total="{{.Page.Paginater.Total}}"> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 确认模态框 --> |
|
|
|
<div id="deletemodel"> |
|
|
|
<div class="ui basic modal"> |
|
|
|
<div class="ui icon header"> |
|
|
|
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="content"> |
|
|
|
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> |
|
|
|
</div> |
|
|
|
<div class="actions"> |
|
|
|
<div class="ui red basic inverted cancel button"> |
|
|
|
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} |
|
|
|
</div> |
|
|
|
<div class="ui green basic inverted ok button"> |
|
|
|
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ui modal debug-again-alert"> |
|
|
|
<div class="ui message" style="background-color: rgba(242, 113, 28, 0.05);border: 1px solid rgba(242, 113, 28, 1);border-radius: 5px;"> |
|
|
|
<div style="display: flex;align-items: center;"> |
|
|
|
<i class="ri-information-line" style="font-size: 35px;color: rgba(242, 113, 28, 1);;"></i> |
|
|
|
<div style="text-align: left;margin-left: 1rem;"> |
|
|
|
<div style="font-weight: 600;line-height: 2;">{{.i18n.Tr "repo.cloudbrain.morethanonejob1" | Safe }}</div> |
|
|
|
<div style="color:#939393">{{.i18n.Tr "repo.cloudbrain.morethanonejob2" | Safe}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="__vue-root"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<script> |
|
|
|
document.addEventListener('DOMContentLoaded', function() { |
|
|
|
var editbtns = $('.__btn_edit__'); |
|
|
|
var curHref = window.location.href; |
|
|
|
for (var i = 0, iLen = editbtns.length; i < iLen; i++) { |
|
|
|
var buttonEl = editbtns.eq(i).find('a'); |
|
|
|
var oHref = buttonEl.attr('href'); |
|
|
|
var hasSearch = oHref.split('?').length > 1; |
|
|
|
buttonEl.attr('href', oHref + (hasSearch ? '&' : '?') + 'backurl=' + encodeURIComponent(curHref)); |
|
|
|
} |
|
|
|
}); |
|
|
|
</script> |
|
|
|
{{template "base/footer" .}} |
|
|
|
<script src="{{StaticUrlPrefix}}/js/vp-cloudbrain-tasks.js?v={{MD5 AppVer}}"></script> |
|
|
|
{{template "base/footer" .}} |