@@ -1194,7 +1194,7 @@ template.topics=主题 | |||||
template.avatar=头像 | template.avatar=头像 | ||||
template.issue_labels=任务标签 | template.issue_labels=任务标签 | ||||
template.one_item=必须至少选择一个模板项 | template.one_item=必须至少选择一个模板项 | ||||
template.one_promise=创建项目需承诺使用协议! | |||||
template.one_promise=创建项目时需承诺遵守使用协议 | |||||
template.invalid=必须选择一个模板项目 | template.invalid=必须选择一个模板项目 | ||||
template.repo_adress=项目地址 | template.repo_adress=项目地址 | ||||
template.repo_path=项目地址 | template.repo_path=项目地址 | ||||
@@ -173,7 +173,7 @@ func DatasetIndex(ctx *context.Context) { | |||||
uploader, _ := models.GetUserByID(attachment.UploaderID) | uploader, _ := models.GetUserByID(attachment.UploaderID) | ||||
attachment.Uploader = uploader | attachment.Uploader = uploader | ||||
if !strings.HasSuffix(attachment.Name, ".zip") { | if !strings.HasSuffix(attachment.Name, ".zip") { | ||||
attachment.DecompressState = 3 //非zip文件 | |||||
attachment.DecompressState = -1 //非zip文件 | |||||
} | } | ||||
} | } | ||||
@@ -155,7 +155,8 @@ | |||||
<input class="hidden" name="auto_agree" type="checkbox"> | <input class="hidden" name="auto_agree" type="checkbox"> | ||||
<label | <label | ||||
style="width: 76%;text-align: justify;line-height: 1.5;">{{.i18n.Tr "repo.use_repo_agreement"}} | style="width: 76%;text-align: justify;line-height: 1.5;">{{.i18n.Tr "repo.use_repo_agreement"}} | ||||
<a href="/home/term/">{{.i18n.Tr "repo.openi_use_agreement"}}</a></label> | |||||
<a target="_blank" | |||||
href="/home/term/">{{.i18n.Tr "repo.openi_use_agreement"}}</a></label> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -279,7 +279,7 @@ | |||||
<el-tooltip class="item" effect="dark" placement="top" popper-class="diy-popper"> | <el-tooltip class="item" effect="dark" placement="top" popper-class="diy-popper"> | ||||
<div slot="content"><span class="wrap"> | <div slot="content"><span class="wrap"> | ||||
{{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}}<i | {{end}}<i | ||||
class="ri-download-line"></i>{{$.i18n.Tr "dataset.download"}}:{{.DownloadCount}} | class="ri-download-line"></i>{{$.i18n.Tr "dataset.download"}}:{{.DownloadCount}} | ||||
{{if .Description}} {{$.i18n.Tr "dataset.description"}}:{{.Description}}{{end}}</span> | {{if .Description}} {{$.i18n.Tr "dataset.description"}}:{{.Description}}{{end}}</span> | ||||
@@ -288,10 +288,10 @@ | |||||
{{if eq .DecompressState 1}} | {{if eq .DecompressState 1}} | ||||
<i class="ri-folder-open-line" style="color: #5bb973;" | <i class="ri-folder-open-line" style="color: #5bb973;" | ||||
title='{{$.i18n.Tr "dataset.unzip_successed"}}'></i> | title='{{$.i18n.Tr "dataset.unzip_successed"}}'></i> | ||||
{{else if eq .DecompressState 0}} | |||||
{{else if eq .DecompressState 0 2}} | |||||
<i class="ri-folder-chart-2-line" style="color: #888888;" | <i class="ri-folder-chart-2-line" style="color: #888888;" | ||||
title='{{$.i18n.Tr "dataset.unzip_stared"}}'></i> | title='{{$.i18n.Tr "dataset.unzip_stared"}}'></i> | ||||
{{else if eq .DecompressState 2}} | |||||
{{else if eq .DecompressState 3}} | |||||
<i class="ri-folder-forbid-line" style="color: #101010;" | <i class="ri-folder-forbid-line" style="color: #101010;" | ||||
title='{{$.i18n.Tr "dataset.unzip_failed"}}'></i> | title='{{$.i18n.Tr "dataset.unzip_failed"}}'></i> | ||||
{{else}} | {{else}} | ||||
@@ -487,8 +487,8 @@ | |||||
</div> | </div> | ||||
<div class="ui tab" data-tab="second{{$k}}"> | <div class="ui tab" data-tab="second{{$k}}"> | ||||
<div> | <div> | ||||
<a class='{{if and (.CanModify) (eq .Status "KILLED" "FAILED" "START_FAILED" "STOPPED" "COMPLETED") }}ti-download-file{{else}}disabled{{end}}' | |||||
<a id="{{.VersionName}}-log-down" | |||||
class='{{if and (.CanModify) (eq .Status "KILLED" "FAILED" "START_FAILED" "STOPPED" "COMPLETED") }}ti-download-file{{else}}disabled{{end}}' | |||||
href="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/download_log_file?version_name={{.VersionName}}"> | href="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/download_log_file?version_name={{.VersionName}}"> | ||||
<i class="ri-download-cloud-2-line"></i> | <i class="ri-download-cloud-2-line"></i> | ||||
<span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.download_log"}}</span> | <span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.download_log"}}</span> | ||||
@@ -734,6 +734,12 @@ | |||||
// detail status and duration | // detail status and duration | ||||
$('#' + version_name + '-duration').text(data.JobDuration) | $('#' + version_name + '-duration').text(data.JobDuration) | ||||
$('#' + version_name + '-status').text(data.JobStatus) | $('#' + 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) | loadLog(version_name) | ||||
@@ -1214,7 +1214,7 @@ async function initRepository() { | |||||
files: $attachments | files: $attachments | ||||
}, | }, | ||||
(data) => { | (data) => { | ||||
if (data.length === 0) { | |||||
if (data.length === 0 || data.content === '') { | |||||
$renderContent.html($('#no-content').html()); | $renderContent.html($('#no-content').html()); | ||||
} else { | } else { | ||||
$renderContent.html(data.content); | $renderContent.html(data.content); | ||||
@@ -1225,7 +1225,7 @@ async function initRepository() { | |||||
let imageShow = '' | let imageShow = '' | ||||
const $content = $segment.parent(); | const $content = $segment.parent(); | ||||
if (!$content.find('.ui.small.images').length) { | if (!$content.find('.ui.small.images').length) { | ||||
if (data.attachments !== '') { | |||||
if (data.attachments !== '' && data.attachments) { | |||||
if ($content.find('.ui.middle.aligned').length === 0) { | if ($content.find('.ui.middle.aligned').length === 0) { | ||||
imageShow += '<div class="ui clearing divider"></div>' | imageShow += '<div class="ui clearing divider"></div>' | ||||
imageShow += '<div class="ui middle aligned padded grid">' | imageShow += '<div class="ui middle aligned padded grid">' | ||||