diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index ac9de9fed..2871f7b9f 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -1194,7 +1194,7 @@ template.topics=主题 template.avatar=头像 template.issue_labels=任务标签 template.one_item=必须至少选择一个模板项 -template.one_promise=创建项目需承诺使用协议! +template.one_promise=创建项目时需承诺遵守使用协议 template.invalid=必须选择一个模板项目 template.repo_adress=项目地址 template.repo_path=项目地址 diff --git a/routers/repo/dataset.go b/routers/repo/dataset.go index 9d7f4a4d7..05a89964f 100755 --- a/routers/repo/dataset.go +++ b/routers/repo/dataset.go @@ -173,7 +173,7 @@ func DatasetIndex(ctx *context.Context) { uploader, _ := models.GetUserByID(attachment.UploaderID) attachment.Uploader = uploader if !strings.HasSuffix(attachment.Name, ".zip") { - attachment.DecompressState = 3 //非zip文件 + attachment.DecompressState = -1 //非zip文件 } } diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index 6b9e5c877..773f398f2 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -155,7 +155,8 @@ + {{.i18n.Tr "repo.openi_use_agreement"}} diff --git a/templates/repo/datasets/index.tmpl b/templates/repo/datasets/index.tmpl index 7629d4bdc..22ee1f4c6 100755 --- a/templates/repo/datasets/index.tmpl +++ b/templates/repo/datasets/index.tmpl @@ -279,7 +279,7 @@
- {{if ne .DecompressState 3}}{{$.i18n.Tr "dataset.unzip_status"}}:{{if eq .DecompressState 1}}{{$.i18n.Tr "dataset.unzip_successed"}}{{else if eq .DecompressState 0}}{{$.i18n.Tr "dataset.unzip_stared"}}{{else}}{{$.i18n.Tr "dataset.unzip_failed"}}{{end}} + {{if ne .DecompressState -1}}{{$.i18n.Tr "dataset.unzip_status"}}:{{if eq .DecompressState 1}}{{$.i18n.Tr "dataset.unzip_successed"}}{{else if eq .DecompressState 0 2}}{{$.i18n.Tr "dataset.unzip_stared"}}{{else}}{{$.i18n.Tr "dataset.unzip_failed"}}{{end}}   {{end}}{{$.i18n.Tr "dataset.download"}}:{{.DownloadCount}} {{if .Description}}  {{$.i18n.Tr "dataset.description"}}:{{.Description}}{{end}} @@ -288,10 +288,10 @@ {{if eq .DecompressState 1}} - {{else if eq .DecompressState 0}} + {{else if eq .DecompressState 0 2}} - {{else if eq .DecompressState 2}} + {{else if eq .DecompressState 3}} {{else}} diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl index 580940289..f22a2ce56 100755 --- a/templates/repo/modelarts/trainjob/show.tmpl +++ b/templates/repo/modelarts/trainjob/show.tmpl @@ -487,8 +487,8 @@
- - {{$.i18n.Tr "repo.modelarts.download_log"}} @@ -734,6 +734,12 @@ // detail status and duration $('#' + version_name + '-duration').text(data.JobDuration) $('#' + version_name + '-status').text(data.JobStatus) + console.log(data) + if (["KILLED", "FAILED", "START_FAILED", "STOPPED", "COMPLETED"].includes(data.JobStatus)) { + $(`#${version_name}-log-down`).removeClass('disabled').addClass('ti-download-file') + $('#' + version_name + '-stop').addClass('disabled') + } + loadLog(version_name) diff --git a/web_src/js/index.js b/web_src/js/index.js index 11bb9835d..c7d77bdb4 100755 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1214,7 +1214,7 @@ async function initRepository() { files: $attachments }, (data) => { - if (data.length === 0) { + if (data.length === 0 || data.content === '') { $renderContent.html($('#no-content').html()); } else { $renderContent.html(data.content); @@ -1225,7 +1225,7 @@ async function initRepository() { let imageShow = '' const $content = $segment.parent(); if (!$content.find('.ui.small.images').length) { - if (data.attachments !== '') { + if (data.attachments !== '' && data.attachments) { if ($content.find('.ui.middle.aligned').length === 0) { imageShow += '
' imageShow += '
'