You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

list.tmpl 33 kB

4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. {{template "base/head" .}}
  2. <!-- 弹窗 -->
  3. <div id="mask">
  4. <div id="loadingPage">
  5. <div class="rect1"></div>
  6. <div class="rect2"></div>
  7. <div class="rect3"></div>
  8. <div class="rect4"></div>
  9. <div class="rect5"></div>
  10. </div>
  11. </div>
  12. <!-- 提示框 -->
  13. <div class="alert"></div>
  14. <div class="admin user">
  15. <div class="cloudbrain_debug" style="display: none;" data-debug="{{$.i18n.Tr "repo.debug"}}"
  16. data-debug-again="{{$.i18n.Tr "repo.debug_again"}}"
  17. data-all-cluster="{{.i18n.Tr "cloudbrain.all_resource_cluster"}}"
  18. data-all-aiCenter="{{.i18n.Tr "cloudbrain.all_ai_center"}}"
  19. data-cluster-c2net="{{.i18n.Tr "cloudbrain.resource_cluster_c2net"}}"
  20. data-cluster-openi="{{.i18n.Tr "cloudbrain.resource_cluster_openi"}}"
  21. data-all-task="{{.i18n.Tr "admin.cloudbrain.all_task_types"}}"
  22. data-all-compute="{{.i18n.Tr "admin.cloudbrain.all_computing_resources"}}"
  23. data-all-status="{{.i18n.Tr "admin.cloudbrain.all_status"}}"></div>
  24. {{template "admin/navbar" .}}
  25. <div class="ui container">
  26. {{template "base/alert" .}}
  27. <div class="ui grid" style="margin:0">
  28. <div class="row" style="border: 1px solid #d4d4d5;margin-top: 0px;padding-top: 0;">
  29. {{template "admin/cloudbrain/search" .}}
  30. <div class="ui six wide column right aligned" style="margin: 1rem 0;">
  31. <a class="ui compact blue basic icon button" style="box-shadow: none !important; padding: 0.8em;"
  32. href="/admin/cloudbrains/download"><i
  33. class="ri-download-line middle aligned icon"></i>{{.i18n.Tr "admin.cloudbrain.download_report"}}</a>
  34. </div>
  35. <div class="ui sixteen wide column" style="overflow-x:auto;">
  36. <!-- 任务展示 -->
  37. <div class="dataset list" style="min-width:2100px;margin-top:15px;margin-bottom:15px;">
  38. <!-- 表头 -->
  39. <div class="ui grid stackable" style="background: #f0f0f0;;">
  40. <div class="row">
  41. <div class="two wide column nowrap" style="width:10% !important;">
  42. <span>{{$.i18n.Tr "repo.cloudbrain_task"}}</span>
  43. </div>
  44. <!-- 集群 -->
  45. <div class="one wide column text center nowrap" style="width:6% !important;">
  46. <span>{{$.i18n.Tr "repo.modelarts.cluster"}}</span>
  47. </div>
  48. <div class="two wide column text center nowrap" style="width: 6% !important;">
  49. <span>{{$.i18n.Tr "repo.modelarts.status"}}</span>
  50. </div>
  51. <div class="one wide column text center nowrap" style="width:6% !important;">
  52. <span>{{$.i18n.Tr "repo.cloudbrain_task_type"}}</span>
  53. </div>
  54. <div class="two wide column text center nowrap" style="width: 8% !important;">
  55. <span>{{$.i18n.Tr "repo.modelarts.createtime"}}</span>
  56. </div>
  57. <div class="one wide column text center nowrap" style="width: 5% !important;">
  58. <span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span>
  59. </div>
  60. <div class="one wide column text center nowrap" style="width: 5% !important;">
  61. <span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span>
  62. </div>
  63. <!-- 智算中心 -->
  64. <div class="one wide column text center nowrap" style="width:8% !important;">
  65. <span>{{$.i18n.Tr "repo.modelarts.ai_center"}}</span>
  66. </div>
  67. <!-- XPU类型 -->
  68. <div class="one wide column text center nowrap" style="width:8% !important;">
  69. <span>{{$.i18n.Tr "repo.modelarts.card_type"}}</span>
  70. </div>
  71. <div class="one wide column text center nowrap" style="width:4% !important;">
  72. <span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span>
  73. </div>
  74. <div class="two wide column text center nowrap" style="width:10% !important;">
  75. <span>{{$.i18n.Tr "repository"}}</span>
  76. </div>
  77. <div class="two wide column text center nowrap" style="width:10% !important;">
  78. <span>{{.i18n.Tr "admin.cloudbrain.cloudbrain_name"}}</span>
  79. </div>
  80. <div class="two wide column text center nowrap" style="width: 12%!important;">
  81. <span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span>
  82. </div>
  83. </div>
  84. </div>
  85. {{range .Tasks}}
  86. {{if .Repo}}
  87. <div class="ui grid stackable item">
  88. <div class="row">
  89. <!-- 任务名 -->
  90. {{$JobID := '0'}}
  91. {{if eq .JobType "DEBUG" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK"}}
  92. {{$JobID = .Cloudbrain.ID}}
  93. {{else}}
  94. {{$JobID = .JobID}}
  95. {{end}}
  96. <!-- {{$JobID}} -->
  97. <div class="two wide column nowrap" style="width:10% !important;">
  98. {{if eq .JobType "DEBUG"}}
  99. <a class="title"
  100. href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain/{{$JobID}}{{else}}/modelarts/notebook/{{$JobID}}{{end}}"
  101. title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
  102. <span class="fitted"
  103. style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
  104. </a>
  105. {{else if or (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE")}}
  106. <a class="title"
  107. href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/cloudbrain/benchmark/{{$JobID}}"
  108. title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
  109. <span class="fitted"
  110. style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
  111. </a>
  112. {{else if eq .JobType "INFERENCE"}}
  113. <a class="title"
  114. href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/{{if eq .Cloudbrain.Type 1}}modelarts{{else if eq .Cloudbrain.Type 0}}cloudbrain{{end}}/inference-job/{{$JobID}}"
  115. title="{{.DisplayJobName}}" style="font-size: 14px;">
  116. <span class="fitted"
  117. style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
  118. </a>
  119. {{else if eq .JobType "TRAIN"}}
  120. <a class="title"
  121. 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}}"
  122. title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
  123. <span class="fitted"
  124. style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
  125. </a>
  126. {{else if eq .JobType "BENCHMARK"}}
  127. <a class="title"
  128. href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}/cloudbrain/benchmark/{{$JobID}}"
  129. title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
  130. <span class="fitted"
  131. style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
  132. </a>
  133. {{end}}
  134. </div>
  135. <!-- 集群 -->
  136. <div class="one wide column text center nowrap" style="width:6% !important;">
  137. <span
  138. style="font-size: 12px;">{{if .Cluster}}{{.Cluster}}{{else}}--{{end}}</span>
  139. </div>
  140. <!-- 任务状态 -->
  141. <div class="two wide column text center nowrap"
  142. style="width: 6% !important;">
  143. <span class="job-status" id="{{$JobID}}"
  144. 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}}'
  145. data-jobid="{{$JobID}}" data-version="{{.VersionName}}">
  146. <span><i id="{{$JobID}}-icon" style="vertical-align: middle;"
  147. class="{{.Status}}"></i><span id="{{$JobID}}-text"
  148. style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
  149. </span>
  150. </div>
  151. <!-- 任务类型 -->
  152. <div class="one wide column text center nowrap" style="width: 6% !important;">
  153. <span style="font-size: 12px;">{{.JobType}} </span>
  154. </div>
  155. <!-- 任务创建时间 -->
  156. <div class="two wide column text center nowrap" style="width: 8% !important;">
  157. <span style="font-size: 12px;"
  158. class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span>
  159. </div>
  160. <!-- 任务运行时间 -->
  161. <div class="one wide column text center nowrap" style="width: 5% !important;">
  162. <span style="font-size: 12px;"
  163. id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span>
  164. </div>
  165. <!-- 计算资源 -->
  166. <div class="one wide column text center nowrap" style="width: 5% !important;">
  167. <span
  168. style="font-size: 12px;">{{if .ComputeResource}}{{.ComputeResource}}{{else}}--{{end}}</span>
  169. </div>
  170. <!-- 智算中心 -->
  171. <div class="one wide column text center nowrap" style="width:8% !important;">
  172. <span
  173. style="font-size: 12px;">{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}</span>
  174. </div>
  175. <!-- XPU类型 -->
  176. <div class="one wide column text center nowrap" style="width:8% !important;">
  177. <span style="font-size: 12px;" title="{{.CardType}}">
  178. {{if .CardType}}{{.CardType}}{{else}}--{{end}}
  179. </span>
  180. </div>
  181. <!-- 创建者 -->
  182. <div class="one wide column text center nowrap" style="width:4% !important;">
  183. {{if .User.Name}}
  184. <a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img
  185. class="ui avatar image" src="{{.User.RelAvatarLink}}"></a>
  186. {{else}}
  187. <a title="Ghost"><img class="ui avatar image"
  188. src="{{AppSubUrl}}/user/avatar/Ghost/-1"></a>
  189. {{end}}
  190. </div>
  191. <!-- 项目 -->
  192. <div class="two wide column text center nowrap" style="width:10% !important;">
  193. <a href="{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}"
  194. title="{{.Repo.OwnerName}}/{{.Repo.Alias}}">{{.Repo.OwnerName}}/{{.Repo.Alias}}</a>
  195. </div>
  196. <!-- 云脑侧名称 -->
  197. <div class="two wide column text center nowrap"
  198. style="overflow: hidden;text-overflow:ellipsis;width:10% !important;">
  199. <span class="ui poping up clipboard" data-position="top center" id="clipboard-btn" style="cursor:pointer"
  200. data-clipboard-text="{{.JobName}}"
  201. data-success="{{$.i18n.Tr "repo.copy_link_success"}}"
  202. data-error="{{$.i18n.Tr "repo.copy_link_error"}}"
  203. data-content="{{$.i18n.Tr "repo.copy_link"}}"
  204. data-variation="inverted tiny"
  205. >
  206. <span class="fitted" title="{{.JobName}}">{{.JobName}}</span>
  207. </span>
  208. </div>
  209. <div class="two wide column text center nowrap" style="width: 14%!important;">
  210. {{if eq .JobType "DEBUG"}}
  211. <div class="ui compact buttons">
  212. <form id="debugAgainForm-{{$JobID}}">
  213. {{$.CsrfTokenHtml}}
  214. {{if eq .Status "RUNNING" "WAITING" "CREATING" "STARTING"}}
  215. <a style="margin: 0 1rem;" id="ai-debug-{{$JobID}}"
  216. class='ui basic ai_debug {{if eq .Status "CREATING" "STOPPING" "WAITING" "STARTING"}}disabled {{else}}blue {{end}}button'
  217. data-jobid="{{$JobID}}"
  218. data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{$JobID}}/'>
  219. {{$.i18n.Tr "repo.debug"}}
  220. </a>
  221. {{else}}
  222. <a id="ai-debug-{{$JobID}}"
  223. class='ui basic ai_debug {{if eq .Status "CREATING" "STOPPING" "WAITING" "STARTING"}} disabled {{else}}blue {{end}}button'
  224. data-jobid="{{$JobID}}"
  225. data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{$JobID}}/'>
  226. {{$.i18n.Tr "repo.debug_again"}}
  227. </a>
  228. {{end}}
  229. </form>
  230. </div>
  231. {{end}}
  232. <!-- 停止任务 -->
  233. <div class="ui compact buttons">
  234. {{if eq .JobType "DEBUG" "BENCHMARK" "SNN4IMAGENET" "BRAINSCORE"}}
  235. <form id="stopForm-{{$JobID}}" style="margin-left:-1px;">
  236. {{$.CsrfTokenHtml}}
  237. <a style="padding: 0.5rem 1rem;" id="ai-stop-{{$JobID}}"
  238. class='ui basic ai_stop {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED" "SUCCEEDED" "STOPPED" "STOPPING"}}disabled {{else}} blue {{end}}button'
  239. 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'
  240. data-jobid="{{$JobID}}">
  241. {{$.i18n.Tr "repo.stop"}}
  242. </a>
  243. </form>
  244. {{else}}
  245. <a style="padding: 0.5rem 1rem;" id="ai-stop-{{$JobID}}"
  246. class="ui basic ai_stop_version {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED" "SUCCEEDED" "STOPPED"}}disabled {{else}} blue {{end}}button"
  247. 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}}"
  248. data-jobid="{{$JobID}}" data-version="{{.VersionName}}">
  249. {{$.i18n.Tr "repo.stop"}}
  250. </a>
  251. {{end}}
  252. </div>
  253. <!-- 删除任务 -->
  254. <form class="ui compact buttons" id="delForm-{{$JobID}}"
  255. action='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .JobType "BENCHMARK"}}/cloudbrain/benchmark{{else if or (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE")}}/cloudbrain{{else if eq .JobType "DEBUG"}}{{if eq .ComputeResource "NPU"}}/modelarts/notebook{{else}}/cloudbrain{{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{{end}}{{end}}/{{$JobID}}/del?isadminpage=true'
  256. method="post">
  257. {{$.CsrfTokenHtml}}
  258. <a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="ai-delete-{{$JobID}}"
  259. data-repopath="{{.Repo.OwnerName}}/{{.Repo.Name}}/modelarts/inference-job/{{$JobID}}/del_version?isadminpage=true"
  260. data-version="" class="ui basic ai_delete blue button"
  261. style="border-radius: .28571429rem;">
  262. {{$.i18n.Tr "repo.delete"}}
  263. </a>
  264. </form>
  265. </div>
  266. </div>
  267. </div>
  268. {{else}}
  269. {{$JobID := '0'}}
  270. {{if eq .JobType "DEBUG" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK"}}
  271. {{$JobID = .Cloudbrain.ID}}
  272. {{else}}
  273. {{$JobID = .JobID}}
  274. {{end}}
  275. <div class="ui grid stackable item">
  276. <div class="row">
  277. <!-- 任务名 -->
  278. <div class="two wide column nowrap" style="width:10% !important;">
  279. {{if eq .JobType "DEBUG"}}
  280. <a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
  281. <span class="fitted"
  282. style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
  283. </a>
  284. {{else if eq .JobType "INFERENCE"}}
  285. <a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
  286. <span class="fitted"
  287. style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
  288. </a>
  289. {{else if eq .JobType "TRAIN"}}
  290. <a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
  291. <span class="fitted"
  292. style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
  293. </a>
  294. {{else if eq .JobType "BENCHMARK"}}
  295. <a class="title" href="" title="{{.DisplayJobName}}" style="font-size: 14px;padding-right:0px">
  296. <span class="fitted"
  297. style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
  298. </a>
  299. {{end}}
  300. </div>
  301. <!-- 集群 -->
  302. <div class="one wide column text center nowrap" style="width:6% !important;">
  303. <span
  304. style="font-size: 12px;">{{if .Cluster}}{{.Cluster}}{{else}}--{{end}}</span>
  305. </div>
  306. <!-- 任务状态 -->
  307. <div class="two wide column text center nowrap"
  308. style="width: 6% !important;">
  309. <span class="job-status" id="{{$JobID}}" data-jobid="{{$JobID}}"
  310. data-version="{{.VersionName}}">
  311. <span><i id="{{$JobID}}-icon" style="vertical-align: middle;"
  312. class="{{.Status}}"></i><span id="{{$JobID}}-text"
  313. style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
  314. </span>
  315. </div>
  316. <!-- 任务类型 -->
  317. <div class="one wide column text center nowrap" style="width:6% !important;">
  318. <span style="font-size: 12px;">{{.JobType}} </span>
  319. </div>
  320. <!-- 任务创建时间 -->
  321. <div class="two wide column text center nowrap" style="width: 8% !important;">
  322. <span style="font-size: 12px;"
  323. class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span>
  324. </div>
  325. <!-- 任务运行时间 -->
  326. <div class="one wide column text center nowrap" style="width:5% !important;">
  327. <span style="font-size: 12px;"
  328. id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span>
  329. </div>
  330. <!-- 计算资源 -->
  331. <div class="one wide column text center nowrap" style="width:5% !important;">
  332. <span
  333. style="font-size: 12px;">{{if .ComputeResource}}{{.ComputeResource}}{{else}}--{{end}}</span>
  334. </div>
  335. <!-- 智算中心 -->
  336. <div class="one wide column text center nowrap" style="width:8% !important;">
  337. <span
  338. style="font-size: 12px;">{{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}</span>
  339. </div>
  340. <!-- XPU类型 -->
  341. <div class="one wide column text center nowrap" style="width:8% !important;">
  342. <span style="font-size: 12px;" title="{{.CardType}}">
  343. {{if .CardType}}{{.CardType}}{{else}}--{{end}}
  344. </span>
  345. </div>
  346. <!-- 创建者 -->
  347. <div class="one wide column text center nowrap" style="width:4% !important;">
  348. {{if .User.Name}}
  349. <a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img
  350. class="ui avatar image" src="{{.User.RelAvatarLink}}"></a>
  351. {{else}}
  352. <a title="Ghost"><img class="ui avatar image"
  353. src="{{AppSubUrl}}/user/avatar/Ghost/-1"></a>
  354. {{end}}
  355. </div>
  356. <!-- 项目 -->
  357. <div class="two wide column text center nowrap" style="width:10% !important;">
  358. <a href="" title="">--</a>
  359. </div>
  360. <!-- 云脑侧名称 -->
  361. <div class="two wide column text center nowrap"
  362. style="overflow: hidden;text-overflow:ellipsis;width:10% !important;">
  363. <span class="ui poping up clipboard" data-position="top center" id="clipboard-btn" style="cursor:pointer"
  364. data-clipboard-text="{{.JobName}}"
  365. data-success="{{$.i18n.Tr "repo.copy_link_success"}}"
  366. data-error="{{$.i18n.Tr "repo.copy_link_error"}}"
  367. data-content="{{$.i18n.Tr "repo.copy_link"}}"
  368. data-variation="inverted tiny"
  369. >
  370. <span class="fitted" title="{{.JobName}}">{{.JobName}}</span>
  371. </span>
  372. </div>
  373. <div class="two wide column text center nowrap" style="width: 14%!important;">
  374. {{if eq .JobType "DEBUG"}}
  375. <div class="ui compact buttons">
  376. <form id="debugAgainForm-{{$JobID}}">
  377. {{$.CsrfTokenHtml}}
  378. {{if eq .Status "RUNNING" "WAITING" "CREATING" "STARTING"}}
  379. <a style="margin: 0 1rem;" id="ai-debug-{{$JobID}}"
  380. class='ui basic disabled button'>
  381. {{$.i18n.Tr "repo.debug"}}
  382. </a>
  383. {{else}}
  384. <a id="ai-debug-{{$JobID}}" class='ui basic disabled button'>
  385. {{$.i18n.Tr "repo.debug_again"}}
  386. </a>
  387. {{end}}
  388. </form>
  389. </div>
  390. {{end}}
  391. <!-- 停止任务 -->
  392. <div class="ui compact buttons">
  393. <a style="padding: 0.5rem 1rem;" id="ai-stop-{{$JobID}}"
  394. class="ui basic disabled button" data-jobid="{{$JobID}}"
  395. data-version="{{.VersionName}}">
  396. {{$.i18n.Tr "repo.stop"}}
  397. </a>
  398. </div>
  399. <!-- 删除任务 -->
  400. <form class="ui compact buttons" id="delForm-{{$JobID}}" action='' method="post">
  401. {{$.CsrfTokenHtml}}
  402. <a style="padding: 0.5rem 1rem;margin-left:0.2rem" id="ai-delete-{{$JobID}}"
  403. class="ui basic disabled button" style="border-radius: .28571429rem;">
  404. {{$.i18n.Tr "repo.delete"}}
  405. </a>
  406. </form>
  407. </div>
  408. </div>
  409. </div>
  410. {{end}}
  411. {{end}}
  412. </div>
  413. </div>
  414. <div id="app" style="margin-top: 2rem;width:100%;">
  415. <div class="center">
  416. <el-pagination background @current-change="handleCurrentChange" :current-page="page"
  417. :page-sizes="[10]" :page-size="10" layout="total, sizes, prev, pager, next, jumper"
  418. :total="{{.Page.Paginater.Total}}">
  419. </el-pagination>
  420. </div>
  421. </div>
  422. </div>
  423. </div>
  424. </div>
  425. <!-- 确认模态框 -->
  426. <div id="deletemodel">
  427. <div class="ui basic modal">
  428. <div class="ui icon header">
  429. <i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}}
  430. </div>
  431. <div class="content">
  432. <p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p>
  433. </div>
  434. <div class="actions">
  435. <div class="ui red basic inverted cancel button">
  436. <i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}}
  437. </div>
  438. <div class="ui green basic inverted ok button">
  439. <i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}}
  440. </div>
  441. </div>
  442. </div>
  443. </div>
  444. </div>
  445. {{template "base/footer" .}}