Browse Source

update

tags/v1.21.12.1
zhoupzh 4 years ago
parent
commit
15f3c25f27
2 changed files with 31 additions and 8 deletions
  1. +11
    -2
      templates/repo/modelarts/trainjob/new.tmpl
  2. +20
    -6
      templates/repo/modelarts/trainjob/version_new.tmpl

+ 11
- 2
templates/repo/modelarts/trainjob/new.tmpl View File

@@ -153,6 +153,8 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="update">
<input type="hidden" id="ai_engine_name" name="engine_names" value="">
<input type="hidden" id="ai_flaver_name" name="flaver_names" value="">
<h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.basic_info"}}:</h4>
<div class="required unite min_title inline field">
<label>{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label>
@@ -189,7 +191,7 @@
</select>
</div>

<div class="field" style="flex: 2;">
<div class="field" style="flex: 2;" id="engine_name">
<select class="ui dropdown width" id="trainjob_engine_versions" style='width: 100%;' name="engine_id">
{{range .engine_versions}}
<option name="engine_id" value="{{.ID}}">{{.Value}}</option>
@@ -257,7 +259,7 @@
</div>
</div>

<div class="required unite min_title inline field">
<div class="required unite min_title inline field" id="flaver_name">
<label>{{.i18n.Tr "repo.modelarts.train_job.standard"}}</label>
<select class="ui dropdown width81" id="trainjob-flavor" style='width:385px' name="flavor">
{{range .flavor_infos}}
@@ -541,8 +543,15 @@
msg = JSON.stringify(msg)
$('#store_run_para').val(msg)
}
function get_name(){
let name1=$("#engine_name .text").text()
let name2=$("#flaver_name .text").text()
$("input#ai_engine_name").val(name1)
$("input#ai_flaver_name").val(name2)

}
$('.ui.create_train_job.green.button').click(function(e) {
get_name()
send_run_para()
validate()
})

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

@@ -162,7 +162,6 @@
<input type="hidden" style="width: 60%;" name="job_name" id="trainjob_job_name" value="{{.job_name}}">
<input style="width: 60%;" value="{{.job_name}}" tabindex="3" disabled >
</div>
<input type="hidden" name="version_name" value="{{.version_name}}">
<div class="unite min_title inline field">
<label 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="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)"></textarea>
@@ -245,7 +244,24 @@
<label>{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label>
<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">
<div class="dynamic field" style="margin-top: 1rem;"></div>
<div class="dynamic field" style="margin-top: 1rem;">
{{if .params}}
<div class="two fields width85" id="para0">
<div class="field">
<input type="text" name="shipping_first-name" required>
</div>
<div class="field">
<input type="text" name="shipping_last-name" required>
</div>
<span>
<i class="trash icon"></i>
</span>

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


@@ -314,11 +330,8 @@
{{template "base/footer" .}}

<script>
console.log({{.dataset_name}})
console.log({{.params}})
console.log({{.flavor_name}})
console.log({{.flavor_code}})
let url_href = window.location.pathname.split('create')[0]
let url_href = {{.RepoLink}}+'/modelarts/train-job'
let url_post = window.location.pathname.split('?version_name=V0001')[0]
$(".ui.button").attr('href',url_href)
$(".ui.form").attr('action',url_post)
@@ -554,6 +567,7 @@
}
document.onreadystatechange = function() {
if (document.readyState === "complete") {
console.log("-----------")
document.getElementById("mask").style.display = "none"
}
}


Loading…
Cancel
Save