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 29 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
2 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
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
2 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
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
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. {{template "base/head" .}}
  2. <style>
  3. .according-panel-heading {
  4. box-sizing: border-box;
  5. padding: 8px 16px;
  6. color: #252b3a;
  7. background-color: #f2f5fc;
  8. line-height: 1.5;
  9. cursor: pointer;
  10. -moz-user-select: none;
  11. -webkit-user-select: none;
  12. -ms-user-select: none;
  13. -khtml-user-select: none;
  14. user-select: none;
  15. }
  16. .accordion-panel-title {
  17. margin-top: 0;
  18. margin-bottom: 0;
  19. color: #252b3a;
  20. }
  21. .accordion-panel-title-content {
  22. vertical-align: middle;
  23. display: inline-block;
  24. width: calc(100% - 32px);
  25. cursor: default;
  26. }
  27. .acc-margin-bottom {
  28. margin-bottom: 5px;
  29. }
  30. .title_text {
  31. font-size: 12px;
  32. }
  33. .ac-display-inblock {
  34. display: inline-block;
  35. }
  36. .cti-mgRight-sm {
  37. margin-right: 8px;
  38. }
  39. .ac-text-normal {
  40. font-size: 14px;
  41. color: #575d6c;
  42. }
  43. .uc-accordionTitle-black {
  44. color: #333;
  45. }
  46. .accordion-border {
  47. border: 1px solid #cce2ff;
  48. }
  49. .padding0 {
  50. padding: 0 !important;
  51. }
  52. .content-pad {
  53. padding: 15px 35px;
  54. }
  55. .content-margin {
  56. margin: 10px 5px;
  57. }
  58. .tab_2_content {
  59. min-height: 425px;
  60. margin-left: 10px;
  61. }
  62. .ac-grid {
  63. display: block;
  64. *zoom: 1;
  65. }
  66. .ac-grid-col {
  67. float: left;
  68. width: 100%;
  69. }
  70. .ac-grid-col2 .ac-grid-col {
  71. width: 50%;
  72. }
  73. .ti-form {
  74. text-align: left;
  75. max-width: 100%;
  76. vertical-align: middle;
  77. }
  78. .ti-form>tbody {
  79. font-size: 12px;
  80. }
  81. .ti-form>tbody,
  82. .ti-form>tbody>tr {
  83. vertical-align: inherit;
  84. }
  85. .ti-text-form-label {
  86. padding-bottom: 20px;
  87. padding-right: 20px;
  88. color: #8a8e99;
  89. font-size: 12px;
  90. white-space: nowrap !important;
  91. width: 80px;
  92. line-height: 30px;
  93. }
  94. .ti-text-form-content {
  95. line-height: 30px;
  96. padding-bottom: 20px;
  97. }
  98. .ti-form>tbody>tr>td {
  99. vertical-align: top;
  100. white-space: normal;
  101. }
  102. td,
  103. th {
  104. padding: 0;
  105. }
  106. .ac-grid-col .text-span {
  107. width: 450px;
  108. overflow: hidden;
  109. text-overflow: ellipsis;
  110. white-space: nowrap;
  111. }
  112. .redo-color {
  113. color: #3291F8;
  114. }
  115. .ti-action-menu-item:not(:last-child) {
  116. margin-right: 10px;
  117. padding-right: 11px;
  118. text-decoration: none !important;
  119. color: #526ecc;
  120. cursor: pointer;
  121. display: inline-block;
  122. -moz-user-select: none;
  123. -webkit-user-select: none;
  124. -ms-user-select: none;
  125. -khtml-user-select: none;
  126. user-select: none;
  127. position: relative;
  128. }
  129. .ti-action-menu-item:not(:last-child):after {
  130. content: "";
  131. display: inline-block;
  132. position: absolute;
  133. height: 12px;
  134. right: 0;
  135. top: 50%;
  136. -webkit-transform: translateY(-6px);
  137. -ms-transform: translateY(-6px);
  138. -o-transform: translateY(-6px);
  139. transform: translateY(-6px);
  140. border-right: 1px solid #dfe1e6;
  141. }
  142. .text-width80 {
  143. width: 100px;
  144. line-height: 30px;
  145. }
  146. .border-according {
  147. border: 1px solid #dfe1e6;
  148. }
  149. .disabled {
  150. cursor: default;
  151. pointer-events: none;
  152. color: rgba(0, 0, 0, .6) !important;
  153. opacity: .45 !important;
  154. }
  155. .pad20 {
  156. border: 0px !important;
  157. }
  158. .model_file_bread {
  159. margin-bottom: -0.5rem !important;
  160. padding-left: 1rem;
  161. padding-top: 0.5rem;
  162. }
  163. </style>
  164. <div id="mask">
  165. <div id="loadingPage">
  166. <div class="rect1"></div>
  167. <div class="rect2"></div>
  168. <div class="rect3"></div>
  169. <div class="rect4"></div>
  170. <div class="rect5"></div>
  171. </div>
  172. </div>
  173. <div class="repository">
  174. {{template "repo/header" .}}
  175. <div class="ui container">
  176. <h4 class="ui header" id="vertical-segment">
  177. <div class="ui breadcrumb">
  178. <a class="section" href="{{.RepoLink}}/debugjob?debugListType=all">
  179. {{$.i18n.Tr "repo.cloudbrain"}}
  180. </a>
  181. <div class="divider"> / </div>
  182. <a class="section" href="{{$.RepoLink}}/cloudbrain/benchmark">
  183. {{$.i18n.Tr "repo.modelarts.evaluate_job"}}
  184. </a>
  185. <div class="divider"> / </div>
  186. <div class="active section">{{.displayJobName}}</div>
  187. </div>
  188. </h4>
  189. {{range $k ,$v := .version_list_task}}
  190. <div class="ui accordion border-according" id="accordion{{.VersionName}}"
  191. data-repopath="{{$.RepoRelPath}}/cloudbrain" data-jobid="{{.ID}}" data-version="{{.VersionName}}">
  192. <input type="hidden" id="jobId_input" name="jobId_input" value="{{.JobID}}">
  193. <div class="{{if eq $k 0}}active{{end}} title padding0">
  194. <div class="according-panel-heading">
  195. <div class="accordion-panel-title">
  196. <i class="dropdown icon"></i>
  197. <span class="accordion-panel-title-content">
  198. <span>
  199. <div class="ac-display-inblock title_text acc-margin-bottom">
  200. <span class="cti-mgRight-sm">
  201. <td>{{TimeSinceUnix1 .CreatedUnix}}</td>
  202. </span>
  203. <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}:
  204. <span id="{{.VersionName}}-status-span"><i id="icon"
  205. style="vertical-align: middle;" class="{{.Status}}"></i><span id="text"
  206. style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
  207. </span>
  208. <span
  209. class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span>
  210. <span class="cti-mgRight-sm uc-accordionTitle-black"
  211. id="{{.VersionName}}-duration-span">{{$.duration}}</span>
  212. </div>
  213. </span>
  214. </span>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="{{if eq $k 0}}active{{end}} content">
  219. <div class="content-pad">
  220. <div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);">
  221. <a class="active item"
  222. data-tab="first{{$k}}">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a>
  223. <a class="item" data-tab="second{{$k}}"
  224. onclick="loadLog({{.VersionName}})">{{$.i18n.Tr "repo.modelarts.log"}}</a>
  225. </div>
  226. <div class="ui tab active" data-tab="first{{$k}}">
  227. <div style="padding-top: 10px;">
  228. <div class="tab_2_content">
  229. <div class="ac-grid ac-grid-col2">
  230. <div class="ac-grid-col">
  231. <table class="ti-form">
  232. <tbody class="ti-text-form">
  233. <tr class="ti-no-ng-animate">
  234. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  235. {{$.i18n.Tr "repo.cloudbrain_task"}}
  236. </td>
  237. <td class="ti-text-form-content">
  238. <div class="text-span text-span-w">
  239. {{.DisplayJobName}}
  240. </div>
  241. </td>
  242. </tr>
  243. <tr class="ti-no-ng-animate">
  244. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  245. {{$.i18n.Tr "repo.modelarts.status"}}
  246. </td>
  247. <td class="ti-text-form-content">
  248. <div class="text-span text-span-w" id="{{.VersionName}}-status">
  249. {{.Status}}
  250. </div>
  251. </td>
  252. </tr>
  253. <tr class="ti-no-ng-animate">
  254. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  255. {{$.i18n.Tr "repo.modelarts.createtime"}}
  256. </td>
  257. <td class="ti-text-form-content">
  258. <div class="text-span text-span-w">
  259. <span style="font-size: 12px;" class="">
  260. {{TimeSinceUnix1 .CreatedUnix}}
  261. </span>
  262. </div>
  263. </td>
  264. </tr>
  265. <tr class="ti-no-ng-animate">
  266. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  267. {{$.i18n.Tr "repo.cloudbrain.time.starttime"}}
  268. </td>
  269. <td class="ti-text-form-content">
  270. <div class="text-span text-span-w"
  271. id="{{.VersionName}}-startTime">
  272. {{if not (eq .StartTime 0)}}
  273. {{TimeSinceUnix1 .StartTime}}
  274. {{else}}
  275. --
  276. {{end}}
  277. </div>
  278. </td>
  279. </tr>
  280. <tr class="ti-no-ng-animate">
  281. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  282. {{$.i18n.Tr "repo.cloudbrain.time.endtime"}}
  283. </td>
  284. <td class="ti-text-form-content">
  285. <div class="text-span text-span-w"
  286. id="{{.VersionName}}-EndTime">
  287. {{if not (eq .EndTime 0)}}
  288. {{TimeSinceUnix1 .EndTime}}
  289. {{else}}
  290. --
  291. {{end}}
  292. </div>
  293. </td>
  294. </tr>
  295. <tr class="ti-no-ng-animate">
  296. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  297. {{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}
  298. </td>
  299. <td class="ti-text-form-content">
  300. <div class="text-span text-span-w"
  301. id="{{.VersionName}}-duration">
  302. {{$.duration}}
  303. </div>
  304. </td>
  305. </tr>
  306. <tr class="ti-no-ng-animate">
  307. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  308. {{$.i18n.Tr "cloudbrain.mirror"}}
  309. </td>
  310. <td class="ti-text-form-content">
  311. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  312. <span class="ui poping up clipboard" title="{{.Image}}" data-position="top center" id="clipboard-btn" style="cursor:pointer"
  313. data-clipboard-text="{{.Image}}"
  314. data-success="{{$.i18n.Tr "repo.copy_link_success"}}"
  315. data-error="{{$.i18n.Tr "repo.copy_link_error"}}"
  316. data-content="{{$.i18n.Tr "repo.copy_link"}}"
  317. data-variation="inverted tiny"
  318. >
  319. {{.Image}}
  320. </span>
  321. </div>
  322. </td>
  323. </tr>
  324. <tr class="ti-no-ng-animate">
  325. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  326. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_scenes"}}
  327. </td>
  328. <td class="ti-text-form-content">
  329. <div class="text-span text-span-w"
  330. id="{{.VersionName}}-BenchmarkTypeName">
  331. {{.BenchmarkType}}
  332. </div>
  333. </td>
  334. </tr>
  335. <tr class="ti-no-ng-animate">
  336. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  337. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}
  338. </td>
  339. <td class="ti-text-form-content">
  340. <div class="text-span text-span-w"
  341. id="{{.VersionName}}-BenchmarkTypeName">
  342. {{.BenchmarkTypeName}}
  343. </div>
  344. </td>
  345. </tr>
  346. </tbody>
  347. </table>
  348. </div>
  349. <div class="ac-grid-col">
  350. <table class="ti-form">
  351. <tbody class="ti-text-form">
  352. <tr class="ti-no-ng-animate">
  353. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  354. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}
  355. </td>
  356. <td class="ti-text-form-content">
  357. <div class="text-span text-span-w">
  358. {{if eq .JobType "BENCHMARK"}}
  359. train.py
  360. {{else}}
  361. --
  362. {{end}}
  363. </div>
  364. </td>
  365. </tr>
  366. <tr class="ti-no-ng-animate">
  367. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  368. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}
  369. </td>
  370. <td class="ti-text-form-content">
  371. <div class="text-span text-span-w">
  372. {{if eq .JobType "BENCHMARK"}}
  373. test.py
  374. {{else}}
  375. --
  376. {{end}}
  377. </div>
  378. </td>
  379. </tr>
  380. <tr class="ti-no-ng-animate">
  381. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  382. {{$.i18n.Tr "repo.modelarts.train_job.description"}}
  383. </td>
  384. <td class="ti-text-form-content">
  385. <div class="text-span text-span-w" title="{{.Description}}">
  386. {{if .Description}}
  387. {{.Description}}
  388. {{else}}
  389. --
  390. {{end}}
  391. </div>
  392. </td>
  393. </tr>
  394. <tr class="ti-no-ng-animate">
  395. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  396. {{$.i18n.Tr "cloudbrain.gpu_type"}}
  397. </td>
  398. <td class="ti-text-form-content">
  399. <div class="text-span text-span-w">
  400. {{$.resource_type}}
  401. </div>
  402. </td>
  403. </tr>
  404. <tr class="ti-no-ng-animate">
  405. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  406. {{$.i18n.Tr "repo.modelarts.train_job.standard"}}
  407. </td>
  408. <td class="ti-text-form-content">
  409. <div class="text-span text-span-w">
  410. {{$.resource_spec}}
  411. </div>
  412. </td>
  413. </tr>
  414. <tr class="ti-no-ng-animate">
  415. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  416. {{$.i18n.Tr "repo.model_manager"}}
  417. </td>
  418. <td class="ti-text-form-content">
  419. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  420. {{.DatasetName}}
  421. </div>
  422. </td>
  423. </tr>
  424. <tr class="ti-no-ng-animate">
  425. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  426. {{$.i18n.Tr "repo.cloudbrain_creator"}}
  427. </td>
  428. <td class="ti-text-form-content">
  429. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  430. {{if .User}}
  431. {{.User.Name}}
  432. {{else}}
  433. --
  434. {{end}}
  435. </div>
  436. </td>
  437. </tr>
  438. <tr class="ti-no-ng-animate">
  439. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  440. {{if eq .BenchmarkTypeName "BRAINSCORE"}}
  441. {{$.i18n.Tr "cloudbrain.brain_area"}}
  442. {{else}}
  443. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}
  444. {{end}}
  445. </td>
  446. <td class="ti-text-form-content">
  447. <div class="text-span text-span-w"
  448. id="{{.VersionName}}-BenchmarkChildTypeName">
  449. {{if $.BenchmarkChildTypeName}}
  450. {{$.BenchmarkChildTypeName}}
  451. {{else}}
  452. --
  453. {{end}}
  454. </div>
  455. </td>
  456. </tr>
  457. </tbody>
  458. </table>
  459. </div>
  460. </div>
  461. </div>
  462. </div>
  463. </div>
  464. <div class="ui tab" data-tab="second{{$k}}">
  465. <div>
  466. <div class="ui message message{{.VersionName}}" style="display: none;">
  467. <div id="header"></div>
  468. </div>
  469. <div class="ui attached log" id="log{{.VersionName}}"
  470. style="height: 300px !important; overflow: auto;">
  471. <input type="hidden" name="end_line" value>
  472. <input type="hidden" name="start_line" value>
  473. <pre id="log_file{{.VersionName}}"></pre>
  474. </div>
  475. </div>
  476. </div>
  477. </div>
  478. </div>
  479. </div>
  480. {{end}} {{template "base/paginate" .}}
  481. </div>
  482. <!-- 确认模态框 -->
  483. <div id="deletemodel">
  484. <div class="ui basic modal">
  485. <div class="ui icon header">
  486. <i class="trash icon"></i> {{$.i18n.Tr "cloudbrain.delete_task"}}
  487. </div>
  488. <div class="content">
  489. <p>{{$.i18n.Tr "cloudbrain.task_delete_confirm"}}</p>
  490. </div>
  491. <div class="actions">
  492. <div class="ui red basic inverted cancel button">
  493. <i class="remove icon"></i> {{$.i18n.Tr "cloudbrain.operate_cancel"}}
  494. </div>
  495. <div class="ui green basic inverted ok button">
  496. <i class="checkmark icon"></i> {{$.i18n.Tr "cloudbrain.operate_confirm"}}
  497. </div>
  498. </div>
  499. </div>
  500. </div>
  501. </div>
  502. {{template "base/footer" .}}
  503. <script>
  504. $('.menu .item').tab()
  505. $(document).ready(function () {
  506. $('.ui.accordion').accordion({ selector: { trigger: '.icon' } });
  507. });
  508. $(document).ready(function () {
  509. $('.secondary.menu .item').tab();
  510. });
  511. let userName
  512. let repoPath
  513. let jobName
  514. $(document).ready(function () {
  515. let url = window.location.href;
  516. let urlArr = url.split('/')
  517. userName = urlArr.slice(-5)[0]
  518. repoPath = urlArr.slice(-4)[0]
  519. jobName = urlArr.slice(-1)[0]
  520. })
  521. function loadLog(version_name) {
  522. document.getElementById("mask").style.display = "block"
  523. $.get(`/api/v1/repos/${userName}/${repoPath}/cloudbrain/${jobName}/log?version_name=${version_name}&lines=50&order=asc`, (data) => {
  524. $('input[name=end_line]').val(data.EndLine)
  525. $('input[name=start_line]').val(data.StartLine)
  526. $(`#log_file${version_name}`).text(data.Content)
  527. document.getElementById("mask").style.display = "none"
  528. }).fail(function (err) {
  529. console.log(err);
  530. document.getElementById("mask").style.display = "none"
  531. });
  532. }
  533. </script>