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.

new.tmpl 5.8 kB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. {{template "base/head" .}}
  2. <style>
  3. /* 遮罩层css效果图 */
  4. #mask {
  5. position: fixed;
  6. top: 0px;
  7. left: 0px;
  8. right: 0px;
  9. bottom: 0px;
  10. filter: alpha(opacity=60);
  11. background-color: #777;
  12. z-index: 1000;
  13. display: none;
  14. opacity: 0.8;
  15. -moz-opacity: 0.5;
  16. padding-top: 100px;
  17. color: #000000
  18. }
  19. /* 加载圈css效果图 */
  20. #loadingPage {
  21. margin: 200px auto;
  22. width: 50px;
  23. height: 40px;
  24. text-align: center;
  25. font-size: 10px;
  26. display: block;
  27. }
  28. #loadingPage>div {
  29. background-color: green;
  30. height: 100%;
  31. width: 6px;
  32. display: inline-block;
  33. -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
  34. animation: sk-stretchdelay 1.2s infinite ease-in-out;
  35. }
  36. #loadingPage .rect2 {
  37. -webkit-animation-delay: -1.1s;
  38. animation-delay: -1.1s;
  39. }
  40. #loadingPage .rect3 {
  41. -webkit-animation-delay: -1.0s;
  42. animation-delay: -1.0s;
  43. }
  44. #loadingPage .rect4 {
  45. -webkit-animation-delay: -0.9s;
  46. animation-delay: -0.9s;
  47. }
  48. #loadingPage .rect5 {
  49. -webkit-animation-delay: -0.8s;
  50. animation-delay: -0.8s;
  51. }
  52. @-webkit-keyframes sk-stretchdelay {
  53. 0%,
  54. 40%,
  55. 100% {
  56. -webkit-transform: scaleY(0.4)
  57. }
  58. 20% {
  59. -webkit-transform: scaleY(1.0)
  60. }
  61. }
  62. @keyframes sk-stretchdelay {
  63. 0%,
  64. 40%,
  65. 100% {
  66. transform: scaleY(0.4);
  67. -webkit-transform: scaleY(0.4);
  68. }
  69. 20% {
  70. transform: scaleY(1.0);
  71. -webkit-transform: scaleY(1.0);
  72. }
  73. }
  74. </style>
  75. <script>
  76. // 点击按钮后遮罩层显示
  77. function showmask() {
  78. document.getElementById("mask").style.display = "block"
  79. }
  80. // 页面加载完毕后遮罩层隐藏
  81. document.onreadystatechange = function() {
  82. if (document.readyState === "complete") {
  83. document.getElementById("mask").style.display = "none"
  84. }
  85. }
  86. </script>
  87. <div id="mask">
  88. <div id="loadingPage">
  89. <div class="rect1"></div>
  90. <div class="rect2"></div>
  91. <div class="rect3"></div>
  92. <div class="rect4"></div>
  93. <div class="rect5"></div>
  94. </div>
  95. </div>
  96. <div class="repository">
  97. {{template "repo/header" .}}
  98. <div class="repository new repo ui middle very relaxed page grid">
  99. <div class="column">
  100. {{template "base/alert" .}}
  101. <form class="ui form" action="{{.Link}}" method="post">
  102. {{.CsrfTokenHtml}}
  103. <h3 class="ui top attached header">
  104. {{.i18n.Tr "repo.cloudbrain.new"}}
  105. </h3>
  106. <div class="ui attached segment">
  107. <br>
  108. <div class="inline required field">
  109. <label>任务名称</label>
  110. <input name="job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.job_name}}" tabindex="3" autofocus required maxlength="255">
  111. </div>
  112. <br>
  113. <div class="inline required field">
  114. <label>镜像</label>
  115. <select id="cloudbrain_image" placeholder="选择镜像" style='width:385px' name="image">
  116. {{range .images}}
  117. <option name="image" value="{{.Place}}">{{.PlaceView}}</option>
  118. {{end}}
  119. </select>
  120. </div>
  121. <div class="inline required field">
  122. <label>数据集(只有zip格式的数据集才能发起云脑任务)</label>
  123. <select id="cloudbrain_dataset" placeholder="选择数据集" style='width:385px' name="attachment">
  124. {{range .attachments}}
  125. <option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option>
  126. {{end}}
  127. </select>
  128. </div>
  129. <div class="inline required field">
  130. <label>数据集存放路径</label>
  131. <input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
  132. </div>
  133. <div class="inline required field">
  134. <label>模型存放路径</label>
  135. <input name="model_path" id="cloudbrain_model_path" value="{{.model_path}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
  136. </div>
  137. <div class="inline required field">
  138. <label>代码存放路径</label>
  139. <input name="code_path" id="cloudbrain_code_path" value="{{.code_path}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
  140. </div>
  141. <div class="inline required field" hidden>
  142. <label>启动命令</label>
  143. <textarea name="command" rows="10" readonly="readonly">{{.command}}</textarea>
  144. </div>
  145. <div class="inline field">
  146. <label></label>
  147. <button class="ui green button" onclick="showmask()">
  148. {{.i18n.Tr "repo.cloudbrain.new"}}
  149. </button>
  150. <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a>
  151. </div>
  152. </div>
  153. </form>
  154. </div>
  155. </div>
  156. </div>
  157. {{template "base/footer" .}}