| @@ -622,24 +622,24 @@ | |||
| <div class="required inline field"> | |||
| <label>{{.i18n.Tr "repo.modelarts.train_job"}}</label> | |||
| <input type="hidden" class="width83" id="JobId" name="JobId" readonly required> | |||
| <input type="hidden" id="VersionName" name="VersionName" value="V0001"> | |||
| <input type="hidden" class="width83" id="jobId" name="jobId" readonly required> | |||
| <input type="hidden" id="versionName" name="versionName" value="V0001"> | |||
| <input style="width: 45%;" id="JobName" readonly required> | |||
| </div> | |||
| <div class="required inline field" id="modelname"> | |||
| <label>{{.i18n.Tr "repo.model.manage.model_name"}}</label> | |||
| <input style="width: 45%;" id="name" name="Name" required maxlength="25" | |||
| <input style="width: 45%;" id="name" name="name" required maxlength="25" | |||
| onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | |||
| </div> | |||
| <div class="required inline field" id="verionname"> | |||
| <label>{{.i18n.Tr "repo.modelconvert.modelversion"}}</label> | |||
| <input style="width: 45%;" id="version" name="Version" value="" readonly required maxlength="255"> | |||
| <input style="width: 45%;" id="version" name="version" value="" readonly required maxlength="255"> | |||
| </div> | |||
| <div class="unite min_title inline field required"> | |||
| <label>{{.i18n.Tr "repo.model.manage.engine"}}</label> | |||
| <div class="ui dropdown selection search width70" id="choice_Engine"> | |||
| <input type="hidden" id="Engine" name="Engine" required> | |||
| <input type="hidden" id="engine" name="engine" required> | |||
| <div class="default text">{{.i18n.Tr "repo.model.manage.select.engine"}}</div> | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu" id="job-Engine"> | |||
| @@ -666,12 +666,12 @@ | |||
| </div> | |||
| <div class="inline field"> | |||
| <label>{{.i18n.Tr "repo.model.manage.modellabel"}}</label> | |||
| <input style="width: 83%;margin-left: 7px;" id="label" name="Label" maxlength="255" | |||
| <input style="width: 83%;margin-left: 7px;" id="label" name="label" maxlength="255" | |||
| placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'> | |||
| </div> | |||
| <div class="inline field"> | |||
| <label for="description">{{.i18n.Tr "repo.model.manage.modeldesc"}}</label> | |||
| <textarea style="width: 83%;margin-left: 7px;" id="Description" name="Description" rows="3" | |||
| <textarea style="width: 83%;margin-left: 7px;" id="description" name="description" rows="3" | |||
| maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' | |||
| onchange="this.value=this.value.substring(0, 255)" | |||
| onkeydown="this.value=this.value.substring(0, 255)" | |||
| @@ -839,14 +839,13 @@ | |||
| .modal({ | |||
| centered: false, | |||
| onShow: function () { | |||
| $('input[name="Version"]').addClass('model_disabled') | |||
| // $('input[name="JobId"]').text(obj.JobName) | |||
| $('input[name="version"]').addClass('model_disabled') | |||
| $('#JobName').val(obj.DisplayJobName).addClass('model_disabled') | |||
| $('input[name="JobId"]').val(obj.JobID) | |||
| $('input[name="VersionName"]').val("V0001") | |||
| $('input[name="jobId"]').val(obj.JobID) | |||
| $('input[name="versionName"]').val("V0001") | |||
| $('#choice_Engine .default.text').text("PyTorch"); | |||
| $('#choice_Engine input[name="Engine"]').val(0) | |||
| $('#choice_Engine input[name="engine"]').val(0) | |||
| $('#choice_Engine .default.text').css({ "color": "rgb(0, 0, 0,0.87)" }) | |||
| $('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" }) | |||
| createModelName(); | |||
| @@ -876,8 +875,8 @@ | |||
| type: 'POST', | |||
| data: data, | |||
| success: function (res) { | |||
| $('input[name="Engine_name"]').val(""); | |||
| $('input[name="Engine"]').val(""); | |||
| $('input[name="engine_name"]').val(""); | |||
| $('input[name="engine"]').val(""); | |||
| location.href = `/${userName}/${repoPath}/modelmanage/show_model` | |||
| $('.ui.modal.second').modal('hide') | |||
| }, | |||
| @@ -592,24 +592,24 @@ | |||
| <div class="required inline field"> | |||
| <label>{{.i18n.Tr "repo.modelarts.train_job"}}</label> | |||
| <input type="hidden" class="width83" id="JobId" name="JobId" readonly required> | |||
| <input type="hidden" id="VersionName" name="VersionName" value="V0001"> | |||
| <input type="hidden" class="width83" id="jobId" name="jobId" readonly required> | |||
| <input type="hidden" id="versionName" name="versionName" value="V0001"> | |||
| <input style="width: 45%;" id="JobName" readonly required> | |||
| </div> | |||
| <div class="required inline field" id="modelname"> | |||
| <label>{{.i18n.Tr "repo.model.manage.model_name"}}</label> | |||
| <input style="width: 45%;" id="name" name="Name" required maxlength="25" | |||
| <input style="width: 45%;" id="name" name="name" required maxlength="25" | |||
| onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | |||
| </div> | |||
| <div class="required inline field" id="verionname"> | |||
| <label>{{.i18n.Tr "repo.modelconvert.modelversion"}}</label> | |||
| <input style="width: 45%;" id="version" name="Version" value="" readonly required maxlength="255"> | |||
| <input style="width: 45%;" id="version" name="version" value="" readonly required maxlength="255"> | |||
| </div> | |||
| <div class="unite min_title inline field required"> | |||
| <label>{{.i18n.Tr "repo.model.manage.engine"}}</label> | |||
| <div class="ui dropdown selection search width70" id="choice_Engine"> | |||
| <input type="hidden" id="Engine" name="Engine" required> | |||
| <input type="hidden" id="engine" name="engine" required> | |||
| <div class="default text">{{.i18n.Tr "repo.model.manage.select.engine"}}</div> | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu" id="job-Engine"> | |||
| @@ -637,12 +637,12 @@ | |||
| </div> | |||
| <div class="inline field"> | |||
| <label>{{.i18n.Tr "repo.model.manage.modellabel"}}</label> | |||
| <input style="width: 83%;margin-left: 7px;" id="label" name="Label" maxlength="255" | |||
| <input style="width: 83%;margin-left: 7px;" id="label" name="label" maxlength="255" | |||
| placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'> | |||
| </div> | |||
| <div class="inline field"> | |||
| <label for="description">{{.i18n.Tr "repo.model.manage.modeldesc"}}</label> | |||
| <textarea style="width: 83%;margin-left: 7px;" id="Description" name="Description" rows="3" | |||
| <textarea style="width: 83%;margin-left: 7px;" id="description" name="description" rows="3" | |||
| maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' | |||
| onchange="this.value=this.value.substring(0, 255)" | |||
| onkeydown="this.value=this.value.substring(0, 255)" | |||
| @@ -730,7 +730,6 @@ | |||
| function showMenu() { | |||
| var cityObj = $("#modelSelectedFile"); | |||
| var cityOffset = $("#modelSelectedFile").offset(); | |||
| //$("#menuContent").css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast"); | |||
| $("#menuContent").slideDown("fast"); | |||
| $("body").bind("mousedown", onBodyDown); | |||
| } | |||
| @@ -829,11 +828,10 @@ | |||
| .modal({ | |||
| centered: false, | |||
| onShow: function () { | |||
| $('input[name="Version"]').addClass('model_disabled') | |||
| // $('input[name="JobId"]').text(obj.JobName) | |||
| $('input[name="version"]').addClass('model_disabled') | |||
| $('#JobName').val(obj.DisplayJobName).addClass('model_disabled') | |||
| $('input[name="JobId"]').val(obj.JobID) | |||
| $('input[name="VersionName"]').val("V0001") | |||
| $('input[name="jobId"]').val(obj.JobID) | |||
| $('input[name="versionName"]').val("V0001") | |||
| if(obj.ComputeResource=="NPU"){ | |||
| if (obj.EngineName != null && obj.EngineName != "") { | |||
| @@ -841,16 +839,16 @@ | |||
| srcEngine = srcEngine.trim().toLowerCase(); | |||
| if (srcEngine == 'tensorflow') { | |||
| $('#choice_Engine .default.text').text("TensorFlow"); | |||
| $('#choice_Engine input[name="Engine"]').val(1) | |||
| $('#choice_Engine input[name="engine"]').val(1) | |||
| } | |||
| if (srcEngine == 'mindspore') { | |||
| $('#choice_Engine .default.text').text("MindSpore"); | |||
| $('#choice_Engine input[name="Engine"]').val(2) | |||
| $('#choice_Engine input[name="engine"]').val(2) | |||
| } | |||
| } | |||
| }else{ | |||
| $('#choice_Engine .default.text').text("PyTorch"); | |||
| $('#choice_Engine input[name="Engine"]').val(0) | |||
| $('#choice_Engine input[name="engine"]').val(0) | |||
| } | |||
| $('#choice_Engine .default.text').css({ "color": "rgb(0, 0, 0,0.87)" }) | |||
| $('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" }) | |||
| @@ -882,8 +880,8 @@ | |||
| type: 'POST', | |||
| data: data, | |||
| success: function (res) { | |||
| $('input[name="Engine_name"]').val(""); | |||
| $('input[name="Engine"]').val(""); | |||
| $('input[name="engine_name"]').val(""); | |||
| $('input[name="engine"]').val(""); | |||
| location.href = `/${userName}/${repoPath}/modelmanage/show_model` | |||
| $('.ui.modal.second').modal('hide') | |||
| }, | |||
| @@ -651,29 +651,29 @@ | |||
| <div class="two inline fields "> | |||
| <div class="required ten wide field"> | |||
| <label>{{.i18n.Tr "repo.modelarts.train_job"}}</label> | |||
| <input type="hidden" class="width83" id="JobId" name="JobId" readonly required> | |||
| <input type="hidden" class="width83" id="jobId" name="jobId" readonly required> | |||
| <input class="width83" id="JobName" readonly required> | |||
| </div> | |||
| <div class="required six widde field"> | |||
| <label>{{.i18n.Tr "repo.model.manage.version"}}</label> | |||
| <input class="width70" id="VersionName" name="VersionName" readonly required> | |||
| <input class="width70" id="versionName" name="versionName" readonly required> | |||
| </div> | |||
| </div> | |||
| <div class="required inline field" id="modelname"> | |||
| <label>{{.i18n.Tr "repo.model.manage.model_name"}}</label> | |||
| <input style="width: 45%;" id="name" name="Name" required maxlength="25" | |||
| <input style="width: 45%;" id="name" name="name" required maxlength="25" | |||
| onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | |||
| </div> | |||
| <div class="required inline field" id="verionname"> | |||
| <label>{{.i18n.Tr "repo.modelconvert.modelversion"}}</label> | |||
| <input style="width: 45%;" id="version" name="Version" value="" readonly required maxlength="255"> | |||
| <input style="width: 45%;" id="version" name="version" value="" readonly required maxlength="255"> | |||
| </div> | |||
| <div class="unite min_title inline field required"> | |||
| <label>{{.i18n.Tr "repo.model.manage.engine"}}</label> | |||
| <input type="hidden" id="Engine" name="Engine" required> | |||
| <input style="width: 45%;" id="Engine_name" name="Engine_name" readonly required maxlength="255"> | |||
| <input type="hidden" id="engine" name="engine" required> | |||
| <input style="width: 45%;" id="engine_name" name="engine_name" readonly required maxlength="255"> | |||
| </div> | |||
| <div class="unite min_title inline fields required"> | |||
| <div class="field required"> | |||
| @@ -688,12 +688,12 @@ | |||
| </div> | |||
| <div class="inline field"> | |||
| <label>{{.i18n.Tr "repo.model.manage.modellabel"}}</label> | |||
| <input style="width: 83%;margin-left: 7px;" id="label" name="Label" maxlength="255" | |||
| <input style="width: 83%;margin-left: 7px;" id="label" name="label" maxlength="255" | |||
| placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'> | |||
| </div> | |||
| <div class="inline field"> | |||
| <label for="description">{{.i18n.Tr "repo.model.manage.modeldesc"}}</label> | |||
| <textarea style="width: 83%;margin-left: 7px;" id="Description" name="Description" rows="3" | |||
| <textarea style="width: 83%;margin-left: 7px;" id="description" name="description" rows="3" | |||
| maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' | |||
| onchange="this.value=this.value.substring(0, 255)" | |||
| onkeydown="this.value=this.value.substring(0, 255)" | |||
| @@ -887,18 +887,17 @@ | |||
| .modal({ | |||
| centered: false, | |||
| onShow: function () { | |||
| $('input[name="Version"]').addClass('model_disabled') | |||
| // $('input[name="JobId"]').text(obj.JobName) | |||
| $('input[name="version"]').addClass('model_disabled') | |||
| $('#JobName').val(obj.DisplayJobName).addClass('model_disabled') | |||
| $('input[name="JobId"]').val(obj.JobID) | |||
| $('input[name="VersionName"]').val(obj.VersionName).addClass('model_disabled') | |||
| $('input[name="jobId"]').val(obj.JobID) | |||
| $('input[name="versionName"]').val(obj.VersionName).addClass('model_disabled') | |||
| if(obj.EngineID ==122 || obj.EngineID ==35 || obj.EngineID ==-1 || obj.EngineID ==37){ | |||
| $('input[name="Engine_name"]').val("MindSpore").addClass('model_disabled'); | |||
| $('input[name="Engine"]').val(2); | |||
| $('input[name="engine_name"]').val("MindSpore").addClass('model_disabled'); | |||
| $('input[name="engine"]').val(2); | |||
| } | |||
| if(obj.EngineID ==121 || obj.EngineID ==38){ | |||
| $('input[name="Engine_name"]').val("TensorFlow").addClass('model_disabled'); | |||
| $('input[name="Engine"]').val(1); | |||
| $('input[name="engine_name"]').val("TensorFlow").addClass('model_disabled'); | |||
| $('input[name="engine"]').val(1); | |||
| } | |||
| $('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" }) | |||
| createModelName(); | |||
| @@ -928,8 +927,8 @@ | |||
| type: 'POST', | |||
| data: data, | |||
| success: function (res) { | |||
| $('input[name="Engine_name"]').val(""); | |||
| $('input[name="Engine"]').val(""); | |||
| $('input[name="engine_name"]').val(""); | |||
| $('input[name="engine"]').val(""); | |||
| location.href = `/${userName}/${repoPath}/modelmanage/show_model` | |||
| $('.ui.modal.second').modal('hide') | |||
| }, | |||