Browse Source

fix issue

tags/v1.22.4.1^2
zhoupzh 3 years ago
parent
commit
c0dbb569c5
6 changed files with 15 additions and 23 deletions
  1. +1
    -1
      templates/custom/select_dataset_train.tmpl
  2. +2
    -2
      templates/repo/cloudbrain/trainjob/new.tmpl
  3. +7
    -5
      templates/repo/modelarts/inferencejob/new.tmpl
  4. +2
    -2
      templates/repo/modelarts/trainjob/new.tmpl
  5. +1
    -1
      web_src/js/components/images/selectImages.vue
  6. +2
    -12
      web_src/js/features/images.js

+ 1
- 1
templates/custom/select_dataset_train.tmpl View File

@@ -3,7 +3,7 @@
<div class="inline required unite min_title field" id="dataset-base" style="margin-bottom: 0 !important;">
<label style="font-weight: normal;">{{.i18n.Tr "dataset.dataset"}}</label>&nbsp;&nbsp;&nbsp;
<input type="hidden" name="attachment" :value="dataset_uuid">
<input class="disabled" type="text" :value="dataset_name" required onfocus="this.blur();" style="width: 35.5%;">
<input class="disabled" type="text" :value="dataset_name" required onfocus="this.blur();" style="width: 48.5%;">
<el-button type="text" @click="dialogVisible = true" icon="el-icon-plus" style="color: #0366d6;"> {{.i18n.Tr "dataset.select_dataset"}}</el-button>
<el-dialog
title="{{.i18n.Tr "dataset.select_dataset"}}"


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

@@ -173,9 +173,9 @@
<div class="inline unite min_title field required">
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label>
{{if .bootFile}}
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="255" >
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="255" >
{{else}}
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
{{end}}
<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>


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

@@ -26,7 +26,9 @@
width: 35.5% !important;
}


.width48{
width: 48.5% !important;
}
.nowrapx {
white-space: nowrap !important;
}
@@ -150,7 +152,7 @@
<!-- 代码分支 -->
<div class="required unite min_title inline field">
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label>&nbsp;
<select class="ui dropdown width35" id="code_version" name="branch_name">
<select class="ui dropdown width48" id="code_version" name="branch_name">
{{if .branch_name}}
<option name="branch_name" value="{{.branch_name}}">{{.branch_name}}</option>
{{range $k, $v :=.Branches}}
@@ -172,11 +174,11 @@
{{template "custom/select_dataset_train" .}}
<span class="tooltips" style="margin-left: 11.5rem;margin-bottom: 2rem;">{{.i18n.Tr "cloudbrain.dataset_path_rule"}}</span>
<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>&nbsp;
{{if .bootFile}}
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="255" >
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="255" >
{{else}}
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
{{end}}
<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>


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

@@ -158,9 +158,9 @@
<div class="inline unite min_title field required">
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.start_file"}}</label>
{{if .bootFile}}
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="255" >
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="{{.bootFile}}" tabindex="3" autofocus required maxlength="255" >
{{else}}
<input style="width: 35.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
<input style="width: 48.5%;" name="boot_file" id="trainjob_boot_file" value="" tabindex="3" autofocus required maxlength="255" >
{{end}}
<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>


+ 1
- 1
web_src/js/components/images/selectImages.vue View File

@@ -4,7 +4,7 @@
<label v-if="benchmarkNew" style="font-weight: normal;">镜像</label>
<label v-else>镜像</label>
<span v-if="benchmarkNew">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input v-if="benchmarkNew" type="text" name="image" :value="imageAddress" style="width: 45%;" placeholder="选择镜像或输入镜像地址">
<input v-if="benchmarkNew" type="text" name="image" :value="imageAddress" style="width: 48.5%;" placeholder="选择镜像或输入镜像地址">
<input v-else type="text" name="image" :value="imageAddress" placeholder="选择镜像或输入镜像地址">
<el-button type="text" @click="dialogVisible = true" icon="el-icon-plus">选择镜像</el-button>
<el-dialog


+ 2
- 12
web_src/js/features/images.js View File

@@ -77,22 +77,12 @@ export default async function initImage(){
success:function(res){
console.log("res",res)
if(res.Code===1){
$('.alert').html(res.Message).removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut();
$('.ui.positive.message').text(res.Message).show().delay(1500).fadeOut();
}else if(res.Code==0){
if(link.indexOf('commit_image')===1){
$('.ui.positive.message').text('保存镜像成功').show().delay(1500).fadeOut();
}else{
$('body')
.toast({
class: 'success',
message: 'Did you notice any difference ?',
transition: {
showMethod : 'zoom',
showDuration : 10000,
hideMethod : 'fade',
hideDuration : 10000
}
})
$('.ui.positive.message').text('提交镜像成功').show().delay(1500).fadeOut();
}
if(location.href.indexOf('imageAdmin')!==-1){


Loading…
Cancel
Save