Browse Source

fix issue

tags/v1.22.1.2
zhoupzh 3 years ago
parent
commit
a347d88129
17 changed files with 56 additions and 128 deletions
  1. +8
    -8
      templates/repo/cloudbrain/new.tmpl
  2. +1
    -1
      templates/repo/create.tmpl
  3. +1
    -1
      templates/repo/datasets/index.tmpl
  4. +2
    -2
      templates/repo/debugjob/index.tmpl
  5. +1
    -1
      templates/repo/issue/new_form.tmpl
  6. +1
    -1
      templates/repo/issue/view_title.tmpl
  7. +1
    -1
      templates/repo/migrate.tmpl
  8. +15
    -12
      templates/repo/modelarts/inferencejob/new.tmpl
  9. +1
    -25
      templates/repo/modelarts/inferencejob/show.tmpl
  10. +5
    -5
      templates/repo/modelarts/notebook/new.tmpl
  11. +4
    -4
      templates/repo/modelarts/trainjob/edit_para.tmpl
  12. +7
    -58
      templates/repo/modelarts/trainjob/new.tmpl
  13. +4
    -4
      templates/repo/modelarts/trainjob/version_new.tmpl
  14. +1
    -1
      templates/repo/pulls/fork.tmpl
  15. +2
    -2
      templates/repo/release/new.tmpl
  16. +1
    -1
      templates/repo/settings/options.tmpl
  17. +1
    -1
      templates/user/settings/profile.tmpl

+ 8
- 8
templates/repo/cloudbrain/new.tmpl View File

@@ -147,7 +147,7 @@
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label>任务名称</label> <label>任务名称</label>
<input name="job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.job_name}}" tabindex="3" autofocus required maxlength="254">
<input name="job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.job_name}}" tabindex="3" autofocus required maxlength="255" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
</div> </div>


<div class="inline required field" style="{{if ((.is_benchmark_enabled) or (.is_snn4imagenet_enabled) or (.is_brainscore_enabled))}}display:block;{{else}}display:none;{{end}}"> <div class="inline required field" style="{{if ((.is_benchmark_enabled) or (.is_snn4imagenet_enabled) or (.is_brainscore_enabled))}}display:block;{{else}}display:none;{{end}}">
@@ -192,7 +192,7 @@


<div class="inline required field" style="position: relative;"> <div class="inline required field" style="position: relative;">
<label>镜像</label> <label>镜像</label>
<input type="text" list="cloudbrain_image" placeholder="选择镜像" name="image" required autofocus maxlength="254">
<input type="text" list="cloudbrain_image" placeholder="选择镜像" name="image" required autofocus maxlength="255">
<i class="times circle outline icon icons" style="visibility: hidden;" onclick="clearValue()"></i> <i class="times circle outline icon icons" style="visibility: hidden;" onclick="clearValue()"></i>
<datalist class="ui search" id="cloudbrain_image" style='width:385px;' name="image"> <datalist class="ui search" id="cloudbrain_image" style='width:385px;' name="image">
{{range .images}} {{range .images}}
@@ -225,27 +225,27 @@


<div class="inline required field"> <div class="inline required field">
<label>数据集存放路径</label> <label>数据集存放路径</label>
<input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3" disabled autofocus required maxlength="254" readonly="readonly">
<input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label>模型存放路径</label> <label>模型存放路径</label>
<input name="model_path" id="cloudbrain_model_path" value="{{.model_path}}" tabindex="3" disabled autofocus required maxlength="254" readonly="readonly">
<input name="model_path" id="cloudbrain_model_path" value="{{.model_path}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label>代码存放路径</label> <label>代码存放路径</label>
<input name="code_path" id="cloudbrain_code_path" value="{{.code_path}}" tabindex="3" disabled autofocus required maxlength="254" readonly="readonly">
<input name="code_path" id="cloudbrain_code_path" value="{{.code_path}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div> </div>
<div class="inline required field cloudbrain_benchmark"> <div class="inline required field cloudbrain_benchmark">
<label>benchmark脚本存放路径</label> <label>benchmark脚本存放路径</label>
<input name="benchmark_path" id="cloudbrain_benchmark_path" value="{{.benchmark_path}}" tabindex="3" disabled autofocus required maxlength="254" readonly="readonly">
<input name="benchmark_path" id="cloudbrain_benchmark_path" value="{{.benchmark_path}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div> </div>
<div class="inline required field cloudbrain_snn4imagenet"> <div class="inline required field cloudbrain_snn4imagenet">
<label>snn4imagenet脚本存放路径</label> <label>snn4imagenet脚本存放路径</label>
<input name="snn4imagenet_path" id="cloudbrain_snn4imagenet_path" value="{{.snn4imagenet_path}}" tabindex="3" disabled autofocus required maxlength="254" readonly="readonly">
<input name="snn4imagenet_path" id="cloudbrain_snn4imagenet_path" value="{{.snn4imagenet_path}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div> </div>
<div class="inline required field cloudbrain_brainscore"> <div class="inline required field cloudbrain_brainscore">
<label>brainscore脚本存放路径</label> <label>brainscore脚本存放路径</label>
<input name="brainscore_path" id="cloudbrain_brainscore_path" value="{{.brainscore_path}}" tabindex="3" disabled autofocus required maxlength="254" readonly="readonly">
<input name="brainscore_path" id="cloudbrain_brainscore_path" value="{{.brainscore_path}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div> </div>
<div class="inline required field" hidden> <div class="inline required field" hidden>
<label>启动命令</label> <label>启动命令</label>


+ 1
- 1
templates/repo/create.tmpl View File

@@ -54,7 +54,7 @@
</div> </div>
<div class="inline field {{if .Err_Description}}error{{end}}"> <div class="inline field {{if .Err_Description}}error{{end}}">
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label> <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="254">{{.description}}</textarea>
<textarea id="description" name="description" maxlength="255">{{.description}}</textarea>
</div> </div>
<div class="inline field"> <div class="inline field">
<label>{{.i18n.Tr "repo.template"}}</label> <label>{{.i18n.Tr "repo.template"}}</label>


+ 1
- 1
templates/repo/datasets/index.tmpl View File

@@ -57,7 +57,7 @@
<div class="ui grid form segment success {{if not .Error}}hide{{end}}" id="dataset-content-edit"> <div class="ui grid form segment success {{if not .Error}}hide{{end}}" id="dataset-content-edit">
<label class="d-block">{{.i18n.Tr "dataset.title"}}</label> <label class="d-block">{{.i18n.Tr "dataset.title"}}</label>
<div class="sixteen wide column"> <div class="sixteen wide column">
<input name="title" placeholder='{{.i18n.Tr "dataset.title"}}' value="{{.dataset.Title}}" autofocus required maxlength="254">
<input name="title" placeholder='{{.i18n.Tr "dataset.title"}}' value="{{.dataset.Title}}" autofocus required maxlength="255">
</div> </div>
<label class="d-block">{{.i18n.Tr "dataset.description"}}</label> <label class="d-block">{{.i18n.Tr "dataset.description"}}</label>
<div class="sixteen wide column"> <div class="sixteen wide column">


+ 2
- 2
templates/repo/debugjob/index.tmpl View File

@@ -431,12 +431,12 @@
<div class="inline required field dis"> <div class="inline required field dis">
<label>镜像标签:</label> <label>镜像标签:</label>
<input name="tag" id="image_tag" tabindex="3" autofocus required maxlength="254" style="width:75%">
<input name="tag" id="image_tag" tabindex="3" autofocus required maxlength="255" style="width:75%">
</div> </div>
<div class="inline field"> <div class="inline field">
<label class="label_after">镜像描述:</label> <label class="label_after">镜像描述:</label>
<textarea name="description" maxlength="254" rows="8" style="width:75%;margin-left: 0.2em;"></textarea>
<textarea name="description" maxlength="255" rows="8" style="width:75%;margin-left: 0.2em;"></textarea>
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>
<div class="inline field"> <div class="inline field">


+ 1
- 1
templates/repo/issue/new_form.tmpl View File

@@ -15,7 +15,7 @@
<div class="ui segment content"> <div class="ui segment content">
<div class="field"> <div class="field">
<!-- --> <!-- -->
<input name="title" id="issue_title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" tabindex="3" autofocus required maxlength="254">
<input name="title" id="issue_title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" tabindex="3" autofocus required maxlength="255">
{{if .PageIsComparePull}} {{if .PageIsComparePull}}
<div class="title_wip_desc">{{.i18n.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}}</div> <div class="title_wip_desc">{{.i18n.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}}</div>
{{end}} {{end}}


+ 1
- 1
templates/repo/issue/view_title.tmpl View File

@@ -3,7 +3,7 @@
<h1 class="twelve wide column"> <h1 class="twelve wide column">
<span class="index">#{{.Issue.Index}}</span> <span id="issue-title">{{RenderEmoji .Issue.Title}}</span> <span class="index">#{{.Issue.Index}}</span> <span id="issue-title">{{RenderEmoji .Issue.Title}}</span>
<div id="edit-title-input" class="ui input" style="display: none"> <div id="edit-title-input" class="ui input" style="display: none">
<input value="{{.Issue.Title}}" maxlength="254">
<input value="{{.Issue.Title}}" maxlength="255">
</div> </div>
</h1> </h1>
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}} {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}


+ 1
- 1
templates/repo/migrate.tmpl View File

@@ -122,7 +122,7 @@
</div> </div>
<div class="inline field {{if .Err_Description}}error{{end}}"> <div class="inline field {{if .Err_Description}}error{{end}}">
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label> <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="254">{{.description}}</textarea>
<textarea id="description" name="description" maxlength="255">{{.description}}</textarea>
</div> </div>


<div class="inline field"> <div class="inline field">


+ 15
- 12
templates/repo/modelarts/inferencejob/new.tmpl View File

@@ -59,8 +59,8 @@
<h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4> <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4>
<div class="required unite min_title inline field"> <div class="required unite min_title inline field">
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label>
<input style="width: 60%;" name="job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.job_name}}" tabindex="3" autofocus required maxlength="36">
<span class="tooltips" style="display: block;">请输入只包含大小写字母、数字、_和-,最长36个字符。</span>
<input style="width: 60%;" name="job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.job_name}}" onkeyup="this.value=this.value.replace(/[, ]/g,'')" tabindex="3" autofocus required maxlength="64">
<span class="tooltips" style="display: block;">请输入字母、数字、_和-,最长64个字符,且不能以中划线(-)结尾。</span>
</div> </div>
<div class="unite min_title inline field"> <div class="unite min_title inline field">
@@ -74,7 +74,7 @@
<div class="required unite inline min_title fields" style="width: 91.8%;"> <div class="required unite inline min_title fields" style="width: 91.8%;">
<div class="required eight wide field"> <div class="required eight wide field">
<label style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}</label>&nbsp;&nbsp; <label style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}</label>&nbsp;&nbsp;
<div class="ui fluid search selection dropdown {{if ne 0 $.MODEL_COUNT}} loading {{end}}" id="select_model">
<div class="ui fluid search selection dropdown loading " id="select_model">
{{if $.ckpt_name}} {{if $.ckpt_name}}
<input type="hidden" name="model_name" value="{{$.model_name}}" required> <input type="hidden" name="model_name" value="{{$.model_name}}" required>
<div class="text">{{$.model_name}}</div> <div class="text">{{$.model_name}}</div>
@@ -180,9 +180,9 @@
<div class="inline unite min_title field required"> <div class="inline unite min_title field required">
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label>&nbsp; <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label>&nbsp;
{{if .bootFile}} {{if .bootFile}}
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="254" >
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="255" >
{{else}} {{else}}
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="254" >
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
{{end}} {{end}}
<span > <span >
<i class="question circle icon" data-content={{.i18n.Tr "repo.modelarts.infer_job.boot_file_helper"}} data-position="top center" data-variation="inverted mini"></i> <i class="question circle icon" data-content={{.i18n.Tr "repo.modelarts.infer_job.boot_file_helper"}} data-position="top center" data-variation="inverted mini"></i>
@@ -237,7 +237,7 @@
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label> <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label>
<div class="ui labeled input" style="width: 5%;"> <div class="ui labeled input" style="width: 5%;">
<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="254" value="1" readonly>
<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="1" readonly>
</div> </div>
<span class="tooltips" style="display: block;">推理输出路径存储在环境变量result_url中。</span> <span class="tooltips" style="display: block;">推理输出路径存储在环境变量result_url中。</span>
</div> </div>
@@ -268,12 +268,15 @@
nameList.forEach(element => { nameList.forEach(element => {
html += `<div class="item" data-value=${element}>${element}</div>` html += `<div class="item" data-value=${element}>${element}</div>`
}); });
const initModelVersion = nameMap[nameList[0]][0]
const initTrainTaskInfo = JSON.parse(initModelVersion.TrainTaskInfo)
$('#model_name').append(html)
if(nameList.length!==0){
const initModelVersion = nameMap[nameList[0]][0]
const initTrainTaskInfo = JSON.parse(initModelVersion.TrainTaskInfo)
$('#model_name').append(html)
$("#select_model").dropdown('set text',nameList[0])
$("#select_model").dropdown('set value',nameList[0],nameList[0])
}
$('#select_model').removeClass("loading") $('#select_model').removeClass("loading")
$("#select_model").dropdown('set text',nameList[0])
$("#select_model").dropdown('set value',nameList[0],nameList[0])
}) })
// 根据选中的模型名称获取相应的模型版本 // 根据选中的模型名称获取相应的模型版本
$(function(){ $(function(){
@@ -406,7 +409,7 @@
identifier : 'job_name', identifier : 'job_name',
rules: [ rules: [
{ {
type: 'regExp[/^[a-zA-Z0-9-_]{1,36}$/]',
type: 'regExp[/^[a-zA-Z0-9-_]{1,64}[^-]$/]',
} }
] ]
}, },


+ 1
- 25
templates/repo/modelarts/inferencejob/show.tmpl View File

@@ -292,17 +292,6 @@ td, th {
</div> </div>
</td> </td>
</tr> </tr>
<!-- <tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.modelarts.train_job.standard"}}
</td>
<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{.FlavorName}}
</div>
</td>
</tr>
<tr class="ti-no-ng-animate"> <tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80"> <td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.modelarts.train_job.compute_node"}} {{$.i18n.Tr "repo.modelarts.train_job.compute_node"}}
@@ -312,7 +301,7 @@ td, th {
{{.WorkServerNumber}} {{.WorkServerNumber}}
</div> </div>
</td> </td>
</tr> -->
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
@@ -410,18 +399,6 @@ td, th {
</div> </div>
</td> </td>
</tr> </tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.modelarts.train_job.compute_node"}}
</td>
<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{.WorkServerNumber}}
</div>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
@@ -489,7 +466,6 @@ td, th {
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}
<script> <script>
console.log({{.task}})
$(document).ready(function(){ $(document).ready(function(){
$('.secondary.menu .item').tab(); $('.secondary.menu .item').tab();
}); });


+ 5
- 5
templates/repo/modelarts/notebook/new.tmpl View File

@@ -48,7 +48,7 @@
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label>任务名称</label> <label>任务名称</label>
<input name="job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.job_name}}" tabindex="3" autofocus required maxlength="254">
<input name="job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.job_name}}" tabindex="3" autofocus required maxlength="255" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
</div> </div>


<div class="inline field"> <div class="inline field">
@@ -64,11 +64,11 @@


<div class="inline required field"> <div class="inline required field">
<label>工作环境</label> <label>工作环境</label>
<input name="de" id="cloudbrain_de" value="{{.env}}" tabindex="3" disabled autofocus required maxlength="254" readonly="readonly">
<input name="de" id="cloudbrain_de" value="{{.env}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label>类型</label> <label>类型</label>
<input name="job_type" id="cloudbrain_job_type" value="{{.notebook_type}}" tabindex="3" disabled autofocus required maxlength="254" readonly="readonly">
<input name="job_type" id="cloudbrain_job_type" value="{{.notebook_type}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label>规格</label> <label>规格</label>
@@ -81,11 +81,11 @@
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label>数据集存放路径</label> <label>数据集存放路径</label>
<input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3" disabled autofocus required maxlength="254" readonly="readonly">
<input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div> </div>
<div class="inline field"> <div class="inline field">
<label>描述</label> <label>描述</label>
<input name="description" id="cloudbrain_description" tabindex="3" autofocus maxlength="254">
<input name="description" id="cloudbrain_description" tabindex="3" autofocus maxlength="255">
</div> </div>
<div class="inline field"> <div class="inline field">
<label></label> <label></label>


+ 4
- 4
templates/repo/modelarts/trainjob/edit_para.tmpl View File

@@ -18,11 +18,11 @@
<h4 class="ui dividing header">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}</h4> <h4 class="ui dividing header">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}</h4>
<div class="required field"> <div class="required field">
<label>{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> <label>{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label>
<input name="job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.job_name}}" tabindex="3" autofocus required maxlength="254" readonly="">
<input name="job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.job_name}}" tabindex="3" autofocus required maxlength="255" readonly="">
</div> </div>
<div class="field"> <div class="field">
<label for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label> <label for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label>
<textarea id="description" maxlength="254" name="description" rows="2"></textarea>
<textarea id="description" maxlength="255" name="description" rows="2"></textarea>
</div> </div>
<h4 class="ui dividing header">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}</h4> <h4 class="ui dividing header">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}</h4>
<div class="required field"> <div class="required field">
@@ -52,7 +52,7 @@
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label>{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label> <label>{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label>
<input name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="254">
<input name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255">
<span> <span>
<i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i>
</span> </span>
@@ -128,7 +128,7 @@
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label>{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label> <label>{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label>
<input name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="254">
<input name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255">
</div> </div>
<div class="inline field"> <div class="inline field">
<button class="ui green button"> <button class="ui green button">


+ 7
- 58
templates/repo/modelarts/trainjob/new.tmpl View File

@@ -80,12 +80,13 @@
<h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4> <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4>
<div class="required unite min_title inline field"> <div class="required unite min_title inline field">
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label>
<input style="width: 60%;" name="job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.job_name}}" tabindex="3" autofocus required maxlength="254">
<input style="width: 60%;" name="job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.job_name}}" tabindex="3" onkeyup="this.value=this.value.replace(/[, ]/g,'')" autofocus required maxlength="64">
<span class="tooltips" style="display: block;">请输入字母、数字、_和-,最长64个字符,且不能以中划线(-)结尾。</span>
</div> </div>
<div class="unite min_title inline field"> <div class="unite min_title inline field">
<label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}&nbsp;&nbsp;</label> <label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}&nbsp;&nbsp;</label>
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="254" 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)" onkeyup="this.value=this.value.substring(0, 255)"></textarea>
<textarea style="width: 80%;" 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)" onkeyup="this.value=this.value.substring(0, 255)"></textarea>
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>


@@ -140,9 +141,9 @@
<div class="inline unite min_title field required"> <div class="inline unite min_title field required">
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label> <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label>
{{if .bootFile}} {{if .bootFile}}
<input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="254" >
<input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="255" >
{{else}} {{else}}
<input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="254" >
<input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
{{end}} {{end}}
<span> <span>
<i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i>
@@ -226,7 +227,7 @@
<div class="ui labeled input" style="width: 5%;"> <div class="ui labeled input" style="width: 5%;">


<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="254" value="1" readonly>
<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="1" readonly>


</div> </div>
@@ -379,65 +380,16 @@
$('select.dropdown') $('select.dropdown')
.dropdown(); .dropdown();


$('.ui.form')
.form({
on: 'blur',
inline:true,
fields: {
boot_file: {
identifier : 'boot_file',
rules: [
{
type: 'regExp[/.+\.py$/g]',
prompt : '启动文件必须为.py结尾'
}
]
},
job_name:{
identifier : 'job_name',
rules: [
{
type: 'regExp[/^[a-zA-Z0-9-_]{1,36}$/]',
prompt : '只包含大小写字母、数字、_和-,最长36个字符。'
}
]
},
attachment:{
identifier : 'attachment',
rules: [
{
type: 'empty',
prompt : '选择一个数据集'
}
]

},
work_server_number: {
identifier : 'work_server_number',
rules: [
{
type : 'integer[1..25]',
prompt : '计算节点需要在1-25之间,请您键入正确的值'
}
]
}
},
})



function validate(){ function validate(){
$('.ui.form') $('.ui.form')
.form({ .form({
on: 'blur', on: 'blur',
inline:true,
fields: { fields: {
boot_file: { boot_file: {
identifier : 'boot_file', identifier : 'boot_file',
rules: [ rules: [
{ {
type: 'regExp[/.+\.py$/g]', type: 'regExp[/.+\.py$/g]',
prompt : '启动文件必须为.py结尾'
} }
] ]
}, },
@@ -445,8 +397,7 @@
identifier : 'job_name', identifier : 'job_name',
rules: [ rules: [
{ {
type: 'regExp[/^[a-zA-Z0-9-_]{1,36}$/]',
prompt : '只包含大小写字母、数字、_和-,最长36个字符。'
type: 'regExp[/^[a-zA-Z0-9-_]{1,64}[^-]$/]',
} }
] ]
}, },
@@ -455,7 +406,6 @@
rules: [ rules: [
{ {
type: 'empty', type: 'empty',
prompt : '选择一个数据集'
} }
] ]


@@ -465,7 +415,6 @@
rules: [ rules: [
{ {
type : 'integer[1..25]', type : 'integer[1..25]',
prompt : '计算节点需要在1-25之间,请您键入正确的值'
} }
] ]
} }


+ 4
- 4
templates/repo/modelarts/trainjob/version_new.tmpl View File

@@ -99,7 +99,7 @@
<div class="unite min_title inline field"> <div class="unite min_title inline field">
<label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}&nbsp;&nbsp;</label> <label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}&nbsp;&nbsp;</label>
<textarea style="width: 80%;" id="description" value="{{.description}}" name="description" rows="3" maxlength="254" 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)" onkeyup="this.value=this.value.substring(0, 256)">{{.description}}</textarea>
<textarea style="width: 80%;" id="description" value="{{.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)" onkeyup="this.value=this.value.substring(0, 256)">{{.description}}</textarea>
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>


@@ -152,9 +152,9 @@
<div class="inline unite min_title field required"> <div class="inline unite min_title field required">
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label> <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label>
{{if .boot_file}} {{if .boot_file}}
<input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="{{.boot_file}}" tabindex="3" autofocus required maxlength="254" >
<input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="{{.boot_file}}" tabindex="3" autofocus required maxlength="255" >
{{else}} {{else}}
<input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="254" >
<input style="width: 33.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
{{end}} {{end}}
<span> <span>
<i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i>
@@ -245,7 +245,7 @@
<div class="ui labeled input" style="width: 5%;"> <div class="ui labeled input" style="width: 5%;">


<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="254" value="{{.work_server_number}}" readonly>
<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="{{.work_server_number}}" readonly>


</div> </div>


+ 1
- 1
templates/repo/pulls/fork.tmpl View File

@@ -53,7 +53,7 @@
</div> </div>
<div class="inline field {{if .Err_Description}}error{{end}}"> <div class="inline field {{if .Err_Description}}error{{end}}">
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label> <label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" maxlength="254">{{.description}}</textarea>
<textarea id="description" name="description" maxlength="255">{{.description}}</textarea>
</div> </div>


<div class="inline field"> <div class="inline field">


+ 2
- 2
templates/repo/release/new.tmpl View File

@@ -19,7 +19,7 @@
{{if .PageIsEditRelease}} {{if .PageIsEditRelease}}
<b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong> <b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
{{else}} {{else}}
<input id="tag-name" name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required maxlength="254">
<input id="tag-name" name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required maxlength="255">
<span class="at">@</span> <span class="at">@</span>
<div class="ui selection dropdown"> <div class="ui selection dropdown">
<input type="hidden" name="tag_target" value="{{.tag_target}}"/> <input type="hidden" name="tag_target" value="{{.tag_target}}"/>
@@ -42,7 +42,7 @@
<div class="eleven wide column"> <div class="eleven wide column">
<div class="field {{if .Err_Title}}error{{end}}"> <div class="field {{if .Err_Title}}error{{end}}">
<label>{{.i18n.Tr "repo.release.title"}}</label> <label>{{.i18n.Tr "repo.release.title"}}</label>
<input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required maxlength="254">
<input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required maxlength="255">
</div> </div>
<div class="field"> <div class="field">
<label>{{.i18n.Tr "repo.release.content"}}</label> <label>{{.i18n.Tr "repo.release.content"}}</label>


+ 1
- 1
templates/repo/settings/options.tmpl View File

@@ -41,7 +41,7 @@
{{end}} {{end}}
<div class="field {{if .Err_Description}}error{{end}}"> <div class="field {{if .Err_Description}}error{{end}}">
<label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label> <label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description" rows="2" maxlength="254">{{.Repository.Description}}</textarea>
<textarea id="description" name="description" rows="2" maxlength="255">{{.Repository.Description}}</textarea>
</div> </div>
<div class="field {{if .Err_Website}}error{{end}}"> <div class="field {{if .Err_Website}}error{{end}}">
<label for="website">{{.i18n.Tr "repo.settings.site"}}</label> <label for="website">{{.i18n.Tr "repo.settings.site"}}</label>


+ 1
- 1
templates/user/settings/profile.tmpl View File

@@ -34,7 +34,7 @@
</div> </div>
<div class="field {{if .Err_Description}}error{{end}}"> <div class="field {{if .Err_Description}}error{{end}}">
<label for="description">{{$.i18n.Tr "user.user_bio"}}</label> <label for="description">{{$.i18n.Tr "user.user_bio"}}</label>
<textarea id="description" name="description" rows="2" maxlength="254">{{.SignedUser.Description}}</textarea>
<textarea id="description" name="description" rows="2" maxlength="255">{{.SignedUser.Description}}</textarea>
</div> </div>
<div class="field {{if .Err_Website}}error{{end}}"> <div class="field {{if .Err_Website}}error{{end}}">
<label for="website">{{.i18n.Tr "settings.website"}}</label> <label for="website">{{.i18n.Tr "settings.website"}}</label>


Loading…
Cancel
Save