| @@ -226,10 +226,12 @@ var _hmt = _hmt || []; | |||||
| } | } | ||||
| let isShowNoticeTag = false; | let isShowNoticeTag = false; | ||||
| let notices= {{.notices.Notices}} | let notices= {{.notices.Notices}} | ||||
| for (i =0;i<notices.length;i++){ | |||||
| if (notices[i].Visible==1){ | |||||
| isShowNoticeTag =true; | |||||
| break; | |||||
| if(notices != null && notices!=''){ | |||||
| for (i =0;i<notices.length;i++){ | |||||
| if (notices[i].Visible==1){ | |||||
| isShowNoticeTag =true; | |||||
| break; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| if (isShowNoticeTag){ | if (isShowNoticeTag){ | ||||
| @@ -245,7 +247,9 @@ var _hmt = _hmt || []; | |||||
| } | } | ||||
| }else{ | }else{ | ||||
| document.getElementById("notic_content").style.display='none' | |||||
| if (document.getElementById("notic_content") != null){ | |||||
| document.getElementById("notic_content").style.display='none' | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -227,10 +227,12 @@ var _hmt = _hmt || []; | |||||
| } | } | ||||
| let isShowNoticeTag = false; | let isShowNoticeTag = false; | ||||
| let notices= {{.notices.Notices}} | let notices= {{.notices.Notices}} | ||||
| for (i =0;i<notices.length;i++){ | |||||
| if (notices[i].Visible==1){ | |||||
| isShowNoticeTag =true; | |||||
| break; | |||||
| if(notices != null && notices!=''){ | |||||
| for (i =0;i<notices.length;i++){ | |||||
| if (notices[i].Visible==1){ | |||||
| isShowNoticeTag =true; | |||||
| break; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| if (isShowNoticeTag){ | if (isShowNoticeTag){ | ||||
| @@ -246,7 +248,9 @@ var _hmt = _hmt || []; | |||||
| } | } | ||||
| }else{ | }else{ | ||||
| document.getElementById("notic_content").style.display='none' | |||||
| if (document.getElementById("notic_content") != null){ | |||||
| document.getElementById("notic_content").style.display='none' | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -231,10 +231,12 @@ var _hmt = _hmt || []; | |||||
| } | } | ||||
| let isShowNoticeTag = false; | let isShowNoticeTag = false; | ||||
| let notices= {{.notices.Notices}} | let notices= {{.notices.Notices}} | ||||
| for (i =0;i<notices.length;i++){ | |||||
| if (notices[i].Visible==1){ | |||||
| isShowNoticeTag =true; | |||||
| break; | |||||
| if(notices != null && notices!=''){ | |||||
| for (i =0;i<notices.length;i++){ | |||||
| if (notices[i].Visible==1){ | |||||
| isShowNoticeTag =true; | |||||
| break; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| if (isShowNoticeTag){ | if (isShowNoticeTag){ | ||||
| @@ -250,7 +252,9 @@ var _hmt = _hmt || []; | |||||
| } | } | ||||
| }else{ | }else{ | ||||
| document.getElementById("notic_content").style.display='none' | |||||
| if (document.getElementById("notic_content") != null){ | |||||
| document.getElementById("notic_content").style.display='none' | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -228,10 +228,12 @@ var _hmt = _hmt || []; | |||||
| } | } | ||||
| let isShowNoticeTag = false; | let isShowNoticeTag = false; | ||||
| let notices= {{.notices.Notices}} | let notices= {{.notices.Notices}} | ||||
| for (i =0;i<notices.length;i++){ | |||||
| if (notices[i].Visible==1){ | |||||
| isShowNoticeTag =true; | |||||
| break; | |||||
| if(notices != null && notices!=''){ | |||||
| for (i =0;i<notices.length;i++){ | |||||
| if (notices[i].Visible==1){ | |||||
| isShowNoticeTag =true; | |||||
| break; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| if (isShowNoticeTag){ | if (isShowNoticeTag){ | ||||
| @@ -247,7 +249,9 @@ var _hmt = _hmt || []; | |||||
| } | } | ||||
| }else{ | }else{ | ||||
| document.getElementById("notic_content").style.display='none' | |||||
| if (document.getElementById("notic_content") != null){ | |||||
| document.getElementById("notic_content").style.display='none' | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -7,7 +7,7 @@ | |||||
| <div class="row"> | <div class="row"> | ||||
| <div class="eight wide column" data-tooltip="{{.Name}}"> | <div class="eight wide column" data-tooltip="{{.Name}}"> | ||||
| <span class="ui right">{{.Size | FileSize}}</span> | <span class="ui right">{{.Size | FileSize}}</span> | ||||
| <a class="title" href="{{.DownloadURL}}?type={{$.Type}}"> | |||||
| <a class="title" href="{{.DownloadURL}}"> | |||||
| {{svg "octicon-cloud-download" 16}} {{.Name}} | {{svg "octicon-cloud-download" 16}} {{.Name}} | ||||
| </a> | </a> | ||||
| </div> | </div> | ||||
| @@ -293,7 +293,7 @@ | |||||
| </div> | </div> | ||||
| <div class="two wide column text center"> | <div class="two wide column text center"> | ||||
| <!--任务状态 --> | <!--任务状态 --> | ||||
| <span class="job-status" id="{{.JobID}}" data-repopath="{{$.RepoRelPath}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}" data-jobid="{{.JobID}}" data-resource="{{.ComputeResource}}"> | |||||
| <span class="job-status" id="{{.JobID}}" data-repopath="{{$.RepoRelPath}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}" data-jobid="{{if eq .ComputeResource "CPU/GPU"}}{{.JobName}}{{else}}{{.JobID}}{{end}}" data-resource="{{.ComputeResource}}"> | |||||
| <span><i id="{{.JobID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{.JobID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | <span><i id="{{.JobID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{.JobID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | ||||
| </span> | </span> | ||||
| </div> | </div> | ||||
| @@ -132,7 +132,7 @@ | |||||
| {{end}} --> | {{end}} --> | ||||
| {{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}} | {{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}} | ||||
| <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> | |||||
| <a class="{{if or .PageIsComparePull .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> | |||||
| {{svg "octicon-git-pull-request" 16}} {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span> | {{svg "octicon-git-pull-request" 16}} {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span> | ||||
| </a> | </a> | ||||
| {{end}} | {{end}} | ||||
| @@ -19,7 +19,7 @@ | |||||
| <div class="repository new repo ui middle very relaxed page grid"> | <div class="repository new repo ui middle very relaxed page grid"> | ||||
| <div class="column"> | <div class="column"> | ||||
| {{template "base/alert" .}} | {{template "base/alert" .}} | ||||
| <div class="ui positive message" id="messageInfo"> | |||||
| <div class="ui negative message" id="messageInfo"> | |||||
| <p></p> | <p></p> | ||||
| </div> | </div> | ||||
| <form class="ui form" id="form_id" action="{{.Link}}" method="post"> | <form class="ui form" id="form_id" action="{{.Link}}" method="post"> | ||||