diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 048b8ad65..26fb35ed5 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -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. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 3a7e2202d..874e4446b 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -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=相同的名称和版本的模型已经存在。 diff --git a/templates/repo/modelarts/inferencejob/index.tmpl b/templates/repo/modelarts/inferencejob/index.tmpl index c310f5627..4dfb2a288 100644 --- a/templates/repo/modelarts/inferencejob/index.tmpl +++ b/templates/repo/modelarts/inferencejob/index.tmpl @@ -110,8 +110,9 @@ +
- {{.ModelName}}  {{.ModelVersion}} + {{.ModelName}}  {{.ModelVersion}}
@@ -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)=>{ diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 983e90e44..ab4e1525b 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -152,7 +152,7 @@ {{$isModelMangeEnabled := .Repository.UnitEnabled $.UnitTypeModelManage }}
-
+
@@ -160,7 +160,7 @@ {{$isCloudBrainEnabled := .Repository.UnitEnabled $.UnitTypeCloudBrain }}
-
+