summaryrefslogtreecommitdiff
path: root/app/views/projects/commit/_builds.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/commit/_builds.html.haml')
-rw-r--r--app/views/projects/commit/_builds.html.haml50
1 files changed, 25 insertions, 25 deletions
diff --git a/app/views/projects/commit/_builds.html.haml b/app/views/projects/commit/_builds.html.haml
index 003b7c18d0e..ab57e167c6b 100644
--- a/app/views/projects/commit/_builds.html.haml
+++ b/app/views/projects/commit/_builds.html.haml
@@ -2,45 +2,45 @@
.pull-right
- if can?(current_user, :update_build, @ci_commit.project)
- if @ci_commit.builds.latest.failed.any?(&:retryable?)
- = link_to "Retry failed", retry_builds_namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), class: 'btn btn-grouped btn-primary', method: :post
+ = link_to "重试失败", retry_builds_namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), class: 'btn btn-grouped btn-primary', method: :post
- if @ci_commit.builds.running_or_pending.any?
- = link_to "Cancel running", cancel_builds_namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), data: { confirm: 'Are you sure?' }, class: 'btn btn-grouped btn-danger', method: :post
+ = link_to "取消运行", cancel_builds_namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), data: { confirm: '确定要继续么?' }, class: 'btn btn-grouped btn-danger', method: :post
.oneline
- = pluralize @statuses.count(:id), "build"
- if defined?(link_to_commit) && link_to_commit
- for commit
= link_to @ci_commit.short_sha, namespace_project_commit_path(@ci_commit.project.namespace, @ci_commit.project, @ci_commit.sha), class: "monospace"
+ 提交的
+ = pluralize @statuses.count(:id), "次构建", "次构建"
- if @ci_commit.duration > 0
- in
+ 耗费
= time_interval_in_words @ci_commit.duration
- if @ci_commit.yaml_errors.present?
.bs-callout.bs-callout-danger
- %h4 Found errors in your .gitlab-ci.yml:
+ %h4 在 .gitlab-ci.yml 中发现错误:
%ul
- @ci_commit.yaml_errors.split(",").each do |error|
%li= error
- You can also test your .gitlab-ci.yml in the #{link_to "Lint", ci_lint_path}
+ 你也可以使用 #{link_to "Lint", ci_lint_path} 工具测试你的 .gitlab-ci.yml 文件
- if @ci_commit.project.builds_enabled? && !@ci_commit.ci_yaml_file
.bs-callout.bs-callout-warning
- \.gitlab-ci.yml not found in this commit
+ 此提交里面没有发现 .gitlab-ci.yml 文件
.table-holder
%table.table.builds
%thead
%tr
- %th Status
- %th Build ID
- %th Ref
- %th Stage
- %th Name
- %th Duration
- %th Finished at
+ %th 状态
+ %th 构建 ID
+ %th 参考
+ %th 阶段
+ %th 名称
+ %th 运行时间
+ %th 结束时间
- if @ci_commit.project.build_coverage_enabled?
- %th Coverage
+ %th 覆盖率
%th
- @ci_commit.refs.each do |ref|
- builds = @ci_commit.statuses.for_ref(ref).latest.ordered
@@ -48,20 +48,20 @@
- if @ci_commit.retried.any?
.gray-content-block.second-block
- Retried builds
+ 重试的构建
.table-holder
%table.table.builds
%thead
%tr
- %th Status
- %th Build ID
- %th Ref
- %th Stage
- %th Name
- %th Duration
- %th Finished at
+ %th 状态
+ %th 构建 ID
+ %th 参考
+ %th 阶段
+ %th 名称
+ %th 运行时间
+ %th 结束时间
- if @ci_commit.project.build_coverage_enabled?
- %th Coverage
+ %th 覆盖率
%th
= render @ci_commit.retried, coverage: @ci_commit.project.build_coverage_enabled?, stage: true