| @@ -147,25 +147,26 @@ | |||||
| <div class="required unite inline min_title fields" style="width: 96.8%;"> | <div class="required unite inline min_title fields" style="width: 96.8%;"> | ||||
| <div class="required eight wide field"> | <div class="required eight wide field"> | ||||
| <label style="font-weight: normal;white-space: nowrap;width: 210px;text-align: right;">{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}</label> | <label style="font-weight: normal;white-space: nowrap;width: 210px;text-align: right;">{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}</label> | ||||
| <div class="ui fluid search selection dropdown" id="select_model"> | |||||
| <input type="hidden" name="model_name" required> | |||||
| <div class="ui fluid selection dropdown" id="select_model"> | |||||
| <input type="hidden" name="model_name" required value="{{.model_name}}"> | |||||
| <div class="text"></div> | <div class="text"></div> | ||||
| <i class="dropdown icon"></i> | <i class="dropdown icon"></i> | ||||
| <div class="menu" id="model_name"> | <div class="menu" id="model_name"> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | |||||
| </div> | |||||
| <input type="hidden" name="pre_train_model_url" value="{{.train_url}}"> | |||||
| <div class="three wide field"> | <div class="three wide field"> | ||||
| <div class="ui fluid search selection dropdown" id="select_model_version"> | |||||
| <input type="hidden" name="train_url" required> | |||||
| <div class="ui fluid selection dropdown" id="select_model_version"> | |||||
| <input type="hidden" name="train_url" required value="{{.train_url}}"> | |||||
| <div class="text"></div> | <div class="text"></div> | ||||
| <i class="dropdown icon"></i> | <i class="dropdown icon"></i> | ||||
| <div class="menu" id="model_name_version"></div> | <div class="menu" id="model_name_version"></div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="five wide field"> | <div class="five wide field"> | ||||
| <div class="ui fluid search selection dropdown" id="select_model_checkpoint"> | |||||
| <input type="hidden" name="ckpt_name" required> | |||||
| <div class="ui fluid selection dropdown" id="select_model_checkpoint"> | |||||
| <input type="hidden" name="ckpt_name" required value="{{.ckpt_name}}"> | |||||
| <div class="text"></div> | <div class="text"></div> | ||||
| <i class="dropdown icon"></i> | <i class="dropdown icon"></i> | ||||
| <div class="menu" id="model_checkpoint"> | <div class="menu" id="model_checkpoint"> | ||||
| @@ -186,7 +187,8 @@ | |||||
| </div> | </div> | ||||
| {{if not $Grampus}} | {{if not $Grampus}} | ||||
| {{if eq .datasetType 0}} | {{if eq .datasetType 0}} | ||||
| <div id="images-new-cb"></div> | |||||
| <div id="images-new-cb"></div> | |||||
| <input type="hidden" id="ai_image_name" value="{{.image}}"> | |||||
| {{else}} | {{else}} | ||||
| <div class="required inline min_title fields" style="width: 95%;"> | <div class="required inline min_title fields" style="width: 95%;"> | ||||
| <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.AI_driver"}}</label> | <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.AI_driver"}}</label> | ||||
| @@ -258,19 +260,19 @@ | |||||
| <div class="inline field min_title required fields" style="width: 95%;"> | <div class="inline field min_title required fields" style="width: 95%;"> | ||||
| <label class="label-fix-width label-required" style="font-weight: normal;">{{.i18n.Tr "modelsafety.base_data_set"}}</label> | <label class="label-fix-width label-required" style="font-weight: normal;">{{.i18n.Tr "modelsafety.base_data_set"}}</label> | ||||
| <div class="field" style="flex:1.5"> | <div class="field" style="flex:1.5"> | ||||
| <select id="baseDataSet-sel" class="ui dropdown width100" name="src_dataset"></select> | |||||
| <select id="baseDataSet-sel" class="ui dropdown width100" name="src_dataset" ovalue="{{.src_dataset}}"></select> | |||||
| </div> | </div> | ||||
| <div class="field" style="flex:2;display:flex;"> | <div class="field" style="flex:2;display:flex;"> | ||||
| <label class="label-fix-width label-required" style="font-weight:normal;display:flex;justify-content:right;align-items: center;">{{.i18n.Tr "modelsafety.combat_data_set"}}</label> | <label class="label-fix-width label-required" style="font-weight:normal;display:flex;justify-content:right;align-items: center;">{{.i18n.Tr "modelsafety.combat_data_set"}}</label> | ||||
| <div style="flex:1"> | <div style="flex:1"> | ||||
| <select id="combatDataSet-sel" class="ui dropdown width100" name="combat_dataset"></select> | |||||
| <select id="combatDataSet-sel" class="ui dropdown width100" name="combat_dataset" ovalue="{{.combat_dataset}}"></select> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="inline min_title field required"> | <div class="inline min_title field required"> | ||||
| <label class="label-fix-width" style="font-weight:normal;">{{.i18n.Tr "modelsafety.evaluation_indicators"}}</label> | <label class="label-fix-width" style="font-weight:normal;">{{.i18n.Tr "modelsafety.evaluation_indicators"}}</label> | ||||
| <input type="text" style="display:none;" name="evaluation_index" /> | <input type="text" style="display:none;" name="evaluation_index" /> | ||||
| <select id="job_indicators" class="ui dropdown width48 v-middle" multiple style='width:385px;'> | |||||
| <select id="job_indicators" class="ui dropdown width48 v-middle" multiple style='width:385px;' ovalue="{{.evaluationIndex}}"> | |||||
| <option value="ACC">ACC</option> | <option value="ACC">ACC</option> | ||||
| <!-- <option value="CAV">CAV</option>--> | <!-- <option value="CAV">CAV</option>--> | ||||
| <option value="ASS">ASS</option> | <option value="ASS">ASS</option> | ||||
| @@ -365,7 +367,7 @@ | |||||
| }, | }, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| // $('.ui.page.dimmer').dimmer('show') | // $('.ui.page.dimmer').dimmer('show') | ||||
| document.getElementById("mask").style.display = "block" | |||||
| document.getElementById("mask").style.display = "block"; | |||||
| isValidate = true; | isValidate = true; | ||||
| }, | }, | ||||
| onFailure: function (e) { | onFailure: function (e) { | ||||
| @@ -407,6 +409,8 @@ | |||||
| for (var i = 0, iLen = nameList.length; i < iLen; i++) { | for (var i = 0, iLen = nameList.length; i < iLen; i++) { | ||||
| selectEl.append(`<option index="${i}" value="${keyList[i]}">${nameList[i]}</option>`); | selectEl.append(`<option index="${i}" value="${keyList[i]}">${nameList[i]}</option>`); | ||||
| } | } | ||||
| var oValue = selectEl.attr('ovalue'); | |||||
| oValue && selectEl.val(oValue); | |||||
| selectEl.on('change', function() { | selectEl.on('change', function() { | ||||
| var self = $(this); | var self = $(this); | ||||
| var selectIndex = self.find('option:selected').attr('index'); | var selectIndex = self.find('option:selected').attr('index'); | ||||
| @@ -422,10 +426,15 @@ | |||||
| } | } | ||||
| initDataSetSelect(baseDataSetName, baseDataSetUUID, baseDataSetSel); | initDataSetSelect(baseDataSetName, baseDataSetUUID, baseDataSetSel); | ||||
| initDataSetSelect(combatDataSetName, combatDataSetUUID, combatDataSetSel); | initDataSetSelect(combatDataSetName, combatDataSetUUID, combatDataSetSel); | ||||
| $('#job_indicators').on('change', function() { | $('#job_indicators').on('change', function() { | ||||
| var value = $(this).val(); | var value = $(this).val(); | ||||
| $('input[name="evaluation_index"]').val(value.join(';')); | $('input[name="evaluation_index"]').val(value.join(';')); | ||||
| }).trigger('change'); | }).trigger('change'); | ||||
| var oIndicators = $('#job_indicators').attr('ovalue'); | |||||
| if (oIndicators) { | |||||
| $('input[name="evaluation_index"]').val(oIndicators); | |||||
| $('#job_indicators').dropdown('set exactly', oIndicators.split(';')) | |||||
| }; | |||||
| })(); | })(); | ||||
| </script> | </script> | ||||