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
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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  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. {{if not (eq .StartTime 0)}}
  202. <td>{{TimeSinceUnix1 .StartTime}}</td>
  203. {{else}}
  204. <td>{{TimeSinceUnix1 .CreatedUnix}}
  205. <td>
  206. {{end}}
  207. </span>
  208. <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}:
  209. <span id="{{.VersionName}}-status-span"><i id="icon"
  210. style="vertical-align: middle;" class="{{.Status}}"></i><span id="text"
  211. style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
  212. </span>
  213. <span
  214. class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span>
  215. <span class="cti-mgRight-sm uc-accordionTitle-black"
  216. id="{{.VersionName}}-duration-span">{{$.duration}}</span>
  217. </div>
  218. </span>
  219. </span>
  220. </div>
  221. </div>
  222. </div>
  223. <div class="{{if eq $k 0}}active{{end}} content">
  224. <div class="content-pad">
  225. <div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);">
  226. <a class="active item"
  227. data-tab="first{{$k}}">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a>
  228. <a class="item" data-tab="second{{$k}}"
  229. onclick="loadLog({{.VersionName}})">{{$.i18n.Tr "repo.modelarts.log"}}</a>
  230. </div>
  231. <div class="ui tab active" data-tab="first{{$k}}">
  232. <div style="padding-top: 10px;">
  233. <div class="tab_2_content">
  234. <div class="ac-grid ac-grid-col2">
  235. <div class="ac-grid-col">
  236. <table class="ti-form">
  237. <tbody class="ti-text-form">
  238. <tr class="ti-no-ng-animate">
  239. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  240. {{$.i18n.Tr "repo.cloudbrain_task"}}
  241. </td>
  242. <td class="ti-text-form-content">
  243. <div class="text-span text-span-w">
  244. {{.DisplayJobName}}
  245. </div>
  246. </td>
  247. </tr>
  248. <tr class="ti-no-ng-animate">
  249. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  250. {{$.i18n.Tr "repo.modelarts.status"}}
  251. </td>
  252. <td class="ti-text-form-content">
  253. <div class="text-span text-span-w" id="{{.VersionName}}-status">
  254. {{.Status}}
  255. </div>
  256. </td>
  257. </tr>
  258. <tr class="ti-no-ng-animate">
  259. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  260. {{$.i18n.Tr "repo.modelarts.createtime"}}
  261. </td>
  262. <td class="ti-text-form-content">
  263. <div class="text-span text-span-w">
  264. <span style="font-size: 12px;" class="">
  265. {{TimeSinceUnix1 .CreatedUnix}}
  266. </span>
  267. </div>
  268. </td>
  269. </tr>
  270. <tr class="ti-no-ng-animate">
  271. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  272. {{$.i18n.Tr "repo.cloudbrain.time.starttime"}}
  273. </td>
  274. <td class="ti-text-form-content">
  275. <div class="text-span text-span-w"
  276. id="{{.VersionName}}-startTime">
  277. {{if not (eq .StartTime 0)}}
  278. {{TimeSinceUnix1 .StartTime}}
  279. {{else}}
  280. --
  281. {{end}}
  282. </div>
  283. </td>
  284. </tr>
  285. <tr class="ti-no-ng-animate">
  286. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  287. {{$.i18n.Tr "repo.cloudbrain.time.endtime"}}
  288. </td>
  289. <td class="ti-text-form-content">
  290. <div class="text-span text-span-w"
  291. id="{{.VersionName}}-EndTime">
  292. {{if not (eq .EndTime 0)}}
  293. {{TimeSinceUnix1 .EndTime}}
  294. {{else}}
  295. --
  296. {{end}}
  297. </div>
  298. </td>
  299. </tr>
  300. <tr class="ti-no-ng-animate">
  301. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  302. {{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}
  303. </td>
  304. <td class="ti-text-form-content">
  305. <div class="text-span text-span-w"
  306. id="{{.VersionName}}-duration">
  307. {{$.duration}}
  308. </div>
  309. </td>
  310. </tr>
  311. <tr class="ti-no-ng-animate">
  312. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  313. {{$.i18n.Tr "cloudbrain.mirror"}}
  314. </td>
  315. <td class="ti-text-form-content">
  316. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  317. {{.Image}}
  318. </div>
  319. </td>
  320. </tr>
  321. <tr class="ti-no-ng-animate">
  322. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  323. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_scenes"}}
  324. </td>
  325. <td class="ti-text-form-content">
  326. <div class="text-span text-span-w"
  327. id="{{.VersionName}}-BenchmarkTypeName">
  328. {{.BenchmarkType}}
  329. </div>
  330. </td>
  331. </tr>
  332. <tr class="ti-no-ng-animate">
  333. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  334. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}
  335. </td>
  336. <td class="ti-text-form-content">
  337. <div class="text-span text-span-w"
  338. id="{{.VersionName}}-BenchmarkTypeName">
  339. {{.BenchmarkTypeName}}
  340. </div>
  341. </td>
  342. </tr>
  343. </tbody>
  344. </table>
  345. </div>
  346. <div class="ac-grid-col">
  347. <table class="ti-form">
  348. <tbody class="ti-text-form">
  349. <tr class="ti-no-ng-animate">
  350. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  351. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}
  352. </td>
  353. <td class="ti-text-form-content">
  354. <div class="text-span text-span-w">
  355. {{if eq .JobType "BENCHMARK"}}
  356. train.py
  357. {{else}}
  358. --
  359. {{end}}
  360. </div>
  361. </td>
  362. </tr>
  363. <tr class="ti-no-ng-animate">
  364. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  365. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}
  366. </td>
  367. <td class="ti-text-form-content">
  368. <div class="text-span text-span-w">
  369. {{if eq .JobType "BENCHMARK"}}
  370. test.py
  371. {{else}}
  372. --
  373. {{end}}
  374. </div>
  375. </td>
  376. </tr>
  377. <tr class="ti-no-ng-animate">
  378. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  379. {{$.i18n.Tr "repo.modelarts.train_job.description"}}
  380. </td>
  381. <td class="ti-text-form-content">
  382. <div class="text-span text-span-w" title="{{.Description}}">
  383. {{if .Description}}
  384. {{.Description}}
  385. {{else}}
  386. --
  387. {{end}}
  388. </div>
  389. </td>
  390. </tr>
  391. <tr class="ti-no-ng-animate">
  392. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  393. {{$.i18n.Tr "cloudbrain.gpu_type"}}
  394. </td>
  395. <td class="ti-text-form-content">
  396. <div class="text-span text-span-w">
  397. {{$.resource_type}}
  398. </div>
  399. </td>
  400. </tr>
  401. <tr class="ti-no-ng-animate">
  402. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  403. {{$.i18n.Tr "repo.modelarts.train_job.standard"}}
  404. </td>
  405. <td class="ti-text-form-content">
  406. <div class="text-span text-span-w">
  407. {{$.resource_spec}}
  408. </div>
  409. </td>
  410. </tr>
  411. <tr class="ti-no-ng-animate">
  412. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  413. {{$.i18n.Tr "repo.model_manager"}}
  414. </td>
  415. <td class="ti-text-form-content">
  416. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  417. {{.DatasetName}}
  418. </div>
  419. </td>
  420. </tr>
  421. <tr class="ti-no-ng-animate">
  422. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  423. {{$.i18n.Tr "repo.cloudbrain_creator"}}
  424. </td>
  425. <td class="ti-text-form-content">
  426. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  427. {{if .User}}
  428. {{.User.Name}}
  429. {{else}}
  430. --
  431. {{end}}
  432. </div>
  433. </td>
  434. </tr>
  435. <tr class="ti-no-ng-animate">
  436. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  437. {{if eq .BenchmarkTypeName "BRAINSCORE"}}
  438. {{$.i18n.Tr "cloudbrain.brain_area"}}
  439. {{else}}
  440. {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}
  441. {{end}}
  442. </td>
  443. <td class="ti-text-form-content">
  444. <div class="text-span text-span-w"
  445. id="{{.VersionName}}-BenchmarkChildTypeName">
  446. {{if $.BenchmarkChildTypeName}}
  447. {{$.BenchmarkChildTypeName}}
  448. {{else}}
  449. --
  450. {{end}}
  451. </div>
  452. </td>
  453. </tr>
  454. </tbody>
  455. </table>
  456. </div>
  457. </div>
  458. </div>
  459. </div>
  460. </div>
  461. <div class="ui tab" data-tab="second{{$k}}">
  462. <div>
  463. <div class="ui message message{{.VersionName}}" style="display: none;">
  464. <div id="header"></div>
  465. </div>
  466. <div class="ui attached log" id="log{{.VersionName}}"
  467. style="height: 300px !important; overflow: auto;">
  468. <input type="hidden" name="end_line" value>
  469. <input type="hidden" name="start_line" value>
  470. <pre id="log_file{{.VersionName}}"></pre>
  471. </div>
  472. </div>
  473. </div>
  474. </div>
  475. </div>
  476. </div>
  477. {{end}} {{template "base/paginate" .}}
  478. </div>
  479. <!-- 确认模态框 -->
  480. <div id="deletemodel">
  481. <div class="ui basic modal">
  482. <div class="ui icon header">
  483. <i class="trash icon"></i> {{$.i18n.Tr "cloudbrain.delete_task"}}
  484. </div>
  485. <div class="content">
  486. <p>{{$.i18n.Tr "cloudbrain.task_delete_confirm"}}</p>
  487. </div>
  488. <div class="actions">
  489. <div class="ui red basic inverted cancel button">
  490. <i class="remove icon"></i> {{$.i18n.Tr "cloudbrain.operate_cancel"}}
  491. </div>
  492. <div class="ui green basic inverted ok button">
  493. <i class="checkmark icon"></i> {{$.i18n.Tr "cloudbrain.operate_confirm"}}
  494. </div>
  495. </div>
  496. </div>
  497. </div>
  498. </div>
  499. {{template "base/footer" .}}
  500. <script>
  501. $('.menu .item').tab()
  502. $(document).ready(function () {
  503. $('.ui.accordion').accordion({ selector: { trigger: '.icon' } });
  504. });
  505. $(document).ready(function () {
  506. $('.secondary.menu .item').tab();
  507. });
  508. let userName
  509. let repoPath
  510. let jobName
  511. $(document).ready(function () {
  512. let url = window.location.href;
  513. let urlArr = url.split('/')
  514. userName = urlArr.slice(-5)[0]
  515. repoPath = urlArr.slice(-4)[0]
  516. jobName = urlArr.slice(-1)[0]
  517. })
  518. function loadLog(version_name) {
  519. document.getElementById("mask").style.display = "block"
  520. $.get(`/api/v1/repos/${userName}/${repoPath}/cloudbrain/${jobName}/log?version_name=${version_name}&lines=50&order=asc`, (data) => {
  521. $('input[name=end_line]').val(data.EndLine)
  522. $('input[name=start_line]').val(data.StartLine)
  523. $(`#log_file${version_name}`).text(data.Content)
  524. document.getElementById("mask").style.display = "none"
  525. }).fail(function (err) {
  526. console.log(err);
  527. document.getElementById("mask").style.display = "none"
  528. });
  529. }
  530. </script>