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 28 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
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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  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. {{.Image}}
  313. </div>
  314. </td>
  315. </tr>
  316. <tr class="ti-no-ng-animate">
  317. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  318. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_scenes"}}
  319. </td>
  320. <td class="ti-text-form-content">
  321. <div class="text-span text-span-w"
  322. id="{{.VersionName}}-BenchmarkTypeName">
  323. {{.BenchmarkType}}
  324. </div>
  325. </td>
  326. </tr>
  327. <tr class="ti-no-ng-animate">
  328. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  329. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}
  330. </td>
  331. <td class="ti-text-form-content">
  332. <div class="text-span text-span-w"
  333. id="{{.VersionName}}-BenchmarkTypeName">
  334. {{.BenchmarkTypeName}}
  335. </div>
  336. </td>
  337. </tr>
  338. </tbody>
  339. </table>
  340. </div>
  341. <div class="ac-grid-col">
  342. <table class="ti-form">
  343. <tbody class="ti-text-form">
  344. <tr class="ti-no-ng-animate">
  345. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  346. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}
  347. </td>
  348. <td class="ti-text-form-content">
  349. <div class="text-span text-span-w">
  350. {{if eq .JobType "BENCHMARK"}}
  351. train.py
  352. {{else}}
  353. --
  354. {{end}}
  355. </div>
  356. </td>
  357. </tr>
  358. <tr class="ti-no-ng-animate">
  359. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  360. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}
  361. </td>
  362. <td class="ti-text-form-content">
  363. <div class="text-span text-span-w">
  364. {{if eq .JobType "BENCHMARK"}}
  365. test.py
  366. {{else}}
  367. --
  368. {{end}}
  369. </div>
  370. </td>
  371. </tr>
  372. <tr class="ti-no-ng-animate">
  373. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  374. {{$.i18n.Tr "repo.modelarts.train_job.description"}}
  375. </td>
  376. <td class="ti-text-form-content">
  377. <div class="text-span text-span-w" title="{{.Description}}">
  378. {{if .Description}}
  379. {{.Description}}
  380. {{else}}
  381. --
  382. {{end}}
  383. </div>
  384. </td>
  385. </tr>
  386. <tr class="ti-no-ng-animate">
  387. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  388. {{$.i18n.Tr "cloudbrain.gpu_type"}}
  389. </td>
  390. <td class="ti-text-form-content">
  391. <div class="text-span text-span-w">
  392. {{$.resource_type}}
  393. </div>
  394. </td>
  395. </tr>
  396. <tr class="ti-no-ng-animate">
  397. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  398. {{$.i18n.Tr "repo.modelarts.train_job.standard"}}
  399. </td>
  400. <td class="ti-text-form-content">
  401. <div class="text-span text-span-w">
  402. {{$.resource_spec}}
  403. </div>
  404. </td>
  405. </tr>
  406. <tr class="ti-no-ng-animate">
  407. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  408. {{$.i18n.Tr "repo.model_manager"}}
  409. </td>
  410. <td class="ti-text-form-content">
  411. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  412. {{.DatasetName}}
  413. </div>
  414. </td>
  415. </tr>
  416. <tr class="ti-no-ng-animate">
  417. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  418. {{$.i18n.Tr "repo.cloudbrain_creator"}}
  419. </td>
  420. <td class="ti-text-form-content">
  421. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  422. {{if .User}}
  423. {{.User.Name}}
  424. {{else}}
  425. --
  426. {{end}}
  427. </div>
  428. </td>
  429. </tr>
  430. <tr class="ti-no-ng-animate">
  431. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  432. {{if eq .BenchmarkTypeName "BRAINSCORE"}}
  433. {{$.i18n.Tr "cloudbrain.brain_area"}}
  434. {{else}}
  435. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}
  436. {{end}}
  437. </td>
  438. <td class="ti-text-form-content">
  439. <div class="text-span text-span-w"
  440. id="{{.VersionName}}-BenchmarkChildTypeName">
  441. {{if $.BenchmarkChildTypeName}}
  442. {{$.BenchmarkChildTypeName}}
  443. {{else}}
  444. --
  445. {{end}}
  446. </div>
  447. </td>
  448. </tr>
  449. </tbody>
  450. </table>
  451. </div>
  452. </div>
  453. </div>
  454. </div>
  455. </div>
  456. <div class="ui tab" data-tab="second{{$k}}">
  457. <div>
  458. <div class="ui message message{{.VersionName}}" style="display: none;">
  459. <div id="header"></div>
  460. </div>
  461. <div class="ui attached log" id="log{{.VersionName}}"
  462. style="height: 300px !important; overflow: auto;">
  463. <input type="hidden" name="end_line" value>
  464. <input type="hidden" name="start_line" value>
  465. <pre id="log_file{{.VersionName}}"></pre>
  466. </div>
  467. </div>
  468. </div>
  469. </div>
  470. </div>
  471. </div>
  472. {{end}} {{template "base/paginate" .}}
  473. </div>
  474. <!-- 确认模态框 -->
  475. <div id="deletemodel">
  476. <div class="ui basic modal">
  477. <div class="ui icon header">
  478. <i class="trash icon"></i> {{$.i18n.Tr "cloudbrain.delete_task"}}
  479. </div>
  480. <div class="content">
  481. <p>{{$.i18n.Tr "cloudbrain.task_delete_confirm"}}</p>
  482. </div>
  483. <div class="actions">
  484. <div class="ui red basic inverted cancel button">
  485. <i class="remove icon"></i> {{$.i18n.Tr "cloudbrain.operate_cancel"}}
  486. </div>
  487. <div class="ui green basic inverted ok button">
  488. <i class="checkmark icon"></i> {{$.i18n.Tr "cloudbrain.operate_confirm"}}
  489. </div>
  490. </div>
  491. </div>
  492. </div>
  493. </div>
  494. {{template "base/footer" .}}
  495. <script>
  496. $('.menu .item').tab()
  497. $(document).ready(function () {
  498. $('.ui.accordion').accordion({ selector: { trigger: '.icon' } });
  499. });
  500. $(document).ready(function () {
  501. $('.secondary.menu .item').tab();
  502. });
  503. let userName
  504. let repoPath
  505. let jobName
  506. $(document).ready(function () {
  507. let url = window.location.href;
  508. let urlArr = url.split('/')
  509. userName = urlArr.slice(-5)[0]
  510. repoPath = urlArr.slice(-4)[0]
  511. jobName = urlArr.slice(-1)[0]
  512. })
  513. function loadLog(version_name) {
  514. document.getElementById("mask").style.display = "block"
  515. $.get(`/api/v1/repos/${userName}/${repoPath}/cloudbrain/${jobName}/log?version_name=${version_name}&lines=50&order=asc`, (data) => {
  516. $('input[name=end_line]').val(data.EndLine)
  517. $('input[name=start_line]').val(data.StartLine)
  518. $(`#log_file${version_name}`).text(data.Content)
  519. document.getElementById("mask").style.display = "none"
  520. }).fail(function (err) {
  521. console.log(err);
  522. document.getElementById("mask").style.display = "none"
  523. });
  524. }
  525. </script>