| @@ -236,165 +236,6 @@ | |||
| <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script> | |||
| // let form = document.getElementById('form_id'); | |||
| // let createFlag = false | |||
| // form.onsubmit = function (e) { | |||
| // if(createFlag) return false | |||
| // createFlag = true | |||
| // } | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // $('.menu .item') | |||
| // .tab(); | |||
| // $(document).keydown(function(event){ | |||
| // switch(event.keyCode){ | |||
| // case 13:return false; | |||
| // } | |||
| // }); | |||
| // $(document).ready(function(){ | |||
| // let params = $('.dynamic.field').data('params') | |||
| // params&¶ms.parameter.forEach((item,index)=>{ | |||
| // Add_parameter(index,flag=true,item) | |||
| // }) | |||
| // }) | |||
| // // 参数增加、删除、修改、保存 | |||
| // function Add_parameter(i,flag=false,paramsObject={}) { | |||
| // let value = '' | |||
| // value += `<div class="two fields width85" id= "para${i}">` | |||
| // value += '<div class="field">' | |||
| // let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
| // let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_first-name" value="${paramsObject.label}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_first-name" required placeholder="' + placeholder_name+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<div class="field">' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_last-name" value="${paramsObject.value}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_last-name" required placeholder="' + placeholder_value + '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<span><i class="trash icon"></i></span>' | |||
| // value += '</div>' | |||
| // $(".dynamic.field").append(value) | |||
| // } | |||
| // $('#add_run_para').click(function () { | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // Add_parameter(len) | |||
| // }); | |||
| // $(".dynamic.field").on("click", ".trash.icon", function () { | |||
| // var index = $(this).parent().parent().index() | |||
| // $(this).parent().parent().remove() | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var cur_index = $(this).index() | |||
| // $(this).attr('id', 'para' + cur_index) | |||
| // }) | |||
| // }); | |||
| // $('.question.circle.icon').hover(function () { | |||
| // $(this).popup('show') | |||
| // }); | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // var isValidate = false; | |||
| // function validate() { | |||
| // $('.ui.form') | |||
| // .form({ | |||
| // on: 'blur', | |||
| // fields: { | |||
| // boot_file: { | |||
| // identifier: 'boot_file', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/.+\.py$/g]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // display_job_name: { | |||
| // identifier: 'display_job_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // attachment: { | |||
| // identifier: 'attachment', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // work_server_number: { | |||
| // identifier: 'work_server_number', | |||
| // rules: [ | |||
| // { | |||
| // type: 'integer[1..25]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // branch_name: { | |||
| // identifier: 'branch_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // spec_id: { | |||
| // identifier: 'spec_id', | |||
| // rules: [{ type: 'empty' }] | |||
| // } | |||
| // }, | |||
| // onSuccess: function () { | |||
| // // $('.ui.page.dimmer').dimmer('show') | |||
| // document.getElementById("mask").style.display = "block" | |||
| // isValidate = true; | |||
| // }, | |||
| // onFailure: function (e) { | |||
| // isValidate = false; | |||
| // return false; | |||
| // } | |||
| // }) | |||
| // } | |||
| // document.onreadystatechange = function () { | |||
| // if (document.readyState === "complete") { | |||
| // document.getElementById("mask").style.display = "none" | |||
| // } | |||
| // } | |||
| // function send_run_para() { | |||
| // var run_parameters = [] | |||
| // var msg = {} | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var para_name = $(this).find('input.shipping_first-name').val() | |||
| // var para_value = $(this).find('input.shipping_last-name').val() | |||
| // run_parameters.push({ "label": para_name, "value": para_value }) | |||
| // }) | |||
| // msg["parameter"] = run_parameters | |||
| // msg = JSON.stringify(msg) | |||
| // $('#store_run_para').val(msg) | |||
| // } | |||
| // validate(); | |||
| // $('.ui.create_train_job.green.button').click(function (e) { | |||
| // send_run_para(); | |||
| // validate(); | |||
| // }) | |||
| ;(function() { | |||
| var SPECS = {{ .train_specs }}; | |||
| var showPoint = true; | |||
| @@ -237,165 +237,6 @@ | |||
| <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script> | |||
| // let form = document.getElementById('form_id'); | |||
| // let createFlag = false | |||
| // form.onsubmit = function (e) { | |||
| // if(createFlag) return false | |||
| // createFlag = true | |||
| // } | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // $('.menu .item') | |||
| // .tab(); | |||
| // $(document).keydown(function(event){ | |||
| // switch(event.keyCode){ | |||
| // case 13:return false; | |||
| // } | |||
| // }); | |||
| // $(document).ready(function(){ | |||
| // let params = $('.dynamic.field').data('params') | |||
| // params&¶ms.parameter.forEach((item,index)=>{ | |||
| // Add_parameter(index,flag=true,item) | |||
| // }) | |||
| // }) | |||
| // // 参数增加、删除、修改、保存 | |||
| // function Add_parameter(i,flag=false,paramsObject={}) { | |||
| // let value = '' | |||
| // value += `<div class="two fields width85" id= "para${i}">` | |||
| // value += '<div class="field">' | |||
| // let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
| // let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_first-name" value="${paramsObject.label}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_first-name" required placeholder="' + placeholder_name+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<div class="field">' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_last-name" value="${paramsObject.value}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_last-name" required placeholder="' + placeholder_value + '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<span><i class="trash icon"></i></span>' | |||
| // value += '</div>' | |||
| // $(".dynamic.field").append(value) | |||
| // } | |||
| // $('#add_run_para').click(function () { | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // Add_parameter(len) | |||
| // }); | |||
| // $(".dynamic.field").on("click", ".trash.icon", function () { | |||
| // var index = $(this).parent().parent().index() | |||
| // $(this).parent().parent().remove() | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var cur_index = $(this).index() | |||
| // $(this).attr('id', 'para' + cur_index) | |||
| // }) | |||
| // }); | |||
| // $('.question.circle.icon').hover(function () { | |||
| // $(this).popup('show') | |||
| // }); | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // var isValidate = false; | |||
| // function validate() { | |||
| // $('.ui.form') | |||
| // .form({ | |||
| // on: 'blur', | |||
| // fields: { | |||
| // boot_file: { | |||
| // identifier: 'boot_file', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/.+\.py$/g]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // display_job_name: { | |||
| // identifier: 'display_job_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // attachment: { | |||
| // identifier: 'attachment', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // work_server_number: { | |||
| // identifier: 'work_server_number', | |||
| // rules: [ | |||
| // { | |||
| // type: 'integer[1..25]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // branch_name: { | |||
| // identifier: 'branch_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // spec_id: { | |||
| // identifier: 'spec_id', | |||
| // rules: [{ type: 'empty' }] | |||
| // } | |||
| // }, | |||
| // onSuccess: function () { | |||
| // // $('.ui.page.dimmer').dimmer('show') | |||
| // document.getElementById("mask").style.display = "block" | |||
| // isValidate = true; | |||
| // }, | |||
| // onFailure: function (e) { | |||
| // isValidate = false; | |||
| // return false; | |||
| // } | |||
| // }) | |||
| // } | |||
| // document.onreadystatechange = function () { | |||
| // if (document.readyState === "complete") { | |||
| // document.getElementById("mask").style.display = "none" | |||
| // } | |||
| // } | |||
| // function send_run_para() { | |||
| // var run_parameters = [] | |||
| // var msg = {} | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var para_name = $(this).find('input.shipping_first-name').val() | |||
| // var para_value = $(this).find('input.shipping_last-name').val() | |||
| // run_parameters.push({ "label": para_name, "value": para_value }) | |||
| // }) | |||
| // msg["parameter"] = run_parameters | |||
| // msg = JSON.stringify(msg) | |||
| // $('#store_run_para').val(msg) | |||
| // } | |||
| // validate(); | |||
| // $('.ui.create_train_job.green.button').click(function (e) { | |||
| // send_run_para(); | |||
| // validate(); | |||
| // }) | |||
| ;(function() { | |||
| var SPECS = {{ .train_specs }}; | |||
| var showPoint = true; | |||
| @@ -209,170 +209,6 @@ | |||
| <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script> | |||
| // let form = document.getElementById('form_id'); | |||
| // let createFlag = false | |||
| // form.onsubmit = function (e) { | |||
| // if(createFlag) return false | |||
| // createFlag = true | |||
| // } | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // $('.menu .item') | |||
| // .tab(); | |||
| // $(document).ready(function(){ | |||
| // let params = $('.dynamic.field').data('params') | |||
| // params&¶ms.parameter.forEach((item,index)=>{ | |||
| // Add_parameter(index,flag=true,item) | |||
| // }) | |||
| // }) | |||
| // // 参数增加、删除、修改、保存 | |||
| // function Add_parameter(i,flag=false,paramsObject={}) { | |||
| // let value = '' | |||
| // value += `<div class="two fields width85" id= "para${i}">` | |||
| // value += '<div class="field">' | |||
| // let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
| // let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_first-name" value="${paramsObject.label}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_first-name" required placeholder="' + placeholder_name+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<div class="field">' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_last-name" value="${paramsObject.value}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_last-name" required placeholder="' + placeholder_value+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<span><i class="trash icon"></i></span>' | |||
| // value += '</div>' | |||
| // $(".dynamic.field").append(value) | |||
| // } | |||
| // $('#add_run_para').click(function () { | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // Add_parameter(len) | |||
| // }); | |||
| // $(".dynamic.field").on("click", ".trash.icon", function () { | |||
| // var index = $(this).parent().parent().index() | |||
| // $(this).parent().parent().remove() | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var cur_index = $(this).index() | |||
| // $(this).attr('id', 'para' + cur_index) | |||
| // }) | |||
| // }); | |||
| // $('.question.circle.icon').hover(function(){ | |||
| // $(this).popup('show') | |||
| // }); | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // var isValidate = false; | |||
| // function validate(){ | |||
| // $('.ui.form') | |||
| // .form({ | |||
| // on: 'blur', | |||
| // fields: { | |||
| // boot_file: { | |||
| // identifier : 'boot_file', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/.+\.py$/g]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // display_job_name:{ | |||
| // identifier : 'display_job_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // attachment:{ | |||
| // identifier : 'attachment', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // flavor:{ | |||
| // identifier : 'flavor', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // work_server_number: { | |||
| // identifier : 'work_server_number', | |||
| // rules: [ | |||
| // { | |||
| // type : 'integer[1..25]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // spec_id: { | |||
| // identifier: 'spec_id', | |||
| // rules: [{ type: 'empty' }] | |||
| // } | |||
| // }, | |||
| // onSuccess: function(){ | |||
| // // $('.ui.page.dimmer').dimmer('show') | |||
| // document.getElementById("mask").style.display = "block" | |||
| // isValidate = true; | |||
| // }, | |||
| // onFailure: function(e){ | |||
| // isValidate = false; | |||
| // return false; | |||
| // } | |||
| // }) | |||
| // } | |||
| // document.onreadystatechange = function() { | |||
| // if (document.readyState === "complete") { | |||
| // document.getElementById("mask").style.display = "none" | |||
| // } | |||
| // } | |||
| // function send_run_para() { | |||
| // var run_parameters = [] | |||
| // var msg = {} | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var para_name = $(this).find('input.shipping_first-name').val() | |||
| // var para_value = $(this).find('input.shipping_last-name').val() | |||
| // run_parameters.push({ "label": para_name, "value": para_value }) | |||
| // }) | |||
| // msg["parameter"] = run_parameters | |||
| // msg = JSON.stringify(msg) | |||
| // $('#store_run_para').val(msg) | |||
| // } | |||
| // function get_name(){ | |||
| // let name1=$("#engine_name .text").text() | |||
| // let name2=$("#flavor_name .text").text() | |||
| // $("input#ai_engine_name").val(name1) | |||
| // $("input#ai_flavor_name").val(name2) | |||
| // } | |||
| // validate(); | |||
| // $('.ui.create_train_job.green.button').click(function(e) { | |||
| // get_name() | |||
| // send_run_para() | |||
| // validate(); | |||
| // }) | |||
| ;(function() { | |||
| var SPECS = {{ .Specs }}; | |||
| var showPoint = true; | |||
| @@ -206,169 +206,6 @@ | |||
| <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script> | |||
| // let form = document.getElementById('form_id'); | |||
| // let createFlag = false | |||
| // form.onsubmit = function (e) { | |||
| // if(createFlag) return false | |||
| // createFlag = true | |||
| // } | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // $('.menu .item') | |||
| // .tab(); | |||
| // $(document).ready(function(){ | |||
| // let params = $('.dynamic.field').data('params') | |||
| // params&¶ms.parameter.forEach((item,index)=>{ | |||
| // Add_parameter(index,flag=true,item) | |||
| // }) | |||
| // }) | |||
| // // 参数增加、删除、修改、保存 | |||
| // function Add_parameter(i,flag=false,paramsObject={}) { | |||
| // let value = '' | |||
| // value += `<div class="two fields width85" id= "para${i}">` | |||
| // value += '<div class="field">' | |||
| // let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
| // let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_first-name" value="${paramsObject.label}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_first-name" required placeholder="' + placeholder_name+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<div class="field">' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_last-name" value="${paramsObject.value}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_last-name" required placeholder="' + placeholder_value+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<span><i class="trash icon"></i></span>' | |||
| // value += '</div>' | |||
| // $(".dynamic.field").append(value) | |||
| // } | |||
| // $('#add_run_para').click(function () { | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // Add_parameter(len) | |||
| // }); | |||
| // $(".dynamic.field").on("click", ".trash.icon", function () { | |||
| // var index = $(this).parent().parent().index() | |||
| // $(this).parent().parent().remove() | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var cur_index = $(this).index() | |||
| // $(this).attr('id', 'para' + cur_index) | |||
| // }) | |||
| // }); | |||
| // $('.question.circle.icon').hover(function(){ | |||
| // $(this).popup('show') | |||
| // }); | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // var isValidate = false; | |||
| // function validate(){ | |||
| // $('.ui.form') | |||
| // .form({ | |||
| // on: 'blur', | |||
| // fields: { | |||
| // boot_file: { | |||
| // identifier : 'boot_file', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/.+\.py$/g]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // display_job_name:{ | |||
| // identifier : 'display_job_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // attachment:{ | |||
| // identifier : 'attachment', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // flavor:{ | |||
| // identifier : 'flavor', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // work_server_number: { | |||
| // identifier : 'work_server_number', | |||
| // rules: [ | |||
| // { | |||
| // type : 'integer[1..25]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // spec_id: { | |||
| // identifier: 'spec_id', | |||
| // rules: [{ type: 'empty' }] | |||
| // } | |||
| // }, | |||
| // onSuccess: function(){ | |||
| // // $('.ui.page.dimmer').dimmer('show') | |||
| // document.getElementById("mask").style.display = "block" | |||
| // isValidate = true; | |||
| // }, | |||
| // onFailure: function(e){ | |||
| // isValidate = false; | |||
| // return false; | |||
| // } | |||
| // }) | |||
| // } | |||
| // document.onreadystatechange = function() { | |||
| // if (document.readyState === "complete") { | |||
| // document.getElementById("mask").style.display = "none" | |||
| // } | |||
| // } | |||
| // function send_run_para() { | |||
| // var run_parameters = [] | |||
| // var msg = {} | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var para_name = $(this).find('input.shipping_first-name').val() | |||
| // var para_value = $(this).find('input.shipping_last-name').val() | |||
| // run_parameters.push({ "label": para_name, "value": para_value }) | |||
| // }) | |||
| // msg["parameter"] = run_parameters | |||
| // msg = JSON.stringify(msg) | |||
| // $('#store_run_para').val(msg) | |||
| // } | |||
| // function get_name(){ | |||
| // let name1=$("#engine_name .text").text() | |||
| // let name2=$("#flavor_name .text").text() | |||
| // $("input#ai_engine_name").val(name1) | |||
| // $("input#ai_flavor_name").val(name2) | |||
| // } | |||
| // validate(); | |||
| // $('.ui.create_train_job.green.button').click(function(e) { | |||
| // get_name() | |||
| // send_run_para() | |||
| // validate(); | |||
| // }) | |||
| ;(function() { | |||
| var SPECS = {{ .Specs }}; | |||
| var showPoint = true; | |||
| @@ -233,164 +233,6 @@ | |||
| <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script> | |||
| // let form = document.getElementById('form_id'); | |||
| // let createFlag = false | |||
| // form.onsubmit = function (e) { | |||
| // if(createFlag) return false | |||
| // createFlag = true | |||
| // } | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // $('.menu .item') | |||
| // .tab(); | |||
| // $(document).ready(function(){ | |||
| // let params = $('.dynamic.field').data('params') | |||
| // params&¶ms.parameter.forEach((item,index)=>{ | |||
| // Add_parameter(index,flag=true,item) | |||
| // }) | |||
| // }) | |||
| // // 参数增加、删除、修改、保存 | |||
| // function Add_parameter(i,flag=false,paramsObject={}) { | |||
| // let value = '' | |||
| // value += `<div class="two fields width85" id= "para${i}">` | |||
| // value += '<div class="field">' | |||
| // let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
| // let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_first-name" value="${paramsObject.label}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_first-name" required placeholder="' + placeholder_name+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<div class="field">' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_last-name" value="${paramsObject.value}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_last-name" required placeholder="' + placeholder_value+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<span><i class="trash icon"></i></span>' | |||
| // value += '</div>' | |||
| // $(".dynamic.field").append(value) | |||
| // } | |||
| // $('#add_run_para').click(function () { | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // Add_parameter(len) | |||
| // }); | |||
| // $(".dynamic.field").on("click", ".trash.icon", function () { | |||
| // var index = $(this).parent().parent().index() | |||
| // $(this).parent().parent().remove() | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var cur_index = $(this).index() | |||
| // $(this).attr('id', 'para' + cur_index) | |||
| // }) | |||
| // }); | |||
| // $('.question.circle.icon').hover(function(){ | |||
| // $(this).popup('show') | |||
| // }); | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // var isValidate = false; | |||
| // function validate(){ | |||
| // $('.ui.form') | |||
| // .form({ | |||
| // on: 'blur', | |||
| // fields: { | |||
| // boot_file: { | |||
| // identifier : 'boot_file', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/.+\.py$/g]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // display_job_name:{ | |||
| // identifier : 'display_job_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // attachment:{ | |||
| // identifier : 'attachment', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // work_server_number: { | |||
| // identifier : 'work_server_number', | |||
| // rules: [ | |||
| // { | |||
| // type : 'integer[1..25]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // spec_id: { | |||
| // identifier: 'spec_id', | |||
| // rules: [{ type: 'empty' }] | |||
| // } | |||
| // }, | |||
| // onSuccess: function(){ | |||
| // // $('.ui.page.dimmer').dimmer('show') | |||
| // document.getElementById("mask").style.display = "block" | |||
| // isValidate = true; | |||
| // }, | |||
| // onFailure: function(e){ | |||
| // isValidate = false; | |||
| // return false; | |||
| // } | |||
| // }) | |||
| // } | |||
| // document.onreadystatechange = function() { | |||
| // if (document.readyState === "complete") { | |||
| // document.getElementById("mask").style.display = "none" | |||
| // } | |||
| // } | |||
| // function send_run_para() { | |||
| // var run_parameters = [] | |||
| // var msg = {} | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var para_name = $(this).find('input.shipping_first-name').val() | |||
| // var para_value = $(this).find('input.shipping_last-name').val() | |||
| // run_parameters.push({ "label": para_name, "value": para_value }) | |||
| // }) | |||
| // msg["parameter"] = run_parameters | |||
| // msg = JSON.stringify(msg) | |||
| // $('#store_run_para').val(msg) | |||
| // } | |||
| // function get_name(){ | |||
| // let name1=$("#engine_name .text").text() | |||
| // let name2=$("#flavor_name .text").text() | |||
| // $("input#ai_engine_name").val(name1) | |||
| // $("input#ai_flavor_name").val(name2) | |||
| // let val_server_num_select = $("#trainjob_work_server_num_select .text").text() | |||
| // // console.log("val_server_num_select:",val_server_num_select) | |||
| // $("input#trainjob_work_server_num").val(val_server_num_select) | |||
| // } | |||
| // validate(); | |||
| // $('.ui.create_train_job.green.button').click(function(e) { | |||
| // get_name() | |||
| // send_run_para() | |||
| // validate(); | |||
| // }) | |||
| ;(function() { | |||
| var SPECS = {{ .Specs }}; | |||
| var showPoint = true; | |||
| @@ -230,170 +230,8 @@ | |||
| </div> | |||
| {{template "base/footer" .}} | |||
| <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script> | |||
| let form = document.getElementById('form_id'); | |||
| let createFlag = false | |||
| form.onsubmit = function (e) { | |||
| if(createFlag) return false | |||
| createFlag = true | |||
| } | |||
| $('select.dropdown') | |||
| .dropdown(); | |||
| $('.menu .item') | |||
| .tab(); | |||
| $(document).ready(function(){ | |||
| let params = $('.dynamic.field').data('params') | |||
| params&¶ms.parameter.forEach((item,index)=>{ | |||
| Add_parameter(index,flag=true,item) | |||
| }) | |||
| }) | |||
| // 参数增加、删除、修改、保存 | |||
| function Add_parameter(i,flag=false,paramsObject={}) { | |||
| let value = '' | |||
| value += `<div class="two fields width85" id= "para${i}">` | |||
| value += '<div class="field">' | |||
| let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
| let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
| if(flag){ | |||
| value +=`<input type="text" class="shipping_first-name" value="${paramsObject.label}">` | |||
| }else{ | |||
| value +='<input type="text" class="shipping_first-name" required placeholder="' + placeholder_name+ '">' | |||
| } | |||
| value += '</div>' | |||
| value += '<div class="field">' | |||
| if(flag){ | |||
| value +=`<input type="text" class="shipping_last-name" value="${paramsObject.value}">` | |||
| }else{ | |||
| value +='<input type="text" class="shipping_last-name" required placeholder="' + placeholder_value+ '">' | |||
| } | |||
| value += '</div>' | |||
| value += '<span><i class="trash icon"></i></span>' | |||
| value += '</div>' | |||
| console.log(value) | |||
| $(".dynamic.field").append(value) | |||
| } | |||
| $('#add_run_para').click(function () { | |||
| var len = $(".dynamic.field .two.fields").length | |||
| Add_parameter(len) | |||
| }); | |||
| $(".dynamic.field").on("click", ".trash.icon", function () { | |||
| var index = $(this).parent().parent().index() | |||
| $(this).parent().parent().remove() | |||
| var len = $(".dynamic.field .two.fields").length | |||
| $(".dynamic.field .two.fields").each(function () { | |||
| var cur_index = $(this).index() | |||
| $(this).attr('id', 'para' + cur_index) | |||
| }) | |||
| }); | |||
| $('.question.circle.icon').hover(function(){ | |||
| $(this).popup('show') | |||
| }); | |||
| $('select.dropdown') | |||
| .dropdown(); | |||
| var isValidate = false; | |||
| function validate(){ | |||
| $('.ui.form') | |||
| .form({ | |||
| on: 'blur', | |||
| fields: { | |||
| boot_file: { | |||
| identifier : 'boot_file', | |||
| rules: [ | |||
| { | |||
| type: 'regExp[/.+\.py$/g]', | |||
| } | |||
| ] | |||
| }, | |||
| display_job_name:{ | |||
| identifier : 'display_job_name', | |||
| rules: [ | |||
| { | |||
| type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', | |||
| } | |||
| ] | |||
| }, | |||
| attachment:{ | |||
| identifier : 'attachment', | |||
| rules: [ | |||
| { | |||
| type: 'empty', | |||
| } | |||
| ] | |||
| }, | |||
| work_server_number: { | |||
| identifier : 'work_server_number', | |||
| rules: [ | |||
| { | |||
| type : 'integer[1..25]', | |||
| } | |||
| ] | |||
| }, | |||
| spec_id: { | |||
| identifier: 'spec_id', | |||
| rules: [{ type: 'empty' }] | |||
| } | |||
| }, | |||
| onSuccess: function(){ | |||
| // $('.ui.page.dimmer').dimmer('show') | |||
| document.getElementById("mask").style.display = "block" | |||
| isValidate = true; | |||
| }, | |||
| onFailure: function(e){ | |||
| isValidate = false; | |||
| return false; | |||
| } | |||
| }) | |||
| } | |||
| document.onreadystatechange = function() { | |||
| if (document.readyState === "complete") { | |||
| document.getElementById("mask").style.display = "none" | |||
| } | |||
| } | |||
| function send_run_para() { | |||
| var run_parameters = [] | |||
| var msg = {} | |||
| $(".dynamic.field .two.fields").each(function () { | |||
| var para_name = $(this).find('input.shipping_first-name').val() | |||
| var para_value = $(this).find('input.shipping_last-name').val() | |||
| run_parameters.push({ "label": para_name, "value": para_value }) | |||
| }) | |||
| msg["parameter"] = run_parameters | |||
| msg = JSON.stringify(msg) | |||
| $('#store_run_para').val(msg) | |||
| return false | |||
| } | |||
| function get_name(){ | |||
| let name1=$("#engine_name .text").text() | |||
| let name2=$("#flavor_name .text").text() | |||
| $("input#ai_engine_name").val(name1) | |||
| $("input#ai_flavor_name").val(name2) | |||
| let val_server_num_select = $("#trainjob_work_server_num_select .text").text() | |||
| // console.log("val_server_num_select:",val_server_num_select) | |||
| $("input#trainjob_work_server_num").val(val_server_num_select) | |||
| } | |||
| validate(); | |||
| $('.ui.create_train_job.green.button').click(function(e) { | |||
| get_name() | |||
| send_run_para() | |||
| validate(); | |||
| console.log(c) | |||
| }) | |||
| ;(function() { | |||
| var SPECS = {{ .Specs }}; | |||
| var showPoint = true; | |||
| @@ -286,7 +286,7 @@ | |||
| <button class="ui create_train_job green button"> | |||
| {{.i18n.Tr "repo.cloudbrain.new"}} | |||
| </button> | |||
| <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | |||
| <a class="ui button" href="{{.RepoLink}}/modelarts/train-job">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | |||
| </div> | |||
| <!-- 模态框 --> | |||
| @@ -299,171 +299,6 @@ | |||
| <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script> | |||
| // let form = document.getElementById('form_id'); | |||
| // let createFlag = false | |||
| // form.onsubmit = function (e) { | |||
| // if(createFlag) return false | |||
| // createFlag = true | |||
| // } | |||
| let url_href = window.location.pathname.split('create')[0] | |||
| $(".ui.button").attr('href', url_href) | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // $('.menu .item') | |||
| // .tab(); | |||
| // $(document).keydown(function(event){ | |||
| // switch(event.keyCode){ | |||
| // case 13:return false; | |||
| // } | |||
| // }); | |||
| // $(document).ready(function(){ | |||
| // let params = $('.dynamic.field').data('params') | |||
| // params&¶ms.parameter.forEach((item,index)=>{ | |||
| // Add_parameter(index,flag=true,item) | |||
| // }) | |||
| // }) | |||
| // // 参数增加、删除、修改、保存 | |||
| // function Add_parameter(i,flag=false,paramsObject={}) { | |||
| // let value = '' | |||
| // value += `<div class="two fields width85" id= "para${i}">` | |||
| // value += '<div class="field">' | |||
| // let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
| // let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_first-name" value="${paramsObject.label}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_first-name" required placeholder="' + placeholder_name+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<div class="field">' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_last-name" value="${paramsObject.value}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_last-name" required placeholder="' + placeholder_value+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<span><i class="trash icon"></i></span>' | |||
| // value += '</div>' | |||
| // $(".dynamic.field").append(value) | |||
| // } | |||
| // $('#add_run_para').click(function () { | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // Add_parameter(len) | |||
| // }); | |||
| // $(".dynamic.field").on("click", ".trash.icon", function () { | |||
| // var index = $(this).parent().parent().index() | |||
| // $(this).parent().parent().remove() | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var cur_index = $(this).index() | |||
| // $(this).attr('id', 'para' + cur_index) | |||
| // }) | |||
| // }); | |||
| // $('.question.circle.icon').hover(function () { | |||
| // $(this).popup('show') | |||
| // }); | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // var isValidate = false; | |||
| // function validate() { | |||
| // $('.ui.form') | |||
| // .form({ | |||
| // on: 'blur', | |||
| // fields: { | |||
| // boot_file: { | |||
| // identifier: 'boot_file', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/.+\.py$/g]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // display_job_name: { | |||
| // identifier: 'display_job_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // attachment: { | |||
| // identifier: 'attachment', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // work_server_number: { | |||
| // identifier: 'work_server_number', | |||
| // rules: [ | |||
| // { | |||
| // type: 'integer[1..25]', | |||
| // } | |||
| // ] | |||
| // }, | |||
| // spec_id: { | |||
| // identifier: 'spec_id', | |||
| // rules: [{ type: 'empty' }] | |||
| // } | |||
| // }, | |||
| // onSuccess: function () { | |||
| // // $('.ui.page.dimmer').dimmer('show') | |||
| // document.getElementById("mask").style.display = "block" | |||
| // isValidate = true; | |||
| // }, | |||
| // onFailure: function (e) { | |||
| // isValidate = false; | |||
| // return false; | |||
| // } | |||
| // }) | |||
| // } | |||
| // document.onreadystatechange = function () { | |||
| // if (document.readyState === "complete") { | |||
| // document.getElementById("mask").style.display = "none" | |||
| // } | |||
| // } | |||
| // function send_run_para() { | |||
| // var run_parameters = [] | |||
| // var msg = {} | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var para_name = $(this).find('input.shipping_first-name').val() | |||
| // var para_value = $(this).find('input.shipping_last-name').val() | |||
| // run_parameters.push({ "label": para_name, "value": para_value }) | |||
| // }) | |||
| // msg["parameter"] = run_parameters | |||
| // msg = JSON.stringify(msg) | |||
| // $('#store_run_para').val(msg) | |||
| // } | |||
| // function get_name() { | |||
| // let name1 = $("#engine_name .text").text() | |||
| // let name2 = $("#flaver_name .text").text() | |||
| // $("input#ai_engine_name").val(name1) | |||
| // $("input#ai_flaver_name").val(name2) | |||
| // let val_server_num_select = $("#trainjob_work_server_num_select .text").text() | |||
| // // console.log("val_server_num_select:",val_server_num_select) | |||
| // $("input#trainjob_work_server_num").val(val_server_num_select) | |||
| // } | |||
| // validate(); | |||
| // $('.ui.create_train_job.green.button').click(function (e) { | |||
| // get_name() | |||
| // send_run_para(); | |||
| // validate(); | |||
| // }) | |||
| ;(function() { | |||
| var SPECS = {{ .Specs }}; | |||
| var showPoint = true; | |||
| @@ -233,19 +233,6 @@ | |||
| </div> | |||
| </div> | |||
| <!--<div class="required unite min_title inline field" id="flaver_name"> | |||
| <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> | |||
| <select class="ui dropdown width81" id="trainjob-flavor" style='width:385px' name="flavor"> | |||
| {{if .flavor_name}} | |||
| <option name="flavor" value="{{.flavor_code}}">{{.flavor_name}}</option> | |||
| {{end}} | |||
| {{range .flavor_infos}} | |||
| {{if ne $.flavor_code .Code}} | |||
| <option name="flavor" value="{{.Code}}">{{.Value}}</option> | |||
| {{end}} | |||
| {{end}} | |||
| </select> | |||
| </div>--> | |||
| <div class="required unite min_title inline field" id="flaver_name"> | |||
| <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> | |||
| <select id="__specs__" class="ui dropdown width81" style='width:385px' name="spec_id" ovalue="{{.spec_id}}"></select> | |||
| @@ -265,7 +252,7 @@ | |||
| <button class="ui create_train_job green button"> | |||
| {{.i18n.Tr "repo.cloudbrain.new"}} | |||
| </button> | |||
| <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | |||
| <a class="ui button" href="{{.RepoLink}}/modelarts/train-job">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | |||
| </div> | |||
| <!-- 模态框 --> | |||
| @@ -278,190 +265,9 @@ | |||
| <script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script src="{{StaticUrlPrefix}}/js/cloudbrainNew.js?v={{MD5 AppVer}}" type="text/javascript"></script> | |||
| <script> | |||
| let url_href = location.pathname.split('/create_version')[0] | |||
| let url_post = location.pathname | |||
| let version_name = location.search.split('?version_name=')[1] | |||
| $("#parents_version").val(version_name) | |||
| $(".ui.button").attr('href',url_href) | |||
| $(".ui.form").attr('action',url_post) | |||
| $("input[name=version_name]").attr('value',version_name) | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // $('.menu .item') | |||
| // .tab(); | |||
| // let sever_num = $('#trainjob_work_server_num') | |||
| // $('.add').click(function(){ | |||
| // sever_num.val(parseInt(sever_num.val())+1) | |||
| // if(sever_num.val()>=26){ | |||
| // sever_num.val(parseInt(sever_num.val())-1) | |||
| // } | |||
| // }) | |||
| // $('.min').click(function(){ | |||
| // sever_num.val(parseInt(sever_num.val())-1) | |||
| // if(sever_num.val()<=0){ | |||
| // sever_num.val(parseInt(sever_num.val())+1) | |||
| // } | |||
| // }) | |||
| // $(document).ready(function(){ | |||
| // let params = $('.dynamic.field').data('params') | |||
| // params&¶ms.parameter.forEach((item,index)=>{ | |||
| // Add_parameter(index,flag=true,item) | |||
| // }) | |||
| // }) | |||
| // // 参数增加、删除、修改、保存 | |||
| // function Add_parameter(i,flag=false,paramsObject={}) { | |||
| // let value = '' | |||
| // value += `<div class="two fields width85" id= "para${i}">` | |||
| // value += '<div class="field">' | |||
| // let placeholder_value='{{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}' | |||
| // let placeholder_name='{{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_first-name" value="${paramsObject.label}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_first-name" required placeholder="' + placeholder_name+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<div class="field">' | |||
| // if(flag){ | |||
| // value +=`<input type="text" class="shipping_last-name" value="${paramsObject.value}">` | |||
| // }else{ | |||
| // value +='<input type="text" class="shipping_last-name" required placeholder="' + placeholder_value+ '">' | |||
| // } | |||
| // value += '</div>' | |||
| // value += '<span><i class="trash icon"></i></span>' | |||
| // value += '</div>' | |||
| // $(".dynamic.field").append(value) | |||
| // } | |||
| // $('#add_run_para').click(function () { | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // Add_parameter(len) | |||
| // }); | |||
| // $(".dynamic.field").on("click", ".trash.icon", function () { | |||
| // var index = $(this).parent().parent().index() | |||
| // $(this).parent().parent().remove() | |||
| // var len = $(".dynamic.field .two.fields").length | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var cur_index = $(this).index() | |||
| // $(this).attr('id', 'para' + cur_index) | |||
| // }) | |||
| // }); | |||
| // $('.question.circle.icon').hover(function(){ | |||
| // $(this).popup('show') | |||
| // }); | |||
| // $(".item.active.parameter_config").click(function(){ | |||
| // $('.ui.parameter.modal') | |||
| // .modal('setting', 'closable', false) | |||
| // .modal('show'); | |||
| // }) | |||
| // $('.ui.deny.button').click(function(){ | |||
| // $('.ui.parameter.modal') | |||
| // .modal('hide'); | |||
| // }) | |||
| // $('select.dropdown') | |||
| // .dropdown(); | |||
| // var isValidate = false; | |||
| // function validate(){ | |||
| // $('.ui.form') | |||
| // .form({ | |||
| // on: 'blur', | |||
| // inline:true, | |||
| // fields: { | |||
| // boot_file: { | |||
| // identifier : 'boot_file', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/.+\.py$/g]', | |||
| // prompt : '启动文件必须为.py结尾' | |||
| // } | |||
| // ] | |||
| // }, | |||
| // job_name:{ | |||
| // identifier : 'job_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/^[a-zA-Z0-9-_]{1,36}$/]', | |||
| // prompt : '只包含大小写字母、数字、_和-,最长36个字符。' | |||
| // } | |||
| // ] | |||
| // }, | |||
| // display_job_name:{ | |||
| // identifier : 'display_job_name', | |||
| // rules: [ | |||
| // { | |||
| // type: 'regExp[/^[a-zA-Z0-9-_]{1,36}$/]', | |||
| // prompt : '只包含大小写字母、数字、_和-,最长36个字符。' | |||
| // } | |||
| // ] | |||
| // }, | |||
| // attachment:{ | |||
| // identifier : 'attachment', | |||
| // rules: [ | |||
| // { | |||
| // type: 'empty', | |||
| // prompt : '选择一个数据集' | |||
| // } | |||
| // ] | |||
| // }, | |||
| // spec_id: { | |||
| // identifier: 'spec_id', | |||
| // rules: [{ type: 'empty' }] | |||
| // } | |||
| // }, | |||
| // onSuccess: function(){ | |||
| // // $('.ui.page.dimmer').dimmer('show') | |||
| // document.getElementById("mask").style.display = "block" | |||
| // isValidate = true; | |||
| // }, | |||
| // onFailure: function(e){ | |||
| // isValidate = false; | |||
| // return false; | |||
| // } | |||
| // }) | |||
| // } | |||
| // document.onreadystatechange = function() { | |||
| // if (document.readyState === "complete") { | |||
| // document.getElementById("mask").style.display = "none" | |||
| // } | |||
| // } | |||
| // function send_run_para() { | |||
| // var run_parameters = [] | |||
| // var msg = {} | |||
| // $(".dynamic.field .two.fields").each(function () { | |||
| // var para_name = $(this).find('input.shipping_first-name').val() | |||
| // var para_value = $(this).find('input.shipping_last-name').val() | |||
| // run_parameters.push({ "label": para_name, "value": para_value }) | |||
| // }) | |||
| // msg["parameter"] = run_parameters | |||
| // msg = JSON.stringify(msg) | |||
| // $('#store_run_para').val(msg) | |||
| // } | |||
| // function get_name(){ | |||
| // let name1=$("#engine_name .text").text() | |||
| // let name2=$("#flaver_name .text").text() | |||
| // $("input#ai_engine_name").val(name1) | |||
| // $("input#ai_flaver_name").val(name2) | |||
| // } | |||
| // validate() | |||
| // $('.ui.create_train_job.green.button').click(function(e) { | |||
| // get_name() | |||
| // send_run_para() | |||
| // validate() | |||
| // }) | |||
| ;(function() { | |||
| var SPECS = {{ .Specs }}; | |||
| var showPoint = true; | |||
| @@ -7,9 +7,9 @@ | |||
| v-if="benchmarkNew" | |||
| class="label-fix-width" | |||
| style="font-weight: normal" | |||
| >{{i18n.image_label}}</label | |||
| >{{ i18n.image_label }}</label | |||
| > | |||
| <label v-else>{{i18n.image_label}}</label> | |||
| <label v-else>{{ i18n.image_label }}</label> | |||
| <input | |||
| v-if="benchmarkNew" | |||
| type="text" | |||
| @@ -17,6 +17,7 @@ | |||
| :value="imageAddress" | |||
| style="width: 48.5%" | |||
| :placeholder="i18n.image_select_placeholder" | |||
| required | |||
| /> | |||
| <input | |||
| v-else | |||
| @@ -24,15 +25,20 @@ | |||
| name="image" | |||
| :value="imageAddress" | |||
| :placeholder="i18n.image_select_placeholder" | |||
| required | |||
| /> | |||
| <el-button | |||
| type="text" | |||
| @click="dialogVisible = true" | |||
| icon="el-icon-plus" | |||
| style="color: #0366d6" | |||
| >{{i18n.image_select}} | |||
| >{{ i18n.image_select }} | |||
| </el-button> | |||
| <el-dialog :title="i18n.image_select" :visible.sync="dialogVisible" width="50%"> | |||
| <el-dialog | |||
| :title="i18n.image_select" | |||
| :visible.sync="dialogVisible" | |||
| width="50%" | |||
| > | |||
| <div | |||
| class="ui icon input" | |||
| style="z-index: 9999; position: absolute; right: 50px; height: 30px" | |||
| @@ -48,7 +54,11 @@ | |||
| /> | |||
| </div> | |||
| <el-tabs v-model="activeName" @tab-click="handleClick"> | |||
| <el-tab-pane :label="i18n.image_public" name="first" v-loading="loadingPublic"> | |||
| <el-tab-pane | |||
| :label="i18n.image_public" | |||
| name="first" | |||
| v-loading="loadingPublic" | |||
| > | |||
| <div | |||
| style=" | |||
| display: flex; | |||
| @@ -120,7 +130,7 @@ | |||
| selectImages(publicData.place, publicData.tag) | |||
| " | |||
| > | |||
| {{i18n.image_use}} | |||
| {{ i18n.image_use }} | |||
| </button> | |||
| </div> | |||
| </div> | |||