Browse Source

fix issue

tags/v1.22.1.2
zhoupzh 3 years ago
parent
commit
8ac5c1907a
4 changed files with 24 additions and 3 deletions
  1. +1
    -0
      options/locale/locale_en-US.ini
  2. +1
    -0
      options/locale/locale_zh-CN.ini
  3. +20
    -1
      templates/repo/modelarts/inferencejob/index.tmpl
  4. +2
    -2
      templates/repo/settings/options.tmpl

+ 1
- 0
options/locale/locale_en-US.ini View File

@@ -936,6 +936,7 @@ modelarts.infer_job_model_file = Model File
modelarts.infer_job = Inference Job
modelarts.infer_job.model_version = Model/Version
modelarts.infer_job.select_model = Select Model
modelarts.infer_job.tooltip = The model has been deleted and cannot be viewed.

model.manage.import_new_model=Import New Model
model.manage.create_error=Equal Name and Version has existed.


+ 1
- 0
options/locale/locale_zh-CN.ini View File

@@ -948,6 +948,7 @@ modelarts.infer_job = 推理任务
modelarts.infer_job.model_version = 模型/版本
modelarts.infer_job.select_model = 选择模型
modelarts.infer_job.boot_file_helper=启动文件是您程序执行的入口文件,必须是以.py结尾的文件。比如inference.py、main.py、example/inference.py、case/main.py。
modelarts.infer_job.tooltip = 该模型已删除,无法查看。

model.manage.import_new_model=导入新模型
model.manage.create_error=相同的名称和版本的模型已经存在。


+ 20
- 1
templates/repo/modelarts/inferencejob/index.tmpl View File

@@ -110,8 +110,9 @@
</a>
</div>
<!-- 模型版本 -->
<!-- href="{{$.RepoLink}}/modelmanage/show_model_info?name={{.ModelName}}" -->
<div class="three wide column text center padding0">
<a href="{{$.RepoLink}}/modelmanage/show_model_info?name={{.ModelName}}">{{.ModelName}}&nbsp;</a>&nbsp;<span style="font-size: 12px;">{{.ModelVersion}} </span>
<a id="{{.JobName}}" href="javascript:void(0);" data-variation="inverted" data-position="top center" data-content="{{$.i18n.Tr "repo.modelarts.infer_job.tooltip"}}" onclick="getModelInfo({{.ModelName}},{{.ModelVersion}},{{.JobName}})">{{.ModelName}}&nbsp;</a>&nbsp;<span style="font-size: 12px;">{{.ModelVersion}} </span>
</div>
<!-- 任务状态 -->
<div class="two wide column text center padding0" >
@@ -252,6 +253,24 @@ function loadJobStatus() {
});
});
};
function getModelInfo(ID,version,JobName){
$.get("{{$.RepoLink}}/modelmanage/show_model_info_api?name="+ID,(data)=>{
if(data.length===0){
$(`#${JobName}`).popup('toggle')
}else{
let versionData = data.filter((item)=>{
return item.Version === version
})
if(versionData.length==0){
$(`#${JobName}`).popup('toggle')
}
else{
location.href = "{{$.RepoLink}}/modelmanage/show_model_info?name="+ID
}
}
})

}
function deleteVersion(version_name,jobID){
const url = '/api/v1/repos/{{$.RepoRelPath}}/modelarts/inference-job/'+jobID+'/del_version'
$.post(url,{version_name:version_name},(data)=>{


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

@@ -152,7 +152,7 @@
{{$isModelMangeEnabled := .Repository.UnitEnabled $.UnitTypeModelManage }}
<div class="inline field">
<label>{{.i18n.Tr "repo.model_manager"}}</label>
<div class="ui checkbox {{if eq $.MODEL_COUNT 0}}disabled{{end}}">
<div class="ui checkbox {{if ne $.MODEL_COUNT 0}}disabled{{end}}">
<input class="enable-system" name="enable_model_manager" type="checkbox" {{if $isModelMangeEnabled}}checked{{end}}>
<label>{{.i18n.Tr "repo.settings.model_desc"}}</label>
</div>
@@ -160,7 +160,7 @@
{{$isCloudBrainEnabled := .Repository.UnitEnabled $.UnitTypeCloudBrain }}
<div class="inline field">
<label>{{.i18n.Tr "repo.cloudbrain"}}</label>
<div class="ui checkbox">
<div class="ui checkbox {{if ne $.jobCount 0}}disabled{{end}}">
<input class="enable-system" name="enable_cloud_brain" type="checkbox" {{if $isCloudBrainEnabled}}checked{{end}}>
<label>{{.i18n.Tr "repo.settings.cloudbrain_desc"}}</label>
</div>


Loading…
Cancel
Save