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

5 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
5 years ago
5 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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  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: 420px;
  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. .info_text {
  86. padding-bottom: 20px;
  87. padding-right: 20px;
  88. font-size: 12px;
  89. }
  90. .ti-text-form-label {
  91. padding-bottom: 20px;
  92. padding-right: 20px;
  93. color: #8a8e99;
  94. font-size: 12px;
  95. white-space: nowrap !important;
  96. width: 80px;
  97. line-height: 30px;
  98. }
  99. .ti-text-form-content {
  100. line-height: 30px;
  101. padding-bottom: 20px;
  102. }
  103. .ti-form>tbody>tr>td {
  104. vertical-align: top;
  105. white-space: normal;
  106. }
  107. td,
  108. th {
  109. padding: 0;
  110. }
  111. .ac-grid-col .text-span {
  112. width: 450px;
  113. overflow: hidden;
  114. text-overflow: ellipsis;
  115. white-space: nowrap;
  116. }
  117. .redo-color {
  118. color: #3291F8;
  119. }
  120. .ti-action-menu-item:not(:last-child) {
  121. margin-right: 10px;
  122. padding-right: 11px;
  123. text-decoration: none !important;
  124. color: #526ecc;
  125. cursor: pointer;
  126. display: inline-block;
  127. -moz-user-select: none;
  128. -webkit-user-select: none;
  129. -ms-user-select: none;
  130. -khtml-user-select: none;
  131. user-select: none;
  132. position: relative;
  133. }
  134. .ti-action-menu-item:not(:last-child):after {
  135. content: "";
  136. display: inline-block;
  137. position: absolute;
  138. height: 12px;
  139. right: 0;
  140. top: 50%;
  141. -webkit-transform: translateY(-6px);
  142. -ms-transform: translateY(-6px);
  143. -o-transform: translateY(-6px);
  144. transform: translateY(-6px);
  145. border-right: 1px solid #dfe1e6;
  146. }
  147. .text-width80 {
  148. width: 100px;
  149. line-height: 30px;
  150. }
  151. .border-according {
  152. border: 1px solid #dfe1e6;
  153. }
  154. .disabled {
  155. cursor: default;
  156. pointer-events: none;
  157. color: rgba(0, 0, 0, .6) !important;
  158. opacity: .45 !important;
  159. }
  160. .pad20 {
  161. border: 0px !important;
  162. }
  163. .model_file_bread {
  164. margin-bottom: -0.5rem !important;
  165. padding-left: 1rem;
  166. padding-top: 0.5rem;
  167. }
  168. </style>
  169. <div id="mask">
  170. <div id="loadingPage">
  171. <div class="rect1"></div>
  172. <div class="rect2"></div>
  173. <div class="rect3"></div>
  174. <div class="rect4"></div>
  175. <div class="rect5"></div>
  176. </div>
  177. </div>
  178. <div class="repository">
  179. {{template "repo/header" .}}
  180. <div class="ui container">
  181. <h4 class="ui header" id="vertical-segment">
  182. <div class="ui breadcrumb">
  183. <a class="section" href="{{.RepoLink}}/debugjob?debugListType=all">
  184. {{.i18n.Tr "repo.cloudbrain"}}
  185. </a>
  186. <div class="divider"> / </div>
  187. <a class="section backTodeBug" href="{{.RepoLink}}/debugjob?debugListType=all">
  188. {{$.i18n.Tr "repo.modelarts.notebook"}}
  189. </a>
  190. <div class="divider"> / </div>
  191. <div class="active section">{{.displayJobName}}</div>
  192. </div>
  193. </h4>
  194. {{range $k ,$v := .version_list_task}}
  195. <div class="ui accordion border-according" id="accordion{{.VersionName}}"
  196. data-repopath="{{$.RepoRelPath}}/cloudbrain" data-jobid="{{.ID}}" data-version="{{.VersionName}}">
  197. <input type="hidden" id="jobId_input" name="jobId_input" value="{{.JobID}}">
  198. <div class="{{if eq $k 0}}active{{end}} title padding0">
  199. <div class="according-panel-heading">
  200. <div class="accordion-panel-title">
  201. <!--<i class="dropdown icon"></i> -->
  202. <span class="accordion-panel-title-content">
  203. <span>
  204. <div class="ac-display-inblock title_text acc-margin-bottom">
  205. <span class="cti-mgRight-sm">
  206. <td>{{TimeSinceUnix1 .CreatedUnix}}</td>
  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 class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:
  214. </span>
  215. <span class="cti-mgRight-sm uc-accordionTitle-black"
  216. id="{{.VersionName}}-duration-span">{{$.duration}}</span>
  217. <span class="refresh-status" data-tooltip="刷新" style="cursor: pointer;" data-inverted="" data-version="{{.VersionName}}">
  218. <i class="redo icon redo-color"></i>
  219. </span>
  220. </div>
  221. </span>
  222. </span>
  223. </div>
  224. </div>
  225. </div>
  226. <div class="{{if eq $k 0}}active{{end}} content">
  227. <div class="content-pad">
  228. <div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);">
  229. <a class="active item"
  230. data-tab="first{{$k}}">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a>
  231. <a class="item" data-tab="second{{$k}}"
  232. onclick="javascript:parseLog()">{{$.i18n.Tr "repo.cloudbrain.runinfo"}}</a>
  233. </div>
  234. <div class="ui tab active" data-tab="first{{$k}}">
  235. <div style="padding-top: 10px;">
  236. <div class="tab_2_content">
  237. <div class="ac-grid ac-grid-col2">
  238. <div class="ac-grid-col">
  239. <table class="ti-form">
  240. <tbody class="ti-text-form">
  241. <tr class="ti-no-ng-animate">
  242. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  243. {{$.i18n.Tr "repo.cloudbrain_task"}}
  244. </td>
  245. <td class="ti-text-form-content">
  246. <div class="text-span text-span-w">
  247. {{.DisplayJobName}}
  248. </div>
  249. </td>
  250. </tr>
  251. <tr class="ti-no-ng-animate">
  252. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  253. {{$.i18n.Tr "repo.modelarts.status"}}
  254. </td>
  255. <td class="ti-text-form-content">
  256. <div class="text-span text-span-w" id="{{.VersionName}}-status">
  257. {{.Status}}
  258. </div>
  259. </td>
  260. </tr>
  261. <tr class="ti-no-ng-animate">
  262. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  263. {{$.i18n.Tr "repo.cloudbrain_creator"}}
  264. </td>
  265. <td class="ti-text-form-content">
  266. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  267. {{.User.Name}}
  268. </div>
  269. </td>
  270. </tr>
  271. <tr class="ti-no-ng-animate">
  272. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  273. {{$.i18n.Tr "repo.modelarts.computing_resources"}}
  274. </td>
  275. <td class="ti-text-form-content">
  276. <div class="text-span text-span-w"
  277. id="{{.VersionName}}-computeresource">
  278. {{.ComputeResource}}
  279. </div>
  280. </td>
  281. </tr>
  282. <tr class="ti-no-ng-animate">
  283. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  284. {{$.i18n.Tr "cloudbrain.task_type"}}
  285. </td>
  286. <td class="ti-text-form-content">
  287. <div class="text-span text-span-w"
  288. id="{{.VersionName}}-computeresource">
  289. {{.JobType}}
  290. </div>
  291. </td>
  292. </tr>
  293. <tr class="ti-no-ng-animate">
  294. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  295. {{$.i18n.Tr "repo.modelarts.code_version"}}
  296. </td>
  297. <td class="ti-text-form-content">
  298. <div class="text-span text-span-w" id="{{.VersionName}}-code">
  299. {{.BranchName}}
  300. <span style="margin-left:1rem" class="ui label">{{SubStr .CommitID 0 10}}</span>
  301. </div>
  302. </td>
  303. </tr>
  304. <tr class="ti-no-ng-animate">
  305. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  306. {{$.i18n.Tr "cloudbrain.gpu_type"}}
  307. </td>
  308. <td class="ti-text-form-content resorce_type">
  309. <div class="text-span text-span-w"></div>
  310. </td>
  311. </tr>
  312. <tr class="ti-no-ng-animate">
  313. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  314. {{$.i18n.Tr "repo.modelarts.createtime"}}
  315. </td>
  316. <td class="ti-text-form-content">
  317. <div class="text-span text-span-w"
  318. id="{{.VersionName}}-createtime">
  319. {{TimeSinceUnix1 .CreatedUnix}}
  320. </div>
  321. </td>
  322. </tr>
  323. </tbody>
  324. </table>
  325. </div>
  326. <div class="ac-grid-col">
  327. <table class="ti-form">
  328. <tbody class="ti-text-form">
  329. <tr class="ti-no-ng-animate">
  330. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  331. {{$.i18n.Tr "cloudbrain.mirror"}}
  332. </td>
  333. <td class="ti-text-form-content">
  334. <div class="text-span text-span-w" id="{{.VersionName}}-mirror">
  335. <span class="ui poping up clipboard" data-position="top center" id="clipboard-btn" style="cursor:pointer"
  336. data-clipboard-text="{{.Image}}"
  337. data-success="{{$.i18n.Tr "repo.copy_link_success"}}"
  338. data-error="{{$.i18n.Tr "repo.copy_link_error"}}"
  339. data-content="{{$.i18n.Tr "repo.copy_link"}}"
  340. data-variation="inverted tiny"
  341. >
  342. <span title="{{.Image}}">{{.Image}}</span>
  343. </span>
  344. </div>
  345. </td>
  346. </tr>
  347. <tr class="ti-no-ng-animate">
  348. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  349. {{$.i18n.Tr "repo.modelarts.train_job.standard"}}
  350. </td>
  351. <td class="ti-text-form-content spec">
  352. <div class="text-span text-span-w"></div>
  353. </td>
  354. </tr>
  355. <tr class="ti-no-ng-animate">
  356. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  357. {{$.i18n.Tr "cloudbrain.dataset_storage_path"}}
  358. </td>
  359. <td class="ti-text-form-content">
  360. <div class="text-span text-span-w" id="dataset_storage_path">
  361. {{$.dataset_path}}
  362. </div>
  363. </td>
  364. </tr>
  365. <tr class="ti-no-ng-animate">
  366. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  367. {{$.i18n.Tr "cloudbrain.model_storage_path"}}
  368. </td>
  369. <td class="ti-text-form-content">
  370. <div class="text-span text-span-w" id="model_storage_path">
  371. {{$.model_path}}
  372. </div>
  373. </td>
  374. </tr>
  375. <tr class="ti-no-ng-animate">
  376. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  377. {{$.i18n.Tr "cloudbrain.code_storage_path"}}
  378. </td>
  379. <td class="ti-text-form-content">
  380. <div class="text-span text-span-w" id="code_storage_path">
  381. {{$.code_path}}
  382. </div>
  383. </td>
  384. </tr>
  385. <tr class="ti-no-ng-animate">
  386. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  387. {{$.i18n.Tr "repo.cloudbrain.time.starttime"}}
  388. </td>
  389. <td class="ti-text-form-content">
  390. <div class="text-span text-span-w"
  391. id="{{.VersionName}}-startTime">
  392. {{if not (eq .StartTime 0)}}
  393. {{TimeSinceUnix1 .StartTime}}
  394. {{else}}
  395. --
  396. {{end}}
  397. </div>
  398. </td>
  399. </tr>
  400. <tr class="ti-no-ng-animate">
  401. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  402. {{$.i18n.Tr "repo.cloudbrain.time.endtime"}}
  403. </td>
  404. <td class="ti-text-form-content">
  405. <div class="text-span text-span-w"
  406. id="{{.VersionName}}-EndTime">
  407. {{if not (eq .EndTime 0)}}
  408. {{TimeSinceUnix1 .EndTime}}
  409. {{else}}
  410. --
  411. {{end}}
  412. </div>
  413. </td>
  414. </tr>
  415. <tr class="ti-no-ng-animate">
  416. <td class="ti-no-ng-animate ti-text-form-label text-width80">
  417. {{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}
  418. </td>
  419. <td class="ti-text-form-content">
  420. <div class="text-span text-span-w"
  421. id="{{.VersionName}}-duration">
  422. {{$.duration}}
  423. </div>
  424. </td>
  425. </tr>
  426. </tbody>
  427. </table>
  428. </div>
  429. </div>
  430. </div>
  431. <div style="clear:both">
  432. <table style="border:none" class="ui fixed small stackable table">
  433. <thead>
  434. <tr><th style="color: #8a8e99;font-size:12px" class="three wide left aligned">{{$.i18n.Tr "dataset.file"}}</th>
  435. </tr></thead>
  436. <tbody>
  437. {{range $m ,$n := $.datasetDownload}}
  438. <tr>
  439. <td style="word-wrap: break-word;word-break: break-all;">
  440. {{if eq .IsDelete true}}
  441. {{.DatasetName}}({{$.i18n.Tr "dataset.file_deleted"}})
  442. {{else}}
  443. <a href="{{.RepositoryLink}}" target="_blank">{{.DatasetName}}</a>
  444. {{end}}
  445. </td>
  446. </tr>
  447. {{end}}
  448. </tbody>
  449. </table>
  450. </div>
  451. </div>
  452. </div>
  453. <div class="ui tab" data-tab="second{{$k}}">
  454. <div>
  455. <div class="ui message message{{.VersionName}}" style="display: none;">
  456. <div id="header"></div>
  457. </div>
  458. <div class="ui attached log" id="log{{.VersionName}}"
  459. style="height: 390px !important; overflow: auto;">
  460. <input type="hidden" id="json_value" value="{{$.result.JobStatus.AppExitDiagnostics}}">
  461. <span id="info_display" class="info_text">
  462. </span>
  463. </div>
  464. </div>
  465. </div>
  466. </div>
  467. </div>
  468. </div>
  469. {{end}} {{template "base/paginate" .}}
  470. </div>
  471. <!-- 确认模态框 -->
  472. <div id="deletemodel">
  473. <div class="ui basic modal">
  474. <div class="ui icon header">
  475. <i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}}
  476. </div>
  477. <div class="content">
  478. <p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p>
  479. </div>
  480. <div class="actions">
  481. <div class="ui red basic inverted cancel button">
  482. <i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}}
  483. </div>
  484. <div class="ui green basic inverted ok button">
  485. <i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}}
  486. </div>
  487. </div>
  488. </div>
  489. </div>
  490. </div>
  491. {{template "base/footer" .}}
  492. <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script>
  493. <script>
  494. $('.menu .item').tab()
  495. $(document).ready(function () {
  496. $('.ui.accordion').accordion({ selector: { trigger: '.icon' } });
  497. });
  498. $(document).ready(function () {
  499. $('.secondary.menu .item').tab();
  500. });
  501. function parseLog() {
  502. let jsonValue = document.getElementById("json_value").value;
  503. let jsonObj = JSON.parse(jsonValue);
  504. let podRoleName = jsonObj["podRoleName"];
  505. let html = "";
  506. if (podRoleName != null) {
  507. let task0 = podRoleName["task1-0"];
  508. let podEvents = jsonObj["podEvents"];
  509. let podEventArray = podEvents[task0];
  510. if (podEventArray != null) {
  511. for (var i = 0; i < podEventArray.length; i++) {
  512. if (podEventArray[i]["reason"] != "") {
  513. html += "<p><b>[" + podEventArray[i]["reason"] + "]</b></p>";
  514. html += "<p>" + podEventArray[i]["message"] + "</p>";
  515. html += "<p>" + podEventArray[i]["action"] + "</p>";
  516. }
  517. }
  518. }
  519. let extras = jsonObj["extras"];
  520. if (extras != null) {
  521. for (var i = 0; i < extras.length; i++) {
  522. if (extras[i]["reason"] != "") {
  523. html += "<p><b>[" + extras[i]["reason"] + "]</b></p>";
  524. html += "<p>" + extras[i]["message"] + "</p>";
  525. html += "<p>" + extras[i]["action"] + "</p>";
  526. }
  527. }
  528. }
  529. }
  530. document.getElementById("info_display").innerHTML = html;
  531. }
  532. ;(function() {
  533. var SPEC = {{ .Spec }};
  534. var showPoint = false;
  535. var specStr = window.renderSpecStr(SPEC, showPoint, {
  536. gpu_memory: {{$.i18n.Tr "cloudbrain.gpu_memory"}},
  537. free: {{$.i18n.Tr "cloudbrain.free"}},
  538. point_hr: {{$.i18n.Tr "cloudbrain.point_hr"}},
  539. memory: {{$.i18n.Tr "cloudbrain.memory"}},
  540. shared_memory: {{$.i18n.Tr "cloudbrain.shared_memory"}},
  541. });
  542. $('td.ti-text-form-content.spec div').text(specStr);
  543. SPEC && $('td.ti-text-form-content.resorce_type div').text(getListValueWithKey(ACC_CARD_TYPE, SPEC.AccCardType));
  544. })();
  545. </script>