Browse Source

Merge pull request '更改默认分支训练任务自动选择默认分支和编辑项目描述最大值限制' (#979) from liuzx_trainjob into V20211115

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/979
Reviewed-by: liuzx <liuzx@pcl.ac.cn>
pull/983/head
liuzx 3 years ago
parent
commit
6d7a34ece2
2 changed files with 12 additions and 1 deletions
  1. +3
    -0
      templates/repo/modelarts/trainjob/new.tmpl
  2. +9
    -1
      web_src/js/components/EditAboutInfo.vue

+ 3
- 0
templates/repo/modelarts/trainjob/new.tmpl View File

@@ -183,8 +183,11 @@
{{end}} {{end}}
{{end}} {{end}}
{{else}} {{else}}
<option name="branch_name" value="{{.BranchName}}">{{.BranchName}}</option>
{{range $k, $v :=.Branches}} {{range $k, $v :=.Branches}}
{{ if ne $v $.BranchName }}
<option name="branch_name" value="{{$v}}">{{$v}}</option> <option name="branch_name" value="{{$v}}">{{$v}}</option>
{{end}}
{{end}} {{end}}
{{end}} {{end}}


+ 9
- 1
web_src/js/components/EditAboutInfo.vue View File

@@ -20,7 +20,7 @@
<div slot="content"> <div slot="content">
<el-form label-position="top" :model="info" :rules="rule" ref="ruleForm"> <el-form label-position="top" :model="info" :rules="rule" ref="ruleForm">
<el-form-item label="简介" prop="desc"> <el-form-item label="简介" prop="desc">
<el-input v-model="info.desc" type="textarea" placeholder="请输入内容" :autosize="{minRows:4,maxRows:6}" maxlength="254" show-word-limit></el-input>
<el-input v-model="info.desc" type="textarea" placeholder="请输入内容" :autosize="{minRows:4,maxRows:6}" maxlength="255" show-word-limit></el-input>
</el-form-item> </el-form-item>
<el-form-item label="主页" prop="index_web" > <el-form-item label="主页" prop="index_web" >
<el-input v-model="info.index_web" placeholder="主页(eg: https://git.openi.org.cn)"></el-input> <el-input v-model="info.index_web" placeholder="主页(eg: https://git.openi.org.cn)"></el-input>
@@ -123,6 +123,14 @@ export default {
this.getDesc(); this.getDesc();
this.getWeb(); this.getWeb();
}, },
watch:{
'info.desc'(val){
if(val.length===256){
this.info.desc = val.substr(0,255)
}

}
}
created() { created() {
} }


Loading…
Cancel
Save