@@ -661,6 +661,9 @@ func GetCloudBrainByIdOrJobId(id string) (*models.Cloudbrain,error) { | |||||
job, err = models.GetCloudbrainByJobID(id) | job, err = models.GetCloudbrainByJobID(id) | ||||
} else { | } else { | ||||
job, err = models.GetCloudbrainByID(id) | job, err = models.GetCloudbrainByID(id) | ||||
if err!=nil{ | |||||
job, err = models.GetCloudbrainByJobID(id) | |||||
} | |||||
} | } | ||||
return job,err | return job,err | ||||
@@ -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. | 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. | 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 = 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_application = Authorize Application | ||||
authorize_redirect_notice = You will be redirected to %s if you authorize this 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. | authorize_application_created_by = This application was created by %s. | ||||
@@ -396,6 +396,7 @@ openid_register_desc=所选的 OpenID URI 未知。在这里关联一个新帐 | |||||
openid_signin_desc=输入您的 OpenID URI。例如: https://anne.me、bob.openid.org.cn 或 gnusocial.net/carry。 | openid_signin_desc=输入您的 OpenID URI。例如: https://anne.me、bob.openid.org.cn 或 gnusocial.net/carry。 | ||||
disable_forgot_password_mail=帐户恢复功能已被禁用。请与网站管理员联系。 | disable_forgot_password_mail=帐户恢复功能已被禁用。请与网站管理员联系。 | ||||
email_domain_blacklisted=暂不支持此类电子邮件地址注册。 | email_domain_blacklisted=暂不支持此类电子邮件地址注册。 | ||||
email_domain_blacklisted_change=暂不支持此类电子邮件地址。 | |||||
authorize_application=应用授权 | authorize_application=应用授权 | ||||
authorize_redirect_notice=如果您授权此应用,您将会被重定向到 %s。 | authorize_redirect_notice=如果您授权此应用,您将会被重定向到 %s。 | ||||
authorize_application_created_by=此应用由%s创建。 | authorize_application_created_by=此应用由%s创建。 | ||||
@@ -1,7 +1,6 @@ | |||||
package repo | package repo | ||||
import ( | import ( | ||||
"fmt" | |||||
"net/http" | "net/http" | ||||
"strings" | "strings" | ||||
"time" | "time" | ||||
@@ -30,7 +29,7 @@ func CloudbrainDurationStatisticHour() { | |||||
statisticTime = currentTime | 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 { | if err != nil { | ||||
log.Error("DeleteCloudbrainDurationStatistic failed", err) | log.Error("DeleteCloudbrainDurationStatistic failed", err) | ||||
} | } | ||||
@@ -69,7 +68,6 @@ func summaryDurationStat(statisticTime time.Time) int64 { | |||||
log.Info("GetCloudbrainByTime err: %v", err) | log.Info("GetCloudbrainByTime err: %v", err) | ||||
return 0 | return 0 | ||||
} | } | ||||
fmt.Printf("ciTasks:", ciTasks[0].Cloudbrain.JobName) | |||||
models.LoadSpecs4CloudbrainInfo(ciTasks) | models.LoadSpecs4CloudbrainInfo(ciTasks) | ||||
cloudBrainCenterCodeAndCardTypeInfo, cloudbrainMap := getcloudBrainCenterCodeAndCardTypeInfo(ciTasks, beginTime, endTime) | cloudBrainCenterCodeAndCardTypeInfo, cloudbrainMap := getcloudBrainCenterCodeAndCardTypeInfo(ciTasks, beginTime, endTime) | ||||
@@ -133,7 +133,7 @@ | |||||
{{end}} | {{end}} | ||||
<div class="ui tabs container"> | <div class="ui tabs container"> | ||||
{{if not .Repository.IsBeingCreated}} | {{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}} | {{if .Permission.CanRead $.UnitTypeCode}} | ||||
<div class="dropdown-menu"> | <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}}"> | <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}}"> | ||||
@@ -52,7 +52,7 @@ | |||||
<div class="inline required field"> | <div class="inline required field"> | ||||
<label>{{.i18n.Tr "auth.new_email_address"}}</label> | <label>{{.i18n.Tr "auth.new_email_address"}}</label> | ||||
<input type="email" style="width: 80%;" id="email" name="NewEmail" maxlength="255" value="{{.SignedUser.Email}}" | <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> | </div> | ||||
<div class="center actions"> | <div class="center actions"> | ||||
@@ -72,7 +72,7 @@ | |||||
$('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" }) | $('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" }) | ||||
let emailInput=document.getElementById("email"); | let emailInput=document.getElementById("email"); | ||||
emailInput.oninvalid = function () { | emailInput.oninvalid = function () { | ||||
this.setCustomValidity('{{.i18n.Tr "auth.email_domain_blacklisted"}}') | |||||
this.setCustomValidity('{{.i18n.Tr "auth.email_domain_blacklisted_change"}}') | |||||
} | } | ||||
emailInput.oninput = function(){ | emailInput.oninput = function(){ | ||||
this.setCustomValidity('') | this.setCustomValidity('') | ||||