Browse Source

Merge branch 'develop' into dev-clone-cnt

tags/v1.21.12.1
palytoxin 5 years ago
parent
commit
8bf64f1d9c
7 changed files with 101 additions and 100 deletions
  1. +8
    -8
      modules/timer/timer.go
  2. +1
    -1
      modules/worker/task.go
  3. +31
    -31
      templates/repo/cloudbrain/index.tmpl
  4. +56
    -58
      templates/repo/datasets/index.tmpl
  5. +1
    -1
      templates/status/404.tmpl
  6. +1
    -1
      templates/status/500.tmpl
  7. +3
    -0
      web_src/less/_base.less

+ 8
- 8
modules/timer/timer.go View File

@@ -12,16 +12,16 @@ func init() {
spec := "*/10 * * * *"
c.AddFunc(spec, repo.HandleUnDecompressAttachment)

specCheckBlockChainUserSuccess := "*/10 * * * *"
c.AddFunc(specCheckBlockChainUserSuccess, repo.HandleBlockChainUnSuccessUsers)
//specCheckBlockChainUserSuccess := "*/10 * * * *"
//c.AddFunc(specCheckBlockChainUserSuccess, repo.HandleBlockChainUnSuccessUsers)

specCheckRepoBlockChainSuccess := "*/5 * * * *"
c.AddFunc(specCheckRepoBlockChainSuccess, repo.HandleBlockChainUnSuccessRepos)
//specCheckRepoBlockChainSuccess := "*/5 * * * *"
//c.AddFunc(specCheckRepoBlockChainSuccess, repo.HandleBlockChainUnSuccessRepos)

specCheckUnTransformedActions := "*/1 * * * *"
c.AddFunc(specCheckUnTransformedActions, repo.HandleUnTransformedActions)
//specCheckUnTransformedActions := "*/1 * * * *"
//c.AddFunc(specCheckUnTransformedActions, repo.HandleUnTransformedActions)

specCheckBlockChainCommitSuccess := "*/3 * * * *"
c.AddFunc(specCheckBlockChainCommitSuccess, repo.HandleBlockChainUnSuccessCommits)
//specCheckBlockChainCommitSuccess := "*/3 * * * *"
//c.AddFunc(specCheckBlockChainCommitSuccess, repo.HandleBlockChainUnSuccessCommits)
c.Start()
}

+ 1
- 1
modules/worker/task.go View File

@@ -14,7 +14,7 @@ const (
)

func SendDecompressTask(ctx context.Context, uuid string) error {
args := []tasks.Arg{{Name: "uuid", Type: "string", Value: uuid}, {}}
args := []tasks.Arg{{Name: "uuid", Type: "string", Value: uuid}}
task, err := tasks.NewSignature(DecompressTaskName, args)
if err != nil {
log.Error("NewSignature failed:", err.Error())


+ 31
- 31
templates/repo/cloudbrain/index.tmpl View File

@@ -7,7 +7,7 @@
height: 100%;
}
/* 弹窗 */
#mask {
position: fixed;
top: 0px;
@@ -23,7 +23,7 @@
padding-top: 100px;
color: #000000
}
#loadingPage {
margin: 200px auto;
width: 50px;
@@ -32,7 +32,7 @@
font-size: 10px;
display: block;
}
#loadingPage>div {
background-color: green;
height: 100%;
@@ -41,27 +41,27 @@
-webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
animation: sk-stretchdelay 1.2s infinite ease-in-out;
}
#loadingPage .rect2 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}
#loadingPage .rect3 {
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
}
#loadingPage .rect4 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
#loadingPage .rect5 {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
}
@-webkit-keyframes sk-stretchdelay {
0%,
40%,
@@ -72,7 +72,7 @@
-webkit-transform: scaleY(1.0)
}
}
@keyframes sk-stretchdelay {
0%,
40%,
@@ -86,7 +86,7 @@
}
}
/* 消息框 */
.alert {
display: none;
position: fixed;
@@ -98,37 +98,37 @@
text-align: center;
font-weight: bold;
}
.alert-success {
color: #3c763d;
background-color: #dff0d8;
border-color: #d6e9c6;
}
.alert-info {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
}
.alert-warning {
color: #8a6d3b;
background-color: #fcf8e3;
border-color: #faebcc;
}
.alert-danger {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
}
.pusher {
width: calc(100% - 260px);
box-sizing: border-box;
}
/* 弹窗 (background) */
#imageModal {
display: none;
position: fixed;
@@ -142,7 +142,7 @@
background-color: rgba(0, 0, 0, 0.4);
}
/* 弹窗内容 */
.modal-content {
background-color: #fefefe;
margin: 15% auto;
@@ -151,25 +151,25 @@
width: 30%;
}
/* 关闭按钮 */
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
.dis {
margin-bottom: 20px;
}
.disabled {
cursor: pointer;
pointer-events: none;
@@ -236,7 +236,7 @@
<!-- 任务展示 -->
<div class="dataset list">
{{range .Tasks}}
<div class="ui grid item">
<div class="ui grid stackable item">
<div class="row">

<!-- 任务名 -->
@@ -259,7 +259,7 @@

<!-- 查看 -->
<div class="one wide column">
<span class="ui text center clipboard">
<span class="ui text clipboard">
<a class="title" href="{{$.Link}}/{{.JobID}}">
<span class="fitted">查看</span>
</a>
@@ -268,40 +268,40 @@

<!-- 评分 -->
<div class="one wide column">
<span class="ui text center clipboard">
<div class="ui text center clipboard">
<a class="title" onclick="stop(this)" href="{{if and (ne .Status "WAITING") (eq .JobType "BENCHMARK")}}{{$.Link}}/{{.JobID}}/benchmark{{else}}javascript:void(0);{{end}}" style="{{if and (ne .Status "WAITING") (eq .JobType "BENCHMARK")}}{{else}}color:#CCCCCC{{end}}">
<span class="fitted">评分</span>
</a>
</span>
</div>
</div>

<!-- 删除镜像 -->
<div class="one wide column">
<span class="ui text center clipboard">
<div class="ui text center clipboard">
<form id="delForm-{{.JobID}}" action="{{if ne .Status "STOPPED"}}javascript:void(0){{else}}{{$.Link}}/{{.JobID}}/del{{end}}" method="post">
{{$.CsrfTokenHtml}}
<a class="fitted" onclick="assertDelete(this)" style="{{if ne .Status "STOPPED"}}color:#CCCCCC{{end}}; font-size:16px; font-weight:bold">删除</a>
</form>
</span>
</div>
</div>

<!-- 调试 -->
<div class="one wide column">
<span class="ui text center clipboard">
<div class="ui text center clipboard">
<a class="title" onclick="stop(this)" href="{{if not .CanDebug}}javascript:void(0){{else}}{{$.Link}}/{{.JobID}}/debug{{end}}" style="{{if not .CanDebug}}color:#CCCCCC{{end}}">
<span class="fitted">调试</span>
</a>
</span>
</div>
</div>

<!-- 停止 -->
<div class="one wide column">
<span class="ui text center clipboard">
<div class="ui text center clipboard">
<form id="stopForm-{{.JobID}}" action="{{if ne .Status "RUNNING"}}javascript:void(0){{else}}{{$.Link}}/{{.JobID}}/stop{{end}}" method="post">
{{$.CsrfTokenHtml}}
<a class="fitted" onclick="document.getElementById('stopForm-{{.JobID}}').submit();" style="{{if ne .Status "RUNNING"}}color:#CCCCCC{{end}}; font-size:16px; font-weight:bold">停止</a>
</form>
</span>
</div>
</div>

<!-- 接收结果 -->


+ 56
- 58
templates/repo/datasets/index.tmpl View File

@@ -4,7 +4,7 @@
<form class="ui container" action="{{.Link}}" method="post">
<input name="id" value="{{.dataset.ID}}" type="hidden" />
<!--
<span class="alert" style="font-size:20px;color:red">
<span class="alert" style="font-size:20px;color:red">
<strong>{{.i18n.Tr "dataset.alert"}}</strong>
</span>
-->
@@ -51,71 +51,69 @@
</div>

<div class="ui divider"></div>
<div class="ui grid">
<div class="row">
<div class="ui twelve wide column">
<div class="ui sixteen wide column">
<div class="ui two column stackable grid">
<div class="column">
<h2>{{.i18n.Tr "datasets"}}</h2>
</div>
<div class="column right aligned">
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
</div>
<div class="ui stackable grid">
<div class="twelve wide column">
<div class="ui sixteen wide column">
<div class="ui two column stackable grid">
<div class="column">
<h2>{{.i18n.Tr "datasets"}}</h2>
</div>
<div class="column right aligned">
<div class="ui right dropdown type jump item">
<span class="text">
{{.i18n.Tr "repo.issues.filter_sort"}}<i class="dropdown icon"></i>
</span>
<div class="menu">
<a class="item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
</div>
</div>
</div>
</div>
<div class="dataset list">
{{template "repo/datasets/dataset_list" .}}
</div>
<div class="dataset ui middle very relaxed page">
<div class="column">
{{if .Permission.CanWrite $.UnitTypeDatasets}}
<div style='display:none;'
id="minioUploader-params"
data-uuid="{{.uuid}}"
data-add-url="{{AppSubUrl}}/attachments/add"
data-accepts="{{.AttachmentAllowedTypes}}"
data-remove-url="{{AppSubUrl}}/attachments/delete"
data-csrf="{{.CsrfToken}}"
dataset-id={{.dataset.ID}}
data-max-file="100"
data-dataset-id="{{.dataset.ID}}"
data-max-size="{{.AttachmentMaxSize}}"
data-default-message="{{.i18n.Tr "dropzone.default_message"}}"
data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}"
data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}"
data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"
</div>
<div class="dataset list">
{{template "repo/datasets/dataset_list" .}}
</div>
<div class="dataset ui middle very relaxed page">
<div class="column">
{{if .Permission.CanWrite $.UnitTypeDatasets}}
<div style='display:none;'
id="minioUploader-params"
data-uuid="{{.uuid}}"
data-add-url="{{AppSubUrl}}/attachments/add"
data-accepts="{{.AttachmentAllowedTypes}}"
data-remove-url="{{AppSubUrl}}/attachments/delete"
data-csrf="{{.CsrfToken}}"
dataset-id={{.dataset.ID}}
data-max-file="100"
data-dataset-id="{{.dataset.ID}}"
data-max-size="{{.AttachmentMaxSize}}"
data-default-message="{{.i18n.Tr "dropzone.default_message"}}"
data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}"
data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}"
data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"

data-file-status='{{.i18n.Tr "dropzone.file_status"}}'
data-file-init-status='{{.i18n.Tr "dropzone.file_init_status"}}'
data-waitting-uploading='{{.i18n.Tr "dropzone.waitting_uploading"}}'
data-md5-computing='{{.i18n.Tr "dropzone.md5_computing"}}'
data-loading-file='{{.i18n.Tr "dropzone.loading_file"}}'
data-upload-complete='{{.i18n.Tr "dropzone.upload_complete"}}'
data-uploading='{{.i18n.Tr "dropzone.uploading"}}'
data-failed='{{.i18n.Tr "dropzone.failed"}}'
>
</div>
{{if eq .StoreType "minio"}}
<div id="minioUploader"></div>
{{else}}
<div style="margin: 2em 0;"> {{.i18n.Tr "dropzone.enable_minio_support"}} </div>
{{end}}
{{end}}
data-file-status='{{.i18n.Tr "dropzone.file_status"}}'
data-file-init-status='{{.i18n.Tr "dropzone.file_init_status"}}'
data-waitting-uploading='{{.i18n.Tr "dropzone.waitting_uploading"}}'
data-md5-computing='{{.i18n.Tr "dropzone.md5_computing"}}'
data-loading-file='{{.i18n.Tr "dropzone.loading_file"}}'
data-upload-complete='{{.i18n.Tr "dropzone.upload_complete"}}'
data-uploading='{{.i18n.Tr "dropzone.uploading"}}'
data-failed='{{.i18n.Tr "dropzone.failed"}}'
>
</div>
{{if eq .StoreType "minio"}}
<div id="minioUploader"></div>
{{else}}
<div style="margin: 2em 0;"> {{.i18n.Tr "dropzone.enable_minio_support"}} </div>
{{end}}
{{end}}
</div>
</div>
<div class="ui four wide column">
{{template "repo/datasets/right_side" .}}
</div>
</div>
<div class="four wide column">
{{template "repo/datasets/right_side" .}}
</div>
</div>
</form>


+ 1
- 1
templates/status/404.tmpl View File

@@ -1,6 +1,6 @@
{{template "base/head" .}}
{{if .IsRepo}}<div class="repository">{{template "repo/header" .}}</div>{{end}}
<div class="ui container center" style="background:url({{StaticUrlPrefix}}/img/404.png) no-repeat center center fixed;margin-bottom:-80px;height: 100%;width:100%;overflow: hidden;background-size: cover;">
<div class="ui container center" style="background:url({{StaticUrlPrefix}}/img/404.png) no-repeat center center fixed;margin-bottom:-80px;height: 100%;width:100%;overflow: hidden;background-size: cover;margin:0!important">
<div style="height:100%;color:white">
<div style="padding-top: 50vh">
<div class="ui divider"></div>


+ 1
- 1
templates/status/500.tmpl View File

@@ -1,6 +1,6 @@
{{template "base/head" .}}
{{if .IsRepo}}<div class="repository">{{template "repo/header" .}}</div>{{end}}
<div class="ui container center" style="background:url({{StaticUrlPrefix}}/img/500.png) no-repeat center center fixed;margin-bottom:-80px;height: 100%;width:100%;overflow: hidden;background-size: cover;">
<div class="ui container center" style="background:url({{StaticUrlPrefix}}/img/500.png) no-repeat center center fixed;margin-bottom:-80px;height: 100%;width:100%;overflow: hidden;background-size: cover;margin:0!important">
<div style="height:100%;color:white">
<h1 style="padding-top: 100px;font-size: 180px;color: white;text-align: center;text-shadow: 1px 20px 2px #666;
letter-spacing: 20px;">


+ 3
- 0
web_src/less/_base.less View File

@@ -1300,4 +1300,7 @@ i.icon.centerlock {
.ui.grid>.column:not(.row),
.ui.grid>.row>.column {
z-index: 0,
}
.ui.search.action.input > input {
width: auto;
}

Loading…
Cancel
Save