Browse Source

Merge remote-tracking branch 'origin/V20221130' into zouap

pull/3305/head
zouap 2 years ago
parent
commit
0ec194a659
6 changed files with 9 additions and 6 deletions
  1. +3
    -0
      modules/cloudbrain/cloudbrain.go
  2. +1
    -0
      options/locale/locale_en-US.ini
  3. +1
    -0
      options/locale/locale_zh-CN.ini
  4. +1
    -3
      routers/repo/cloudbrain_statistic.go
  5. +1
    -1
      templates/repo/header.tmpl
  6. +2
    -2
      templates/user/auth/activate.tmpl

+ 3
- 0
modules/cloudbrain/cloudbrain.go View File

@@ -661,6 +661,9 @@ func GetCloudBrainByIdOrJobId(id string) (*models.Cloudbrain,error) {
job, err = models.GetCloudbrainByJobID(id)
} else {
job, err = models.GetCloudbrainByID(id)
if err!=nil{
job, err = models.GetCloudbrainByJobID(id)
}

}
return job,err


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

@@ -393,6 +393,7 @@ openid_register_desc = The chosen OpenID URI is unknown. Associate it with a new
openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.openid.org.cn or gnusocial.net/carry.
disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator.
email_domain_blacklisted = You cannot register with this kind of email address.
email_domain_blacklisted_change = This type of email address is not currently supported.
authorize_application = Authorize Application
authorize_redirect_notice = You will be redirected to %s if you authorize this application.
authorize_application_created_by = This application was created by %s.


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

@@ -396,6 +396,7 @@ openid_register_desc=所选的 OpenID URI 未知。在这里关联一个新帐
openid_signin_desc=输入您的 OpenID URI。例如: https://anne.me、bob.openid.org.cn 或 gnusocial.net/carry。
disable_forgot_password_mail=帐户恢复功能已被禁用。请与网站管理员联系。
email_domain_blacklisted=暂不支持此类电子邮件地址注册。
email_domain_blacklisted_change=暂不支持此类电子邮件地址。
authorize_application=应用授权
authorize_redirect_notice=如果您授权此应用,您将会被重定向到 %s。
authorize_application_created_by=此应用由%s创建。


+ 1
- 3
routers/repo/cloudbrain_statistic.go View File

@@ -1,7 +1,6 @@
package repo

import (
"fmt"
"net/http"
"strings"
"time"
@@ -30,7 +29,7 @@ func CloudbrainDurationStatisticHour() {
statisticTime = currentTime
}

err = models.DeleteCloudbrainDurationStatistic(timeutil.TimeStamp(statisticTime.Unix()), timeutil.TimeStamp(currentTime.Unix()))
err = models.DeleteCloudbrainDurationStatistic(timeutil.TimeStamp(statisticTime.Add(-1*time.Hour).Unix()), timeutil.TimeStamp(currentTime.Unix()))
if err != nil {
log.Error("DeleteCloudbrainDurationStatistic failed", err)
}
@@ -69,7 +68,6 @@ func summaryDurationStat(statisticTime time.Time) int64 {
log.Info("GetCloudbrainByTime err: %v", err)
return 0
}
fmt.Printf("ciTasks:", ciTasks[0].Cloudbrain.JobName)
models.LoadSpecs4CloudbrainInfo(ciTasks)
cloudBrainCenterCodeAndCardTypeInfo, cloudbrainMap := getcloudBrainCenterCodeAndCardTypeInfo(ciTasks, beginTime, endTime)



+ 1
- 1
templates/repo/header.tmpl View File

@@ -133,7 +133,7 @@
{{end}}
<div class="ui tabs container">
{{if not .Repository.IsBeingCreated}}
<div class="ui tabular menu navbar" style="overflow-x:auto;overflow-y:hidden">
<div class="ui tabular menu navbar">
{{if .Permission.CanRead $.UnitTypeCode}}
<div class="dropdown-menu">
<a class="{{if or .PageIsViewCode .PageIsReleaseList .PageIsWiki .PageIsActivity .PageIsViewCode}}active{{end}} item hover_active" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">


+ 2
- 2
templates/user/auth/activate.tmpl View File

@@ -52,7 +52,7 @@
<div class="inline required field">
<label>{{.i18n.Tr "auth.new_email_address"}}</label>
<input type="email" style="width: 80%;" id="email" name="NewEmail" maxlength="255" value="{{.SignedUser.Email}}"
pattern="([a-zA-Z0-9_-])+@(163\.com|126\.com|qq\.com|yahoo\.com|sina\.com|sina\.cn|outlook\.com|pcl\.ac\.cn|foxmail\.com|ict\.ac\.cn|21cn\.com|yeah\.net|139\.com)">
pattern="([a-zA-Z0-9_-])+@(163\.com|126\.com|qq\.com|yahoo\.com|sina\.com|sina\.cn|outlook\.com|pcl\.ac\.cn|foxmail\.com|ict\.ac\.cn|21cn\.com|yeah\.net|139\.com)" required>
</div>
</div>
<div class="center actions">
@@ -72,7 +72,7 @@
$('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" })
let emailInput=document.getElementById("email");
emailInput.oninvalid = function () {
this.setCustomValidity('{{.i18n.Tr "auth.email_domain_blacklisted"}}')
this.setCustomValidity('{{.i18n.Tr "auth.email_domain_blacklisted_change"}}')
}
emailInput.oninput = function(){
this.setCustomValidity('')


Loading…
Cancel
Save