diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-08 12:41:23 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-08 12:41:23 +0100 |
commit | fc57b3144ff99be7e87a2d6f5172fab0dbfd8841 (patch) | |
tree | 8c3f9ce23965ff63483fbb1a8e41b2168afe3478 /app/views/projects/stage | |
parent | f7335aa5cb1ed368f0583d7dca8fcfa7574d6ad9 (diff) | |
parent | 65f3206024778b934171c9d9ece8ab627ba6c4c5 (diff) | |
download | gitlab-ce-fc57b3144ff99be7e87a2d6f5172fab0dbfd8841.tar.gz |
Merge branch 'build-statuses' into 22604-manual-actions
* build-statuses: (21 commits)
Remove ci_status_with_icon helper and replace it with partial
Check permission of details
Introduce `cancelable` and `returnable`
Improve actions
Added Ci::Status::Build
Fix specs
Move .pipeline-graph to pipelines/graph
Code review
Add Ci::Status::Factory
Fix success status
Added Ci::Stage specs
Update stage rendering views
Fix handling of allowed to failure jobs
Fix handling of skipped vs success status
Fix test failures
Added Stage tests
Add Ci::Status::Stage
Preserve stage values and use StaticModel
Introduce `Ci::Stage`, right now this is artificial object that is build dynamically.
Fix broken pipeline rendering
...
Diffstat (limited to 'app/views/projects/stage')
-rw-r--r-- | app/views/projects/stage/_graph.html.haml | 23 | ||||
-rw-r--r-- | app/views/projects/stage/_in_stage_group.html.haml | 13 | ||||
-rw-r--r-- | app/views/projects/stage/_stage.html.haml | 14 |
3 files changed, 50 insertions, 0 deletions
diff --git a/app/views/projects/stage/_graph.html.haml b/app/views/projects/stage/_graph.html.haml new file mode 100644 index 00000000000..d8c87fae5a1 --- /dev/null +++ b/app/views/projects/stage/_graph.html.haml @@ -0,0 +1,23 @@ +- stage = local_assigns.fetch(:stage) +- statuses = stage.statuses.latest +- status_groups = statuses.sort_by(&:name).group_by(&:group_name) +%li.stage-column + .stage-name + %a{ name: stage.name } + - if stage.name + = stage.name.titleize + .builds-container + %ul + - status_groups.each do |group_name, grouped_statuses| + - if grouped_statuses.one? + - status = grouped_statuses.first + - is_playable = status.playable? && can?(current_user, :update_build, @project) + %li.build{ class: ("playable" if is_playable) } + .curve + .build-content + = render "projects/#{status.to_partial_path}_pipeline", subject: status + - else + %li.build + .curve + .dropdown.inline.build-content + = render "projects/stage/in_stage_group", name: group_name, subject: grouped_statuses diff --git a/app/views/projects/stage/_in_stage_group.html.haml b/app/views/projects/stage/_in_stage_group.html.haml new file mode 100644 index 00000000000..2d198d1b389 --- /dev/null +++ b/app/views/projects/stage/_in_stage_group.html.haml @@ -0,0 +1,13 @@ +- group_status = CommitStatus.where(id: subject).status +%button.dropdown-menu-toggle.has-tooltip{ type: 'button', data: { toggle: 'dropdown', title: "#{name} - #{group_status}" } } + %span{class: "ci-status-icon ci-status-icon-#{group_status}"} + = ci_icon_for_status(group_status) + %span.ci-status-text + = name + %span.dropdown-counter-badge= subject.size +.dropdown-menu.grouped-pipeline-dropdown + .arrow + %ul + - subject.each do |status| + %li.dropdown-build + = render "projects/#{status.to_partial_path}_pipeline", subject: status diff --git a/app/views/projects/stage/_stage.html.haml b/app/views/projects/stage/_stage.html.haml new file mode 100644 index 00000000000..1eca375db3d --- /dev/null +++ b/app/views/projects/stage/_stage.html.haml @@ -0,0 +1,14 @@ +%tr + %th{colspan: 10} + %strong + %a{ name: stage.name } + %span{class: "ci-status-link ci-status-icon-#{stage.status}"} + = ci_icon_for_status(stage.status) + - if stage.name + + = stage.name.titleize += render stage.statuses.latest_ordered, coverage: @project.build_coverage_enabled?, stage: false, ref: false, pipeline_link: false, allow_retry: true += render stage.statuses.retried_ordered, coverage: @project.build_coverage_enabled?, stage: false, ref: false, pipeline_link: false, retried: true +%tr + %td{colspan: 10} + |