Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-06 12:19:54 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-06 12:19:54 +0300
commit9614c52266fd7009c1dd2960564d4f65b1a12f80 (patch)
tree533b513e76361e52237905491a30feaa38acddce /app/views/projects/ci
parentbf2bd2373d9179616436990b483aec52fcfe0f8e (diff)
Fix tests offenses: use `pipeline` of Ci::Build and rename views
Diffstat (limited to 'app/views/projects/ci')
-rw-r--r--app/views/projects/ci/pipelines/_pipeline.html.haml (renamed from app/views/projects/ci/commits/_commit.html.haml)44
1 files changed, 22 insertions, 22 deletions
diff --git a/app/views/projects/ci/commits/_commit.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml
index 5e3a4123a8e..a0ffa065067 100644
--- a/app/views/projects/ci/commits/_commit.html.haml
+++ b/app/views/projects/ci/pipelines/_pipeline.html.haml
@@ -1,55 +1,55 @@
-- status = commit.status
+- status = pipeline.status
%tr.commit
%td.commit-link
- = link_to namespace_project_pipeline_path(@project.namespace, @project, commit.id), class: "ci-status ci-#{status}" do
+ = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline.id), class: "ci-status ci-#{status}" do
= ci_icon_for_status(status)
- %strong ##{commit.id}
+ %strong ##{pipeline.id}
%td
%div.branch-commit
- - if commit.ref
- = link_to commit.ref, namespace_project_commits_path(@project.namespace, @project, commit.ref), class: "monospace"
+ - if pipeline.ref
+ = link_to pipeline.ref, namespace_project_commits_path(@project.namespace, @project, pipeline.ref), class: "monospace"
&middot;
- = link_to commit.short_sha, namespace_project_commit_path(@project.namespace, @project, commit.sha), class: "commit-id monospace"
+ = link_to pipeline.short_sha, namespace_project_commit_path(@project.namespace, @project, pipeline.sha), class: "commit-id monospace"
&nbsp;
- - if commit.tag?
+ - if pipeline.tag?
%span.label.label-primary tag
- - elsif commit.latest?
+ - elsif pipeline.latest?
%span.label.label-success.has-tooltip{ title: 'Latest build for this branch' } latest
- - if commit.triggered?
+ - if pipeline.triggered?
%span.label.label-primary triggered
- - if commit.yaml_errors.present?
- %span.label.label-danger.has-tooltip{ title: "#{commit.yaml_errors}" } yaml invalid
- - if commit.builds.any?(&:stuck?)
+ - if pipeline.yaml_errors.present?
+ %span.label.label-danger.has-tooltip{ title: "#{pipeline.yaml_errors}" } yaml invalid
+ - if pipeline.builds.any?(&:stuck?)
%span.label.label-warning stuck
%p.commit-title
- - if commit_data = commit.commit_data
+ - if commit_data = pipeline.commit_data
= link_to_gfm truncate(commit_data.title, length: 60), namespace_project_commit_path(@project.namespace, @project, commit_data.id), class: "commit-row-message"
- else
Cant find HEAD commit for this branch
- - stages_status = commit.statuses.stages_status
+ - stages_status = pipeline.statuses.stages_status
- stages.each do |stage|
%td
- status = stages_status[stage]
- tooltip = "#{stage.titleize}: #{status || 'not found'}"
- if status
- = link_to namespace_project_pipeline_path(@project.namespace, @project, commit.id, anchor: stage), class: "has-tooltip ci-status-icon-#{status}", title: tooltip do
+ = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline.id, anchor: stage), class: "has-tooltip ci-status-icon-#{status}", title: tooltip do
= ci_icon_for_status(status)
- else
.light.has-tooltip{ title: tooltip }
\-
%td
- - if commit.started_at && commit.finished_at
+ - if pipeline.started_at && pipeline.finished_at
%p.duration
- #{duration_in_words(commit.finished_at, commit.started_at)}
+ #{duration_in_words(pipeline.finished_at, pipeline.started_at)}
%td
.controls.hidden-xs.pull-right
- - artifacts = commit.builds.latest.select { |b| b.artifacts? }
+ - artifacts = pipeline.builds.latest.select { |b| b.artifacts? }
- if artifacts.present?
.dropdown.inline.build-artifacts
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
@@ -63,9 +63,9 @@
%span #{build.name}
- if can?(current_user, :update_pipeline, @project)
- - if commit.retryable?
- = link_to retry_namespace_project_pipeline_path(@project.namespace, @project, commit.id), class: 'btn has-tooltip', title: "Retry", method: :post do
+ - if pipeline.retryable?
+ = link_to retry_namespace_project_pipeline_path(@project.namespace, @project, pipeline.id), class: 'btn has-tooltip', title: "Retry", method: :post do
= icon("repeat")
- - if commit.cancelable?
- = link_to cancel_namespace_project_pipeline_path(@project.namespace, @project, commit.id), class: 'btn btn-remove has-tooltip', title: "Cancel", method: :post do
+ - if pipeline.cancelable?
+ = link_to cancel_namespace_project_pipeline_path(@project.namespace, @project, pipeline.id), class: 'btn btn-remove has-tooltip', title: "Cancel", method: :post do
= icon("remove")