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 24 kB

3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 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
4 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
4 years ago
4 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
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 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
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. {{template "base/head" .}}
  2. <style>
  3. .unite {
  4. font-family: SourceHanSansSC-medium !important;
  5. color: rgba(16, 16, 16, 100) !important;
  6. }
  7. .title {
  8. font-size: 16px !important;
  9. padding-left: 3rem !important;
  10. }
  11. .min_title {
  12. font-size: 14px !important;
  13. padding-left: 6rem !important;
  14. margin-bottom: 2rem !important;
  15. }
  16. .width {
  17. width: 100% !important;
  18. }
  19. .width80 {
  20. width: 80.7% !important;
  21. margin-left: 10px;
  22. }
  23. .width85 {
  24. width: 85% !important;
  25. margin-left: 4.5rem !important;
  26. }
  27. .width81 {
  28. margin-left: 1.5rem;
  29. width: 81% !important;
  30. }
  31. .add {
  32. font-size: 18px;
  33. padding: 0.5rem;
  34. border: 1px solid rgba(187, 187, 187, 100);
  35. border-radius: 0px 5px 5px 0px;
  36. line-height: 21px;
  37. text-align: center;
  38. color: #C2C7CC;
  39. }
  40. .min {
  41. font-size: 18px;
  42. padding: 0.5rem;
  43. border: 1px solid rgba(187, 187, 187, 100);
  44. border-radius: 5px 0px 0px 5px;
  45. line-height: 21px;
  46. text-align: center;
  47. color: #C2C7CC;
  48. }
  49. </style>
  50. <!-- <div class="ui page dimmer">
  51. <div class="ui text loader">{{.i18n.Tr "loading"}}</div>
  52. </div> -->
  53. <div id="mask">
  54. <div id="loadingPage">
  55. <div class="rect1"></div>
  56. <div class="rect2"></div>
  57. <div class="rect3"></div>
  58. <div class="rect4"></div>
  59. <div class="rect5"></div>
  60. </div>
  61. </div>
  62. <div class="repository">
  63. {{template "repo/header" .}}
  64. <div class="ui container">
  65. {{template "base/alert" .}}
  66. <h4 class="ui top attached header">
  67. {{.i18n.Tr "repo.modelarts.train_job.new"}}
  68. </h4>
  69. <div class="ui attached segment">
  70. <!-- equal width -->
  71. <form class="ui form" action="{{.Link}}" method="post">
  72. {{.CsrfTokenHtml}}
  73. <input type="hidden" name="action" value="update">
  74. <input type="hidden" id="ai_engine_name" name="engine_names" value="">
  75. <input type="hidden" id="ai_flaver_name" name="flaver_names" value="">
  76. <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4>
  77. <div class="required unite min_title inline field">
  78. <label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_cluster"}}</label>
  79. <div class="ui blue mini menu compact selectcloudbrain">
  80. <a class="active item" href="{{.RepoLink}}/cloudbrain/train-job/create">
  81. <svg class="svg" sxmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-2.29-2.333A17.9 17.9 0 0 1 8.027 13H4.062a8.008 8.008 0 0 0 5.648 6.667zM10.03 13c.151 2.439.848 4.73 1.97 6.752A15.905 15.905 0 0 0 13.97 13h-3.94zm9.908 0h-3.965a17.9 17.9 0 0 1-1.683 6.667A8.008 8.008 0 0 0 19.938 13zM4.062 11h3.965A17.9 17.9 0 0 1 9.71 4.333 8.008 8.008 0 0 0 4.062 11zm5.969 0h3.938A15.905 15.905 0 0 0 12 4.248 15.905 15.905 0 0 0 10.03 11zm4.259-6.667A17.9 17.9 0 0 1 15.973 11h3.965a8.008 8.008 0 0 0-5.648-6.667z"></path></svg>
  82. {{.i18n.Tr "cloudbrain.resource_cluster_openi"}}
  83. </a>
  84. <a class="item" href="{{.RepoLink}}/grampus/train-job/npu/create">
  85. <svg class="svg" sxmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-2.29-2.333A17.9 17.9 0 0 1 8.027 13H4.062a8.008 8.008 0 0 0 5.648 6.667zM10.03 13c.151 2.439.848 4.73 1.97 6.752A15.905 15.905 0 0 0 13.97 13h-3.94zm9.908 0h-3.965a17.9 17.9 0 0 1-1.683 6.667A8.008 8.008 0 0 0 19.938 13zM4.062 11h3.965A17.9 17.9 0 0 1 9.71 4.333 8.008 8.008 0 0 0 4.062 11zm5.969 0h3.938A15.905 15.905 0 0 0 12 4.248 15.905 15.905 0 0 0 10.03 11zm4.259-6.667A17.9 17.9 0 0 1 15.973 11h3.965a8.008 8.008 0 0 0-5.648-6.667z"></path></svg>
  86. {{.i18n.Tr "cloudbrain.resource_cluster_c2net"}}(Beta)
  87. </a>
  88. </div>
  89. </div>
  90. <div class="required unite min_title inline field">
  91. <label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.compute_resource"}}</label>
  92. <div class="ui blue mini menu compact selectcloudbrain">
  93. <a class="item" href="{{.RepoLink}}/cloudbrain/train-job/create">
  94. <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16"
  95. height="16">
  96. <path fill="none" d="M0 0h24v24H0z" />
  97. <path
  98. d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z" />
  99. </svg>
  100. CPU/GPU
  101. </a>
  102. <a class="active item" href="{{.RepoLink}}/modelarts/train-job/create">
  103. <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16"
  104. height="16">
  105. <path fill="none" d="M0 0h24v24H0z" />
  106. <path
  107. d="M3 2.992C3 2.444 3.445 2 3.993 2h16.014a1 1 0 0 1 .993.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992zM19 11V4H5v7h14zm0 2H5v7h14v-7zM9 6h6v2H9V6zm0 9h6v2H9v-2z" />
  108. </svg>
  109. Ascend NPU</a>
  110. </div>
  111. </div>
  112. <div class="required unite min_title inline field">
  113. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label>
  114. <input style="width: 60%;" name="display_job_name" id="display_job_name"
  115. placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}"
  116. tabindex="3" onkeyup="this.value=this.value.replace(/[, ]/g,'')" autofocus required
  117. maxlength="64">
  118. <span class="tooltips" style="display: block;">{{.i18n.Tr "cloudbrain.job_name_rule"}}</span>
  119. </div>
  120. <div class="unite min_title inline field">
  121. <label style="font-weight: normal;"
  122. for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}&nbsp;&nbsp;</label>
  123. <textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255"
  124. placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}}
  125. onchange="this.value=this.value.substring(0, 255)"
  126. onkeydown="this.value=this.value.substring(0, 255)"
  127. onkeyup="this.value=this.value.substring(0, 255)"></textarea>
  128. </div>
  129. <div class="ui divider"></div>
  130. <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}:</h4>
  131. <div class="required unite min_title inline field">
  132. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label>
  133. <select class="ui dropdown width80 left2" id="code_version" name="branch_name">
  134. {{if .branch_name}}
  135. <option name="branch_name" value="{{.branch_name}}">{{.branch_name}}</option>
  136. {{range $k, $v :=.Branches}}
  137. {{ if ne $v $.branch_name }}
  138. <option name="branch_name" value="{{$v}}">{{$v}}</option>
  139. {{end}}
  140. {{end}}
  141. {{else}}
  142. <option name="branch_name" value="{{.branchName}}">{{.branchName}}</option>
  143. {{range $k, $v :=.Branches}}
  144. {{ if ne $v $.branchName }}
  145. <option name="branch_name" value="{{$v}}">{{$v}}</option>
  146. {{end}}
  147. {{end}}
  148. {{end}}
  149. </select>
  150. </div>
  151. <div class="required unite min_title inline fields" style="width: 90%;">
  152. <label
  153. style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.AI_driver"}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
  154. <div class="field" style="flex: 1.5;">
  155. <select class="ui dropdown width" id="trainjob_engines">
  156. {{range .engines}}
  157. <option value="{{.Value}}">{{.Value}}</option>
  158. {{end}}
  159. </select>
  160. </div>
  161. <div class="field" style="flex: 2;" id="engine_name">
  162. <select class="ui dropdown width" id="trainjob_engine_versions" style='width: 100%;'
  163. name="engine_id">
  164. {{range .engine_versions}}
  165. <option name="engine_id" value="{{.ID}}">{{.Value}}</option>
  166. {{end}}
  167. </select>
  168. </div>
  169. </div>
  170. <div class="inline unite min_title field required">
  171. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label>
  172. {{if .bootFile}}
  173. <input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}"
  174. tabindex="3" autofocus required maxlength="255">
  175. {{else}}
  176. <input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3"
  177. autofocus required maxlength="255">
  178. {{end}}
  179. <span>
  180. <i class="question circle icon link"
  181. data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}}
  182. data-position="right center" data-variation="mini"></i>
  183. </span>
  184. <a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example"
  185. target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a>
  186. </div>
  187. {{template "custom/select_dataset_train" .}}
  188. <span class="tooltips"
  189. style="margin-left: 11.5rem;margin-bottom: 2rem;">{{.i18n.Tr "cloudbrain.dataset_path_rule"}}</span>
  190. <div class="inline unite min_title field">
  191. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label>
  192. <span id="add_run_para"
  193. style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i
  194. class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span>
  195. <input id="store_run_para" type="hidden" name="run_para_list">
  196. <div class="dynamic field" style="margin-top: 1rem;">
  197. {{if ne 0 (len .params)}}
  198. {{range $k ,$v := .params}}
  199. <div class="two fields width85" id="para{{$k}}">
  200. <div class="field">
  201. <input type="text" name="shipping_first-name" value={{$v.Label}} required>
  202. </div>
  203. <div class="field">
  204. <input type="text" name="shipping_last-name" value={{$v.Value}} required>
  205. </div>
  206. <span>
  207. <i class="trash icon"></i>
  208. </span>
  209. </div>
  210. {{end}}
  211. {{end}}
  212. </div>
  213. </div>
  214. <div class="required field " style="display: none;">
  215. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.resource_pool"}}</label>
  216. <select class="ui dropdown" id="trainjob_resource_pool" style='width:385px' name="pool_id">
  217. {{range .resource_pools}}
  218. <option value="{{.ID}}">{{.Value}}</option>
  219. {{end}}
  220. </select>
  221. </div>
  222. <div class="required grouped fields" style="display: none;">
  223. <label style="font-weight: normal;"
  224. for="resource_type">{{.i18n.Tr "repo.modelarts.train_job.resource_type"}}</label>
  225. <div class="field">
  226. <div class="ui grid">
  227. <div class="column">
  228. <div class="ui radio checkbox">
  229. <input type="radio" name="resource_type" checked="" tabindex="0">
  230. </div>
  231. </div>
  232. <div class="three wide column">train-private-1</div>
  233. <div class="three wide column">{{svg "octicon-verified" 16}} 运行中</div>
  234. <div class="three wide column"> CPU:192 核 2048GiB</div>
  235. </div>
  236. </div>
  237. </div>
  238. <div class="required unite min_title inline field" id="flaver_name">
  239. <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label>
  240. <select class="ui dropdown width81" id="trainjob-flavor" style='width:385px' name="flavor">
  241. {{range .flavor_infos}}
  242. <option name="flavor" value="{{.Code}}">{{.Value}}</option>
  243. {{end}}
  244. </select>
  245. </div>
  246. <div class="inline required unite min_title field">
  247. <label
  248. style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label>
  249. <div class="ui labeled input" style="width: 5%;">
  250. <input style="border-radius: 0;text-align: center;" type="hidden" name="work_server_number"
  251. id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="1"
  252. readonly>
  253. <div class="field" id="trainjob_work_server_num_select" name="work_server_number_select">
  254. <select class="ui dropdown width" style='width: 100%;' name="work_server_id">
  255. <option name="server_id" value="1">1</option>
  256. </select>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="inline unite min_title field">
  261. <button class="ui create_train_job green button">
  262. {{.i18n.Tr "repo.cloudbrain.new"}}
  263. </button>
  264. <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a>
  265. </div>
  266. <!-- 模态框 -->
  267. </form>
  268. </div>
  269. </div>
  270. </div>
  271. {{template "base/footer" .}}
  272. <script>
  273. let url_href = window.location.pathname.split('create')[0]
  274. $(".ui.button").attr('href', url_href)
  275. $('select.dropdown')
  276. .dropdown();
  277. $('.menu .item')
  278. .tab();
  279. // let sever_num = $("#trainjob_work_server_num_select .text").text() //$('#trainjob_work_server_num')
  280. // console.log("sever_num:",sever_num)
  281. // $('.add').click(function(){
  282. // sever_num.val(parseInt(sever_num.val())+1)
  283. // if(sever_num.val()>=26){
  284. // sever_num.val(parseInt(sever_num.val())-1)
  285. // }
  286. // })
  287. // $('.min').click(function(){
  288. // sever_num.val(parseInt(sever_num.val())-1)
  289. // if(sever_num.val()<=0){
  290. // sever_num.val(parseInt(sever_num.val())+1)
  291. // }
  292. // })
  293. // 参数增加、删除、修改、保存
  294. function Add_parameter(i) {
  295. value = '<div class="two fields width85" id= "para' + i + '">' +
  296. '<div class="field">' +
  297. '<input type="text" name="shipping_first-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}> ' +
  298. '</div> ' +
  299. '<div class="field"> ' +
  300. '<input type="text" name="shipping_last-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}>' +
  301. '</div>' +
  302. '<span>' +
  303. '<i class="trash icon">' +
  304. '</i>' +
  305. '</span>' +
  306. '</div>'
  307. $(".dynamic.field").append(value)
  308. }
  309. $('#add_run_para').click(function () {
  310. var len = $(".dynamic.field .two.fields").length
  311. Add_parameter(len)
  312. });
  313. $(".dynamic.field").on("click", ".trash.icon", function () {
  314. var index = $(this).parent().parent().index()
  315. $(this).parent().parent().remove()
  316. var len = $(".dynamic.field .two.fields").length
  317. $(".dynamic.field .two.fields").each(function () {
  318. var cur_index = $(this).index()
  319. $(this).attr('id', 'para' + cur_index)
  320. })
  321. });
  322. $('.ui.parameter.green.button').click(function () {
  323. var parameters = [];
  324. $('table tr').each(function () {
  325. $(this).find('td:eq(1)').each(function () {
  326. parameters.push($(this).text());
  327. })
  328. $(this).find('input').each(function () {
  329. parameters.push($(this).text())
  330. })
  331. });
  332. $('.ui.parameter.modal')
  333. .modal('hide');
  334. for (var i = 2; i < parameters.length; i++) {
  335. switch (i) {
  336. // 数据集uuid待完成
  337. // case (2):
  338. // console.log(1)
  339. // break;
  340. // $("#trainjob_datasets").val(parameters[i]);
  341. // console.log($("#trainjob_datasets").val())
  342. case (3):
  343. $("input[name='boot_file']").val(parameters[i]);
  344. break;
  345. case (4):
  346. var para = parameters[i].split(" ")
  347. for (var j = 0; j < para.length; j++) {
  348. var para_name = para[j].split('=')[0]
  349. var para_value = para[j].split('=')[1]
  350. var len = $(".dynamic.field .two.fields").length
  351. Add_parameter(len)
  352. var pid = 'para' + len
  353. $(".dynamic.field" + " #" + pid + "").find("input[name=shipping_first-name]").val(para_name)
  354. $(".dynamic.field" + " #" + pid + "").find("input[name=shipping_last-name]").val(para_value)
  355. }
  356. break;
  357. // 数据集pool_id待完成
  358. // case (5):
  359. // $("select[name='pool_id']").val(parameters[i]);
  360. // break;
  361. case (6):
  362. // $("input[name='work_server_number']").val(parameters[i]);
  363. break;
  364. }
  365. }
  366. })
  367. $('.ui.save.checkbox').click(function () {
  368. $(this).checkbox({
  369. onChange: function () {
  370. if ($('.ui.save.checkbox').checkbox('is checked')) {
  371. $('#save_para').removeClass("disabled")
  372. } else {
  373. $('#save_para').addClass("disabled")
  374. }
  375. }
  376. });
  377. })
  378. $('.question.circle.icon').hover(function () {
  379. $(this).popup('show')
  380. });
  381. $(".item.active.parameter_config").click(function () {
  382. $('.ui.parameter.modal')
  383. .modal('setting', 'closable', false)
  384. .modal('show');
  385. })
  386. $('.ui.deny.button').click(function () {
  387. $('.ui.parameter.modal')
  388. .modal('hide');
  389. })
  390. $('select.dropdown')
  391. .dropdown();
  392. function validate() {
  393. $('.ui.form')
  394. .form({
  395. on: 'blur',
  396. fields: {
  397. boot_file: {
  398. identifier: 'boot_file',
  399. rules: [
  400. {
  401. type: 'regExp[/.+\.py$/g]',
  402. }
  403. ]
  404. },
  405. display_job_name: {
  406. identifier: 'display_job_name',
  407. rules: [
  408. {
  409. type: 'regExp[/^[a-zA-Z0-9-_]{1,64}[a-zA-Z0-9_]$/]',
  410. }
  411. ]
  412. },
  413. attachment: {
  414. identifier: 'attachment',
  415. rules: [
  416. {
  417. type: 'empty',
  418. }
  419. ]
  420. },
  421. work_server_number: {
  422. identifier: 'work_server_number',
  423. rules: [
  424. {
  425. type: 'integer[1..25]',
  426. }
  427. ]
  428. }
  429. },
  430. onSuccess: function () {
  431. // $('.ui.page.dimmer').dimmer('show')
  432. document.getElementById("mask").style.display = "block"
  433. },
  434. onFailure: function (e) {
  435. return false;
  436. }
  437. })
  438. }
  439. document.onreadystatechange = function () {
  440. if (document.readyState === "complete") {
  441. document.getElementById("mask").style.display = "none"
  442. }
  443. }
  444. function send_run_para() {
  445. var run_parameters = []
  446. var msg = {}
  447. $(".dynamic.field .two.fields").each(function () {
  448. var para_name = $(this).find('input[name=shipping_first-name]').val()
  449. var para_value = $(this).find('input[name=shipping_last-name]').val()
  450. run_parameters.push({ "label": para_name, "value": para_value })
  451. })
  452. msg["parameter"] = run_parameters
  453. msg = JSON.stringify(msg)
  454. $('#store_run_para').val(msg)
  455. }
  456. function get_name() {
  457. let name1 = $("#engine_name .text").text()
  458. let name2 = $("#flaver_name .text").text()
  459. $("input#ai_engine_name").val(name1)
  460. $("input#ai_flaver_name").val(name2)
  461. let val_server_num_select = $("#trainjob_work_server_num_select .text").text()
  462. // console.log("val_server_num_select:",val_server_num_select)
  463. $("input#trainjob_work_server_num").val(val_server_num_select)
  464. }
  465. $('.ui.create_train_job.green.button').click(function (e) {
  466. get_name()
  467. send_run_para()
  468. validate()
  469. })
  470. </script>