Browse Source

fix issue

tags/v1.22.9.2^2
zhoupzh 3 years ago
parent
commit
e24f583018
5 changed files with 17 additions and 107 deletions
  1. +2
    -22
      templates/repo/grampus/trainjob/gpu/new.tmpl
  2. +4
    -42
      templates/repo/grampus/trainjob/gpu/versionnew.tmpl
  3. +2
    -3
      templates/repo/grampus/trainjob/npu/new.tmpl
  4. +2
    -40
      templates/repo/grampus/trainjob/npu/versionnew.tmpl
  5. +7
    -0
      web_src/js/components/dataset/selectDataset.vue

+ 2
- 22
templates/repo/grampus/trainjob/gpu/new.tmpl View File

@@ -62,7 +62,7 @@
<div class="repository"> <div class="repository">
{{template "repo/header" .}} {{template "repo/header" .}}
<div class="ui container"> <div class="ui container">
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}" data-flag-model="true" data-dataset-uuid="{{.uuid}}" data-dataset-name="{{.dataset_name}}"></div>
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}" data-flag-model="true" data-dataset-uuid="{{.attachment}}" data-dataset-name="{{.dataset_name}}"></div>
{{template "base/alert" .}} {{template "base/alert" .}}
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.i18n.Tr "repo.modelarts.train_job.new"}} {{.i18n.Tr "repo.modelarts.train_job.new"}}
@@ -185,27 +185,7 @@


</div> </div>
</div> </div>
<!--<div class="required min_title inline field" id="flavor_name">
<label class="label-fix-width" 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}}
{{range .flavor_infos}}
{{if eq $.flavor .ID}}
<option value="{{.ID}}">{{.Name}}</option>
{{end}}
{{end}}
{{range .flavor_infos}}
{{if ne $.flavor .ID}}
<option value="{{.ID}}">{{.Name}}</option>
{{end}}
{{end}}
{{else}}
{{range .flavor_infos}}
<option name="flavor" value="{{.ID}}">{{.Name}}</option>
{{end}}
{{end}}
</select>
</div>-->

<div class="required min_title inline field" id="flavor_name"> <div class="required min_title inline field" id="flavor_name">
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label>
<select class="ui dropdown width48" id="__specs__" style='width:385px' name="spec_id" ovalue="{{.spec_id}}"></select> <select class="ui dropdown width48" id="__specs__" style='width:385px' name="spec_id" ovalue="{{.spec_id}}"></select>


+ 4
- 42
templates/repo/grampus/trainjob/gpu/versionnew.tmpl View File

@@ -62,7 +62,7 @@
<div class="repository"> <div class="repository">
{{template "repo/header" .}} {{template "repo/header" .}}
<div class="ui container"> <div class="ui container">
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}" data-flag-model="true" data-dataset-uuid="{{.uuid}}" data-dataset-name="{{.dataset_name}}"></div>
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}" data-flag-model="true" data-dataset-uuid="{{.attachment}}" data-dataset-name="{{.dataset_name}}"></div>
{{template "base/alert" .}} {{template "base/alert" .}}
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.i18n.Tr "repo.modelarts.train_job.new"}} {{.i18n.Tr "repo.modelarts.train_job.new"}}
@@ -75,8 +75,6 @@
<input type="hidden" id="ai_engine_name" name="engine_name" value=""> <input type="hidden" id="ai_engine_name" name="engine_name" value="">
<input type="hidden" id="ai_flavor_name" name="flavor_name" value=""> <input type="hidden" id="ai_flavor_name" name="flavor_name" value="">
<input type="hidden" id="ai_image_name" value="{{.image}}"> <input type="hidden" id="ai_image_name" value="{{.image}}">
<input type="hidden" id="fail_dataset_name" value="{{$.dataset_name}}">
<input type="hidden" id="fail_dataset_uuid" value="{{$.attachment}}">
<h4 class="train-job-title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4> <h4 class="train-job-title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4>
<div class="required min_title inline field"> <div class="required min_title inline field">
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_cluster"}}</label> <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_cluster"}}</label>
@@ -183,45 +181,10 @@
<span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span> <span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span>
<input id="store_run_para" type="hidden" name="run_para_list"> <input id="store_run_para" type="hidden" name="run_para_list">
<div class="dynamic field" style="margin-top: 1rem;" data-params="{{.run_para_list}}"> <div class="dynamic field" style="margin-top: 1rem;" data-params="{{.run_para_list}}">
{{if ne 0 (len .params)}}
{{range $k ,$v := .params}}
<div class="two fields width85" id="para{{$k}}">
<div class="field">
<input type="text" name="shipping_first-name" value={{$v.Label}} required>
</div>
<div class="field">
<input type="text" name="shipping_last-name" value={{$v.Value}} required>
</div>
<span>
<i class="trash icon"></i>
</span>

</div>
{{end}}
{{end}}
</div> </div>
</div> </div>
<!--<div class="required min_title inline field" id="flavor_name">
<label class="label-fix-width" 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}}
{{range .flavor_infos}}
{{if eq $.flavor .ID}}
<option value="{{.ID}}">{{.Name}}</option>
{{end}}
{{end}}
{{range .flavor_infos}}
{{if ne $.flavor .ID}}
<option value="{{.ID}}">{{.Name}}</option>
{{end}}
{{end}}
{{else}}
{{range .flavor_infos}}
<option name="flavor" value="{{.ID}}">{{.Name}}</option>
{{end}}
{{end}}
</select>
</div>-->
<div class="required min_title inline field" id="flavor_name"> <div class="required min_title inline field" id="flavor_name">
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label>
<select class="ui dropdown width48" id="__specs__" style='width:385px' name="spec_id" ovalue="{{.spec_id}}"></select> <select class="ui dropdown width48" id="__specs__" style='width:385px' name="spec_id" ovalue="{{.spec_id}}"></select>
@@ -258,12 +221,11 @@
.tab(); .tab();




$(document).ready(function(){
$(document).ready(function(){
let params = $('.dynamic.field').data('params') let params = $('.dynamic.field').data('params')
params&&params.parameter.forEach((item,index)=>{ params&&params.parameter.forEach((item,index)=>{
Add_parameter(index,flag=true,item) Add_parameter(index,flag=true,item)
}) })

}) })
// 参数增加、删除、修改、保存 // 参数增加、删除、修改、保存
function Add_parameter(i,flag=false,paramsObject={}) { function Add_parameter(i,flag=false,paramsObject={}) {


+ 2
- 3
templates/repo/grampus/trainjob/npu/new.tmpl View File

@@ -57,7 +57,7 @@
<div class="repository"> <div class="repository">
{{template "repo/header" .}} {{template "repo/header" .}}
<div class="ui container"> <div class="ui container">
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}" data-flag-model="true" data-dataset-uuid="{{.uuid}}" data-dataset-name="{{.dataset_name}}"></div>
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}" data-flag-model="true" data-dataset-uuid="{{.attachment}}" data-dataset-name="{{.dataset_name}}"></div>
{{template "base/alert" .}} {{template "base/alert" .}}
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.i18n.Tr "repo.modelarts.train_job.new"}} {{.i18n.Tr "repo.modelarts.train_job.new"}}
@@ -268,12 +268,11 @@
.tab(); .tab();




$(document).ready(function(){
$(document).ready(function(){
let params = $('.dynamic.field').data('params') let params = $('.dynamic.field').data('params')
params&&params.parameter.forEach((item,index)=>{ params&&params.parameter.forEach((item,index)=>{
Add_parameter(index,flag=true,item) Add_parameter(index,flag=true,item)
}) })

}) })
// 参数增加、删除、修改、保存 // 参数增加、删除、修改、保存
function Add_parameter(i,flag=false,paramsObject={}) { function Add_parameter(i,flag=false,paramsObject={}) {


+ 2
- 40
templates/repo/grampus/trainjob/npu/versionnew.tmpl View File

@@ -57,7 +57,7 @@
<div class="repository"> <div class="repository">
{{template "repo/header" .}} {{template "repo/header" .}}
<div class="ui container"> <div class="ui container">
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}" data-flag-model="true" data-dataset-uuid="{{.uuid}}" data-dataset-name="{{.dataset_name}}"></div>
<div class="cloudbrain-type" style="display: none;" data-cloudbrain-type="{{.datasetType}}" data-repo-link="{{.RepoLink}}" data-flag-model="true" data-dataset-uuid="{{.attachment}}" data-dataset-name="{{.dataset_name}}"></div>
{{template "base/alert" .}} {{template "base/alert" .}}
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.i18n.Tr "repo.modelarts.train_job.new"}} {{.i18n.Tr "repo.modelarts.train_job.new"}}
@@ -69,8 +69,6 @@
<input type="hidden" name="action" value="update"> <input type="hidden" name="action" value="update">
<input type="hidden" id="ai_engine_name" name="engine_name" value=""> <input type="hidden" id="ai_engine_name" name="engine_name" value="">
<input type="hidden" id="ai_flavor_name" name="flavor_name" value=""> <input type="hidden" id="ai_flavor_name" name="flavor_name" value="">
<input type="hidden" id="fail_dataset_name" value="{{$.dataset_name}}">
<input type="hidden" id="fail_dataset_uuid" value="{{$.attachment}}">
<h4 class="train-job-title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4> <h4 class="train-job-title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4>
<div class="required min_title inline field"> <div class="required min_title inline field">
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_cluster"}}</label> <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_cluster"}}</label>
@@ -193,46 +191,10 @@
<span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span> <span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span>
<input id="store_run_para" type="hidden" name="run_para_list"> <input id="store_run_para" type="hidden" name="run_para_list">
<div class="dynamic field" style="margin-top: 1rem;" data-params="{{.run_para_list}}"> <div class="dynamic field" style="margin-top: 1rem;" data-params="{{.run_para_list}}">
{{if ne 0 (len .params)}}
{{range $k ,$v := .params}}
<div class="two fields width85" id="para{{$k}}">
<div class="field">
<input type="text" class="shipping_first-name" value={{$v.Label}} required>
</div>
<div class="field">
<input type="text" class="shipping_last-name" value={{$v.Value}} required>
</div>
<span>
<i class="trash icon"></i>
</span>

</div>
{{end}}
{{end}}
</div> </div>
</div> </div>


<!--<div class="required min_title inline field" id="flavor_name">
<label class="label-fix-width" 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}}
{{range .flavor_infos}}
{{if eq $.flavor .ID}}
<option value="{{.ID}}">{{.Name}}</option>
{{end}}
{{end}}
{{range .flavor_infos}}
{{if ne $.flavor .ID}}
<option value="{{.ID}}">{{.Name}}</option>
{{end}}
{{end}}
{{else}}
{{range .flavor_infos}}
<option name="flavor" value="{{.ID}}">{{.Name}}</option>
{{end}}
{{end}}
</select>
</div>-->
<div class="required min_title inline field" id="flavor_name"> <div class="required min_title inline field" id="flavor_name">
<label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label> <label class="label-fix-width" style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label>
<select class="ui dropdown width48" id="__specs__" style='width:385px' name="spec_id" ovalue="{{.spec_id}}"></select> <select class="ui dropdown width48" id="__specs__" style='width:385px' name="spec_id" ovalue="{{.spec_id}}"></select>


+ 7
- 0
web_src/js/components/dataset/selectDataset.vue View File

@@ -21,6 +21,11 @@
v-if="confirmDatasetList && confirmFlag" v-if="confirmDatasetList && confirmFlag"
> >
<input type="hidden" name="attachment" :value="confirmDatasetList" /> <input type="hidden" name="attachment" :value="confirmDatasetList" />
<input
type="hidden"
name="dataset_name"
:value="confirmDatasetNameList"
/>
<div class="multi-dataset-box"> <div class="multi-dataset-box">
<span <span
v-for="(item, index) in confirmChecklist" v-for="(item, index) in confirmChecklist"
@@ -600,6 +605,7 @@ export default {
checkList: [], checkList: [],
confirmChecklist: [], confirmChecklist: [],
confirmDatasetList: "", confirmDatasetList: "",
confirmDatasetNameList: "",
confirmFlag: false, confirmFlag: false,


saveStatusList: [], saveStatusList: [],
@@ -928,6 +934,7 @@ export default {
}, },
confirmDataset() { confirmDataset() {
this.confirmDatasetList = this.saveStatusList.join(";"); this.confirmDatasetList = this.saveStatusList.join(";");
this.confirmDatasetNameList = this.checkList.join(";");
this.confirmChecklist = this.checkList; this.confirmChecklist = this.checkList;
this.dialogVisible = false; this.dialogVisible = false;
this.confirmFlag = true; this.confirmFlag = true;


Loading…
Cancel
Save