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

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {{template "base/head" .}}
  2. <div class="ui page dimmer">
  3. <div class="ui text loader">{{.i18n.Tr "loading"}}</div>
  4. </div>
  5. <div class="repository">
  6. {{template "repo/header" .}}
  7. <div class="repository new repo ui middle very relaxed page grid">
  8. <div class="column">
  9. {{template "base/alert" .}}
  10. <form class="ui form" action="{{.Link}}" method="post">
  11. {{.CsrfTokenHtml}}
  12. <h3 class="ui top attached header">
  13. {{.i18n.Tr "repo.cloudbrain.new"}}
  14. </h3>
  15. <div class="ui attached segment">
  16. <!-- <br> -->
  17. <div class="inline required field">
  18. <label>任务名称</label>
  19. <input name="job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.job_name}}" tabindex="3" autofocus required maxlength="255">
  20. </div>
  21. <div class="inline required field">
  22. <label>数据集</label>
  23. <select id="cloudbrain_dataset" class="ui search dropdown" placeholder="选择数据集" style='width:385px' name="attachment">
  24. {{range .attachments}}
  25. <option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option>
  26. {{end}}
  27. </select>
  28. </div>
  29. <div class="inline required field">
  30. <label>工作环境</label>
  31. <input name="de" id="cloudbrain_de" value="{{.env}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
  32. </div>
  33. <div class="inline required field">
  34. <label>类型</label>
  35. <input name="job_type" id="cloudbrain_job_type" value="{{.notebook_type}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
  36. </div>
  37. <div class="inline required field">
  38. <label>规格</label>
  39. <input name="flavor" id="cloudbrain_flavor" value="{{.flavor}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
  40. </div>
  41. <div class="inline required field">
  42. <label>数据集存放路径</label>
  43. <input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
  44. </div>
  45. <div class="inline field">
  46. <label>描述</label>
  47. <input name="description" id="cloudbrain_description" tabindex="3" autofocus maxlength="255">
  48. </div>
  49. <div class="inline field">
  50. <label></label>
  51. <button class="ui green button" onclick="showmask()">
  52. {{.i18n.Tr "repo.cloudbrain.new"}}
  53. </button>
  54. <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a>
  55. </div>
  56. </div>
  57. </form>
  58. </div>
  59. </div>
  60. </div>
  61. {{template "base/footer" .}}
  62. <script>
  63. $('select.dropdown')
  64. .dropdown();
  65. $('.ui.green.button').click(function(){
  66. $('.ui.page.dimmer').dimmer('show')
  67. })
  68. $(function() {
  69. $("#cloudbrain_job_type").change(function() {
  70. if ($(this).val() == 'BENCHMARK') {
  71. $(".cloudbrain_benchmark").show();
  72. } else {
  73. $(".cloudbrain_benchmark").hide();
  74. }
  75. })
  76. })
  77. </script>