| @@ -111,7 +111,7 @@ | |||||
| <input type="hidden" name="_csrf" value=""> | <input type="hidden" name="_csrf" value=""> | ||||
| <div class="unite min_title required inline field" id="task_name"> | <div class="unite min_title required inline field" id="task_name"> | ||||
| <label>任务名称</label> | <label>任务名称</label> | ||||
| <input style="width: 45%;" id="name" name="Name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | |||||
| <input style="width: 45%;" id="model_convert_name" name="model_convert_name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | |||||
| </div> | </div> | ||||
| <div class="unite min_title inline field"> | <div class="unite min_title inline field"> | ||||
| <label for="description">任务描述</label> | <label for="description">任务描述</label> | ||||
| @@ -120,7 +120,6 @@ | |||||
| <div class="unite min_title inline field required"> | <div class="unite min_title inline field required"> | ||||
| <label>模型名称</label> | <label>模型名称</label> | ||||
| <div class="ui dropdown selection search width83 loading" id="choice_model"> | <div class="ui dropdown selection search width83 loading" id="choice_model"> | ||||
| <input type="hidden" id="ModelName" name="ModelName" required> | |||||
| <div class="default text">选择模型</div> | <div class="default text">选择模型</div> | ||||
| <i class="dropdown icon"></i> | <i class="dropdown icon"></i> | ||||
| <div class="menu" id="model-name"> | <div class="menu" id="model-name"> | ||||
| @@ -175,7 +174,7 @@ | |||||
| </div> | </div> | ||||
| <div class="unite min_title inline field"> | <div class="unite min_title inline field"> | ||||
| <button id="submitId" type="button" class="ui create_train_job green button" style="position: absolute;"> | |||||
| <button id="submitId" name="submitId" type="button" class="ui create_train_job green button" style="position: absolute;"> | |||||
| 新建任务 | 新建任务 | ||||
| </button> | </button> | ||||
| </div> | </div> | ||||
| @@ -198,6 +197,19 @@ | |||||
| $('input[name="_csrf"]').val(csrf) | $('input[name="_csrf"]').val(csrf) | ||||
| var modelData; | var modelData; | ||||
| $('#submitId').click(function(){ | |||||
| let name = $("#model_convert_name).val() | |||||
| let desc = $("#Description).val() | |||||
| let modelId = $("#ModelVersion).val() | |||||
| let SrcEngine = $('#SrcEngine').val(); | |||||
| let inputshape = $('#inputshape').val(); | |||||
| let inputdataformat = $('#inputdataformat').val(); | |||||
| let DestFormat = $('#DestFormat').val(); | |||||
| let NetOutputFormat = $('#NetOutputFormat').val(); | |||||
| console.log("name=" + name + " desc=" + desc + " modelId=" + modelId + " SrcEngine=" + SrcEngine); | |||||
| console.log("inputshape=" + inputshape + " inputdataformat=" + inputdataformat + " DestFormat=" + DestFormat + " NetOutputFormat=" + NetOutputFormat); | |||||
| } | |||||
| function createModelName(){ | function createModelName(){ | ||||
| let repoName = location.pathname.split('/')[2] | let repoName = location.pathname.split('/')[2] | ||||
| let modelName = repoName + '_modelConvert_' + Math.random().toString(36).substr(2, 4) | let modelName = repoName + '_modelConvert_' + Math.random().toString(36).substr(2, 4) | ||||
| @@ -237,6 +249,13 @@ | |||||
| loadModelVersion(value) | loadModelVersion(value) | ||||
| } | } | ||||
| }) | }) | ||||
| $('#choice_version').dropdown({ | |||||
| onChange:function(value){ | |||||
| console.log("model version:" + value); | |||||
| $('#choice_version input[name="ModelVersion"]').val(value) | |||||
| } | |||||
| }) | |||||
| }) | }) | ||||
| function loadModelList(){ | function loadModelList(){ | ||||
| @@ -252,7 +271,6 @@ | |||||
| $("#model-name").append(train_html) | $("#model-name").append(train_html) | ||||
| $(".ui.dropdown.selection.search.width83").removeClass("loading") | $(".ui.dropdown.selection.search.width83").removeClass("loading") | ||||
| $('#choice_model .default.text').text(nameList[0]) | $('#choice_model .default.text').text(nameList[0]) | ||||
| $('#choice_model input[name="ModelName"]').val(nameList[0]) | |||||
| loadModelVersion(nameList[0]) | loadModelVersion(nameList[0]) | ||||
| }) | }) | ||||
| } | } | ||||