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.

show.tmpl 27 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. {{template "base/head" .}}
  2. <div class="repository">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <h4 class="ui header" id="vertical-segment">
  6. <div class="ui breadcrumb">
  7. <a class="section" href="{{.RepoLink}}/debugjob?debugListType=all">
  8. {{.i18n.Tr "repo.cloudbrain"}}
  9. </a>
  10. <div class="divider"> / </div>
  11. <a class="section backTodeBug" href="{{.RepoLink}}/debugjob?debugListType=all">
  12. {{$.i18n.Tr "repo.modelarts.notebook"}}
  13. </a>
  14. <div class="divider"> / </div>
  15. {{with .task}}
  16. <div class="active section">{{.DisplayJobName}}</div>
  17. {{end}}
  18. </div>
  19. </h4>
  20. {{with .task}}
  21. <div class="ui accordion border-according" id="accordion" data-repopath="{{$.RepoRelPath}}/grampus/notebook"
  22. data-jobid="{{.ID}}" data-version="">
  23. <div class="active title padding0">
  24. <div class="according-panel-heading">
  25. <div class="accordion-panel-title">
  26. <!-- <i class="dropdown icon"></i> -->
  27. <span class="accordion-panel-title-content">
  28. <span>
  29. <div class="ac-display-inblock title_text acc-margin-bottom">
  30. <span class="cti-mgRight-sm">
  31. {{TimeSinceUnix1 .CreatedUnix}}
  32. </span>
  33. <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}:
  34. <span id="{{.VersionName}}-status-span"><i id="icon"
  35. style="vertical-align: middle;" class="{{.Status}}"></i><span id="text"
  36. style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
  37. </span>
  38. <span
  39. class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span>
  40. <span class="cti-mgRight-sm uc-accordionTitle-black"
  41. id="{{.VersionName}}-duration-span">{{ConvertDurationToStr .Duration}}</span>
  42. <span class="refresh-status" data-tooltip="刷新" style="cursor: pointer;" data-inverted="" data-version="{{.VersionName}}">
  43. <i class="redo icon redo-color"></i>
  44. </span>
  45. </div>
  46. </span>
  47. </span>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="active content">
  52. <div class="content-pad">
  53. <div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);">
  54. <a class="active item" data-tab="first">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a>
  55. </div>
  56. <div class="ui tab active" data-tab="first">
  57. <div style="padding-top: 10px;">
  58. <div class="tab_2_content">
  59. <div class="ac-grid ac-grid-col2">
  60. <div class="ac-grid-col">
  61. <table class="ti-form">
  62. <tbody class="ti-text-form">
  63. <tr class="ti-no-ng-animate">
  64. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  65. {{$.i18n.Tr "repo.cloudbrain_task"}}
  66. </td>
  67. <td class="ti-text-form-content">
  68. <div class="text-span text-span-w">
  69. {{.DisplayJobName}}
  70. </div>
  71. </td>
  72. </tr>
  73. <tr class="ti-no-ng-animate">
  74. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  75. {{$.i18n.Tr "repo.modelarts.status"}}
  76. </td>
  77. <td class="ti-text-form-content">
  78. <div class="text-span text-span-w" id="{{.VersionName}}-status">
  79. {{.Status}}
  80. </div>
  81. </td>
  82. </tr>
  83. <tr class="ti-no-ng-animate">
  84. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  85. {{$.i18n.Tr "repo.cloudbrain_creator"}}
  86. </td>
  87. <td class="ti-text-form-content">
  88. <div class="text-span text-span-w">
  89. {{.User.Name}}
  90. </div>
  91. </td>
  92. </tr>
  93. <tr class="ti-no-ng-animate">
  94. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  95. {{$.i18n.Tr "repo.modelarts.code_version"}}
  96. </td>
  97. <td class="ti-text-form-content">
  98. <div class="text-span text-span-w">
  99. {{if .BranchName}}
  100. {{.BranchName}}
  101. {{else}}
  102. --
  103. {{end}}
  104. <span style="margin-left:1rem" class="ui label">{{SubStr .CommitID 0 10}}</span>
  105. </div>
  106. </td>
  107. </tr>
  108. <tr class="ti-no-ng-animate">
  109. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  110. {{$.i18n.Tr "repo.modelarts.computing_resources"}}
  111. </td>
  112. <td class="ti-text-form-content">
  113. <div class="text-span text-span-w"
  114. id="{{.VersionName}}-computeresource">
  115. {{.ComputeResource}}
  116. </div>
  117. </td>
  118. </tr>
  119. <tr class="ti-no-ng-animate">
  120. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  121. {{$.i18n.Tr "cloudbrain.gpu_type"}}
  122. </td>
  123. <td class="ti-text-form-content resorce_type">
  124. <div class="text-span text-span-w"></div>
  125. </td>
  126. </tr>
  127. <tr class="ti-no-ng-animate">
  128. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  129. {{$.i18n.Tr "repo.modelarts.createtime"}}
  130. </td>
  131. <td class="ti-text-form-content">
  132. <div class="text-span text-span-w"
  133. id="{{.VersionName}}-createtime">
  134. {{TimeSinceUnix1 .CreatedUnix}}
  135. </div>
  136. </td>
  137. </tr>
  138. <tr class="ti-no-ng-animate">
  139. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  140. {{$.i18n.Tr "cloudbrain.description"}}
  141. </td>
  142. <td class="ti-text-form-content">
  143. <div class="text-span-new" id="model_description">
  144. {{.Description}}
  145. </div>
  146. </td>
  147. </tr>
  148. </tbody>
  149. </table>
  150. </div>
  151. <div class="ac-grid-col">
  152. <table class="ti-form">
  153. <tbody class="ti-text-form">
  154. <tr class="ti-no-ng-animate">
  155. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  156. {{$.i18n.Tr "cloudbrain.mirror"}}
  157. </td>
  158. <td class="ti-text-form-content">
  159. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  160. <span class="ui poping up clipboard" data-position="top center" id="clipboard-btn-image" style="cursor:pointer"
  161. data-clipboard-text="{{.EngineName}}"
  162. data-success="{{$.i18n.Tr "repo.copied"}}"
  163. data-error="{{$.i18n.Tr "repo.copied_error"}}"
  164. data-content="{{$.i18n.Tr "repo.copy"}}"
  165. data-variation="inverted tiny"
  166. >
  167. <span title="{{.EngineName}}">{{.EngineName}}</span>
  168. </span>
  169. </div>
  170. </td>
  171. </tr>
  172. <tr class="ti-no-ng-animate">
  173. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  174. {{$.i18n.Tr "repo.modelarts.train_job.standard"}}
  175. </td>
  176. <td class="ti-text-form-content spec">
  177. <div class="text-span text-span-w"></div>
  178. </td>
  179. </tr>
  180. {{if eq .ComputeResource "CPU/GPU"}}
  181. <tr class="ti-no-ng-animate">
  182. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  183. {{$.i18n.Tr "cloudbrain.code_storage_path"}}
  184. </td>
  185. <td class="ti-text-form-content">
  186. <div class="text-span text-span-w" id="code_storage_path">
  187. {{$.code_path}}
  188. </div>
  189. </td>
  190. </tr>
  191. <tr class="ti-no-ng-animate">
  192. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  193. {{$.i18n.Tr "cloudbrain.dataset_storage_path"}}
  194. </td>
  195. <td class="ti-text-form-content">
  196. <div class="text-span text-span-w" id="dataset_storage_path">
  197. {{$.dataset_path}}
  198. </div>
  199. </td>
  200. </tr>
  201. <tr class="ti-no-ng-animate">
  202. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  203. {{$.i18n.Tr "cloudbrain.model_storage_path"}}
  204. </td>
  205. <td class="ti-text-form-content">
  206. <div class="text-span text-span-w" id="code_storage_path">
  207. /pretrainmodel
  208. </div>
  209. </td>
  210. </tr>
  211. <tr class="ti-no-ng-animate">
  212. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  213. {{$.i18n.Tr "cloudbrain.output_storage_path"}}
  214. </td>
  215. <td class="ti-text-form-content">
  216. <div class="text-span text-span-w" id="model_storage_path">
  217. {{$.model_path}}
  218. </div>
  219. </td>
  220. </tr>
  221. {{end}}
  222. <tr class="ti-no-ng-animate">
  223. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  224. {{$.i18n.Tr "repo.grampus.train_job.ai_center"}}
  225. </td>
  226. <td class="ti-text-form-content">
  227. <div class="text-span text-span-w" id="{{.VersionName}}-ai_center">
  228. {{if .AiCenter}}{{.AiCenter}}{{else}}--{{end}}
  229. </div>
  230. </td>
  231. </tr>
  232. <tr class="ti-no-ng-animate">
  233. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  234. {{$.i18n.Tr "repo.cloudbrain.time.starttime"}}
  235. </td>
  236. <td class="ti-text-form-content">
  237. <div class="text-span text-span-w">
  238. <div class="text-span text-span-w"
  239. id="{{.VersionName}}-startTime">
  240. {{if not (eq .StartTime 0)}}
  241. {{TimeSinceUnix1 .StartTime}}
  242. {{else}}
  243. --
  244. {{end}}
  245. </div>
  246. </div>
  247. </td>
  248. </tr>
  249. <tr class="ti-no-ng-animate">
  250. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  251. {{$.i18n.Tr "repo.cloudbrain.time.endtime"}}
  252. </td>
  253. <td class="ti-text-form-content">
  254. <div class="text-span text-span-w"
  255. id="{{.VersionName}}-EndTime">
  256. {{if not (eq .EndTime 0)}}
  257. {{TimeSinceUnix1 .EndTime}}
  258. {{else}}
  259. --
  260. {{end}}
  261. </div>
  262. </td>
  263. </tr>
  264. <tr class="ti-no-ng-animate">
  265. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  266. {{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}
  267. </td>
  268. <td class="ti-text-form-content">
  269. <div class="text-span text-span-w"
  270. id="{{.VersionName}}-duration">
  271. {{if not (eq .Duration 0)}}
  272. {{ConvertDurationToStr .Duration}}
  273. {{else}}
  274. --
  275. {{end}}
  276. </div>
  277. </td>
  278. </tr>
  279. {{if eq .ComputeResource "NPU"}}
  280. <tr class="ti-no-ng-animate">
  281. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  282. 代码obs地址
  283. </td>
  284. <td class="ti-text-form-content">
  285. <div class="text-span text-span-w" id="{{.VersionName}}-trainUrl">
  286. <span class="ui poping up clipboard" data-position="top center" id="clipboard-btn-trainUrl" style="cursor:pointer"
  287. data-clipboard-text="{{.TrainUrl}}"
  288. data-success="{{$.i18n.Tr "repo.copied"}}"
  289. data-error="{{$.i18n.Tr "repo.copied_error"}}"
  290. data-content="{{$.i18n.Tr "repo.copy"}}"
  291. data-variation="inverted tiny"
  292. >
  293. <span title="{{.TrainUrl}}">
  294. {{if .TrainUrl}}
  295. {{.TrainUrl}}
  296. {{else}}
  297. --
  298. {{end}}
  299. </span>
  300. </span>
  301. </div>
  302. </td>
  303. </tr>
  304. {{end}}
  305. </tbody>
  306. </table>
  307. </div>
  308. </div>
  309. </div>
  310. <div style="clear:both">
  311. <table style="border:none" class="ui fixed small stackable table">
  312. <thead>
  313. <tr><th style="color: #8a8e99;font-size:12px" class="three wide left aligned">{{$.i18n.Tr "dataset.file"}}</th>
  314. <th style="color: #8a8e99;font-size:12px"class="eleven wide">{{$.i18n.Tr "dataset.download_url"}}</th>
  315. <th style="color: #8a8e99;font-size:12px" class="two wide center aligned">{{$.i18n.Tr "dataset.download_oper"}}</th>
  316. </tr></thead>
  317. <tbody>
  318. {{range $.datasetDownload}}
  319. <tr>
  320. <td class="dataset_nowrap_two_line">
  321. {{if eq .IsDelete true}}
  322. {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}})
  323. {{else}}
  324. <a href="{{.RepositoryLink}}" target="_blank">{{.DatasetName}}</a>
  325. {{end}}
  326. </td>
  327. <td><div class="dataset_nowrap_two_line">{{.DatasetDownloadLink}}</div></td>
  328. <td class="center aligned"><a class="ui poping up clipboard" id="clipboard-btn-dataset" data-original="{{$.i18n.Tr "repo.copy_link"}}" 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" data-clipboard-text="{{.DatasetDownloadLink}}">{{$.i18n.Tr "dataset.download_copy"}}</a></td>
  329. </tr>
  330. {{end}}
  331. </tbody>
  332. </table>
  333. </div>
  334. </div>
  335. </div>
  336. </div>
  337. </div>
  338. </div>
  339. {{end}}
  340. {{template "base/paginate" .}}
  341. </div>
  342. <!-- 确认模态框 -->
  343. <div id="deletemodel">
  344. <div class="ui basic modal">
  345. <div class="ui icon header">
  346. <i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}}
  347. </div>
  348. <div class="content">
  349. <p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p>
  350. </div>
  351. <div class="actions">
  352. <div class="ui red basic inverted cancel button">
  353. <i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}}
  354. </div>
  355. <div class="ui green basic inverted ok button">
  356. <i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}}
  357. </div>
  358. </div>
  359. </div>
  360. </div>
  361. </div>
  362. {{template "base/footer" .}}
  363. <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script>
  364. <script>
  365. console.log({{.task}});
  366. ;(function() {
  367. var SPEC = {{ .Spec }};
  368. var showPoint = false;
  369. var specStr = window.renderSpecStr(SPEC, showPoint, {
  370. gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}},
  371. free: {{$.i18n.Tr "cloudbrain.free"}},
  372. point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}},
  373. memory: {{$.i18n.Tr "cloudbrain.memory"}},
  374. shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}},
  375. });
  376. $('td.ti-text-form-content.spec div').text(specStr);
  377. })();
  378. </script>