From 47199c35a5555483309cdbde39c3da51e5a75d69 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 7 Jul 2016 08:44:00 -0500 Subject: [PATCH 01/11] Add clock and calendar icons for duration and finished at; add finished at section in pipelines --- app/views/projects/ci/builds/_build.html.haml | 2 ++ app/views/projects/ci/pipelines/_pipeline.html.haml | 5 +++++ .../generic_commit_statuses/_generic_commit_status.html.haml | 2 ++ 3 files changed, 9 insertions(+) diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 5bd6e3f0ebc..00004163047 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -57,10 +57,12 @@ %td.duration - if build.duration + = icon("clock-o") #{duration_in_words(build.finished_at, build.started_at)} %td.timestamp - if build.finished_at + = icon("calendar") %span #{time_ago_with_tooltip(build.finished_at)} - if defined?(coverage) && coverage diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index af8dd5cd02c..f2c19797206 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -45,7 +45,12 @@ %td - if pipeline.started_at && pipeline.finished_at %p.duration + = icon("clock-o") = duration_in_numbers(pipeline.finished_at, pipeline.started_at) + - if pipeline.finished_at + %p.duration + = icon("calendar") + #{time_ago_with_tooltip(pipeline.finished_at)} %td .controls.hidden-xs.pull-right diff --git a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml index 5bc5c71283e..542827b2f15 100644 --- a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml +++ b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml @@ -50,10 +50,12 @@ %td.duration - if generic_commit_status.duration + = icon("clock-o") #{duration_in_words(generic_commit_status.finished_at, generic_commit_status.started_at)} %td.timestamp - if generic_commit_status.finished_at + = icon("calendar") %span #{time_ago_with_tooltip(generic_commit_status.finished_at)} - if defined?(coverage) && coverage From 446eecb85275352dcd4c3e2c6054461da2a51ca7 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 7 Jul 2016 13:40:40 -0500 Subject: [PATCH 02/11] Move pipeline ID to commit column; add status; branch style updates --- app/assets/stylesheets/pages/builds.scss | 32 ++++++++++++++++++- .../projects/ci/pipelines/_pipeline.html.haml | 9 +++--- app/views/projects/pipelines/index.html.haml | 4 +-- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/pages/builds.scss b/app/assets/stylesheets/pages/builds.scss index e8f1935d239..76024933650 100644 --- a/app/assets/stylesheets/pages/builds.scss +++ b/app/assets/stylesheets/pages/builds.scss @@ -83,7 +83,37 @@ } } -table.builds { + +.table.builds { + + tr { + th { + padding: 18px 10px; + border: none; + } + } + + tbody { + border-top-width: 1px; + } + + .branch-commit { + + .branch-name { + max-width: 180px; + overflow: hidden; + display: inline-block; + white-space: nowrap; + vertical-align: top; + text-overflow: ellipsis; + margin-left: 10px; + } + + .commit-id { + color: $gl-link-color; + } + } + .build-link { a { color: $gl-dark-link-color; diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index f2c19797206..daeaf7f99eb 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -1,14 +1,15 @@ - status = pipeline.status %tr.commit %td.commit-link - = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline.id), class: "ci-status ci-#{status}" do - = ci_icon_for_status(status) - %strong ##{pipeline.id} + = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline.id) do + = ci_status_with_icon(status) + %td %div.branch-commit + %span ##{pipeline.id} - if pipeline.ref - = link_to pipeline.ref, namespace_project_commits_path(@project.namespace, @project, pipeline.ref), class: "monospace" + = link_to pipeline.ref, namespace_project_commits_path(@project.namespace, @project, pipeline.ref), class: "monospace branch-name" · = link_to pipeline.short_sha, namespace_project_commit_path(@project.namespace, @project, pipeline.sha), class: "commit-id monospace"   diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 7c225e2b282..e1c82a8179d 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -45,13 +45,13 @@ .table-holder %table.table.builds %tbody - %th ID + %th Status %th Commit - stages.each do |stage| %th.stage %span.has-tooltip{ title: "#{stage.titleize}" } = stage.titleize - %th Duration + %%th %th = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages From 1f67cc4a559e72bedf06f169343c504fcfdd3d49 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Fri, 8 Jul 2016 10:01:56 -0500 Subject: [PATCH 03/11] Set width on stage columns; min width on table with scroll on mobile; add avatar to commit column --- app/assets/stylesheets/framework/avatar.scss | 1 + .../stylesheets/framework/variables.scss | 1 + app/assets/stylesheets/pages/builds.scss | 38 -------- app/assets/stylesheets/pages/pipelines.scss | 87 ++++++++++++++++++- .../projects/ci/pipelines/_pipeline.html.haml | 10 +-- app/views/projects/pipelines/index.html.haml | 2 +- 6 files changed, 93 insertions(+), 46 deletions(-) diff --git a/app/assets/stylesheets/framework/avatar.scss b/app/assets/stylesheets/framework/avatar.scss index bb8d71fbae8..8b6ddf8ba18 100644 --- a/app/assets/stylesheets/framework/avatar.scss +++ b/app/assets/stylesheets/framework/avatar.scss @@ -20,6 +20,7 @@ } &.s16 { width: 16px; height: 16px; margin-right: 6px; } + &.s20 { width: 20px; height: 20px; margin-right: 7px; } &.s24 { width: 24px; height: 24px; margin-right: 8px; } &.s26 { width: 26px; height: 26px; margin-right: 8px; } &.s32 { width: 32px; height: 32px; margin-right: 10px; } diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index 4337fab5d87..09d3caa0e6a 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -17,6 +17,7 @@ $focus-border-color: #3aabf0; $table-border-color: #f0f0f0; $background-color: #fafafa; $dark-background-color: #f7f7f7; +$table-text-gray: #8f8f8f; /* * Text diff --git a/app/assets/stylesheets/pages/builds.scss b/app/assets/stylesheets/pages/builds.scss index 76024933650..99a2cd306cf 100644 --- a/app/assets/stylesheets/pages/builds.scss +++ b/app/assets/stylesheets/pages/builds.scss @@ -83,44 +83,6 @@ } } - -.table.builds { - - tr { - th { - padding: 18px 10px; - border: none; - } - } - - tbody { - border-top-width: 1px; - } - - .branch-commit { - - .branch-name { - max-width: 180px; - overflow: hidden; - display: inline-block; - white-space: nowrap; - vertical-align: top; - text-overflow: ellipsis; - margin-left: 10px; - } - - .commit-id { - color: $gl-link-color; - } - } - - .build-link { - a { - color: $gl-dark-link-color; - } - } -} - .build-trace { background: $ci-output-bg; color: $ci-text-color; diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 6128868b670..fb5840a4f67 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -1,12 +1,13 @@ .pipelines { .stage { - max-width: 100px; + max-width: 70px; + width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } - .duration, .finished_at { + .duration, .finished-at { margin: 4px 0; } @@ -22,3 +23,85 @@ margin: 4px; } } + +.content-list.pipelines { + width: 100%; + overflow: auto; +} + +.table.builds { + min-width: 1100px; + + tr { + th { + padding: 18px 10px; + border: none; + } + } + + tbody { + border-top-width: 1px; + } + + .branch-commit { + + .branch-name { + margin-left: 8px; + font-weight: bold; + max-width: 180px; + overflow: hidden; + display: inline-block; + white-space: nowrap; + vertical-align: top; + text-overflow: ellipsis; + } + + .fa { + margin: 0 6px; + } + + .commit-id { + color: $gl-link-color; + margin-right: 8px; + } + + .commit-title { + margin-top: 4px; + max-width: 320px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .avatar { + margin-left: 0; + } + } + + .duration, + .finished-at { + color: $table-text-gray; + + .fa { + margin-right: 5px; + } + } + + .pipeline-actions { + + .btn { + color: $table-text-gray; + } + + .btn-remove { + color: $white-light; + } + } + + .build-link { + + a { + color: $gl-dark-link-color; + } + } +} diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index daeaf7f99eb..b8712b5dc45 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -10,9 +10,8 @@ %span ##{pipeline.id} - if pipeline.ref = link_to pipeline.ref, namespace_project_commits_path(@project.namespace, @project, pipeline.ref), class: "monospace branch-name" - · + = icon("code-fork") = link_to pipeline.short_sha, namespace_project_commit_path(@project.namespace, @project, pipeline.sha), class: "commit-id monospace" -   - if pipeline.tag? %span.label.label-primary tag - elsif pipeline.latest? @@ -26,6 +25,7 @@ %p.commit-title - if commit = pipeline.commit + = commit_author_avatar(commit, size: 20) = link_to_gfm truncate(commit.title, length: 60), namespace_project_commit_path(@project.namespace, @project, commit.id), class: "commit-row-message" - else Cant find HEAD commit for this branch @@ -46,14 +46,14 @@ %td - if pipeline.started_at && pipeline.finished_at %p.duration - = icon("clock-o") + = icon("clock-o") = duration_in_numbers(pipeline.finished_at, pipeline.started_at) - if pipeline.finished_at - %p.duration + %p.finished-at = icon("calendar") #{time_ago_with_tooltip(pipeline.finished_at)} - %td + %td.pipeline-actions .controls.hidden-xs.pull-right - artifacts = pipeline.builds.latest.select { |b| b.artifacts? } - if artifacts.present? diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index e1c82a8179d..4672ff165d3 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -51,7 +51,7 @@ %th.stage %span.has-tooltip{ title: "#{stage.titleize}" } = stage.titleize - %%th + %th %th = render @pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages From 191687a10ce275f98e287876ddf7e69969790e71 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Fri, 8 Jul 2016 14:09:30 -0500 Subject: [PATCH 04/11] Add empty deploy dropdown button --- app/assets/stylesheets/pages/pipelines.scss | 27 ++++++++++++++++++ .../projects/ci/pipelines/_pipeline.html.haml | 28 +++++++++++++------ 2 files changed, 46 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index fb5840a4f67..c73755ee920 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -90,12 +90,35 @@ .pipeline-actions { .btn { + margin: 0; + } + + .dropdown-toggle, + .dropdown-menu { color: $table-text-gray; + + .fa { + color: $table-text-gray; + margin-right: 6px; + font-size: 14px; + } } .btn-remove { color: $white-light; } + + .btn-group { + &.open { + .btn-default { + background-color: $white-normal; + border-color: $border-white-normal; + + &:hover { + } + } + } + } } .build-link { @@ -104,4 +127,8 @@ color: $gl-dark-link-color; } } + + .btn-group.open .dropdown-toggle { + box-shadow: none; + } } diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index b8712b5dc45..4167db3fdcb 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -57,16 +57,26 @@ .controls.hidden-xs.pull-right - artifacts = pipeline.builds.latest.select { |b| b.artifacts? } - if artifacts.present? - .dropdown.inline.build-artifacts - %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'} - = icon('download') - %b.caret - %ul.dropdown-menu.dropdown-menu-align-right - - artifacts.each do |build| + .btn-group.inline + .btn-group + %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} + = icon("play") + %b.caret + %ul.dropdown-menu.dropdown-menu-align-right %li - = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, build), rel: 'nofollow' do - = icon("download") - %span Download '#{build.name}' artifacts + = link_to '#' do + = icon("play") + %span Deploy to production + .btn-group + %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} + = icon("download") + %b.caret + %ul.dropdown-menu.dropdown-menu-align-right + - artifacts.each do |build| + %li + = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, build), rel: 'nofollow' do + = icon("download") + %span Download '#{build.name}' artifacts - if can?(current_user, :update_pipeline, @project) - if pipeline.retryable? From a87a0ffd4429d794644c36ed84e1389ff2922895 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Fri, 8 Jul 2016 14:20:58 -0500 Subject: [PATCH 05/11] Add link to pipline ID --- app/views/projects/ci/pipelines/_pipeline.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 4167db3fdcb..f8c03a430bd 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -7,7 +7,8 @@ %td %div.branch-commit - %span ##{pipeline.id} + = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline.id) do + %span ##{pipeline.id} - if pipeline.ref = link_to pipeline.ref, namespace_project_commits_path(@project.namespace, @project, pipeline.ref), class: "monospace branch-name" = icon("code-fork") From 16fda5f19c2c0fb63105d7cf122360a0afaa29ca Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Mon, 11 Jul 2016 08:38:27 -0500 Subject: [PATCH 06/11] Update builds page --- app/assets/stylesheets/pages/pipelines.scss | 25 +++--- app/views/projects/builds/index.html.haml | 8 +- app/views/projects/ci/builds/_build.html.haml | 84 +++++++++---------- 3 files changed, 58 insertions(+), 59 deletions(-) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index c73755ee920..bd3dc462302 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -7,10 +7,6 @@ white-space: nowrap; } - .duration, .finished-at { - margin: 4px 0; - } - .commit-title { margin: 0; } @@ -24,9 +20,13 @@ } } -.content-list.pipelines { - width: 100%; - overflow: auto; +.content-list { + + &.pipelines, + &.builds-content-list { + width: 100%; + overflow: auto; + } } .table.builds { @@ -76,11 +76,16 @@ .avatar { margin-left: 0; } + + .label-container { + margin-top: 5px; + } } .duration, .finished-at { color: $table-text-gray; + margin: 4px 0; .fa { margin-right: 5px; @@ -91,10 +96,11 @@ .btn { margin: 0; + color: $table-text-gray; } .dropdown-toggle, - .dropdown-menu { + .dropdown-menu { color: $table-text-gray; .fa { @@ -113,9 +119,6 @@ .btn-default { background-color: $white-normal; border-color: $border-white-normal; - - &:hover { - } } } } diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index 381b3754cd5..85c31dfd918 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -36,7 +36,7 @@ = link_to ci_lint_path, class: 'btn btn-default' do %span CI Lint - %ul.content-list + %ul.content-list.builds-content-list - if @builds.blank? %li .nothing-here-block No builds to show @@ -46,14 +46,10 @@ %thead %tr %th Status - %th Build ID %th Commit - %th Ref %th Stage %th Name - %th Tags - %th Duration - %th Finished at + %th - if @project.build_coverage_enabled? %th Coverage %th diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 00004163047..099da5d1c72 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -1,32 +1,45 @@ -%tr.build +%tr.build.commit %td.status - if can?(current_user, :read_build, build) = ci_status_with_icon(build.status, namespace_project_build_url(build.project.namespace, build.project, build)) - else = ci_status_with_icon(build.status) - %td.build-link - - if can?(current_user, :read_build, build) - = link_to namespace_project_build_url(build.project.namespace, build.project, build) do - %strong ##{build.id} - - else - %strong ##{build.id} - - - if build.stuck? - = icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.') - - if defined?(retried) && retried - = icon('warning', class: 'text-warning has-tooltip', title: 'Build was retried.') - - - if defined?(commit_sha) && commit_sha - %td - = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "monospace" - - - if defined?(ref) && ref - %td - - if build.ref - = link_to build.ref, namespace_project_commits_path(build.project.namespace, build.project, build.ref) + %td + %div.branch-commit + - if can?(current_user, :read_build, build) + = link_to namespace_project_build_url(build.project.namespace, build.project, build) do + %span ##{build.id} - else - .light none + %span ##{build.id} + + - if build.stuck? + = icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.') + - if defined?(retried) && retried + = icon('warning', class: 'text-warning has-tooltip', title: 'Build was retried.') + + - if defined?(ref) && ref + - if build.ref + = link_to build.ref, namespace_project_commits_path(build.project.namespace, build.project, build.ref), class: "monospace branch-name" + - else + .light none + = icon("code-fork") + + - if defined?(commit_sha) && commit_sha + = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace" + + .label-container + - if build.tags.any? + - build.tags.each do |tag| + %span.label.label-primary + = tag + - if build.try(:trigger_request) + %span.label.label-info triggered + - if build.try(:allow_failure) + %span.label.label-danger allowed to fail + - if defined?(retried) && retried + %span.label.label-warning retried + - if defined?(runner) && runner %td @@ -43,27 +56,14 @@ = build.name %td - .label-container - - if build.tags.any? - - build.tags.each do |tag| - %span.label.label-primary - = tag - - if build.try(:trigger_request) - %span.label.label-info triggered - - if build.try(:allow_failure) - %span.label.label-danger allowed to fail - - if defined?(retried) && retried - %span.label.label-warning retried - - %td.duration - if build.duration - = icon("clock-o") - #{duration_in_words(build.finished_at, build.started_at)} - - %td.timestamp + %p.duration + = icon("clock-o") + #{duration_in_words(build.finished_at, build.started_at)} - if build.finished_at - = icon("calendar") - %span #{time_ago_with_tooltip(build.finished_at)} + %p.finished-at + = icon("calendar") + %span #{time_ago_with_tooltip(build.finished_at)} - if defined?(coverage) && coverage %td.coverage @@ -81,4 +81,4 @@ = icon('remove', class: 'cred') - elsif defined?(allow_retry) && allow_retry && build.retryable? = link_to retry_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do - = icon('refresh') + = icon('repeat') From 694ab941ea99ca4c4a32ceea090317851390d56f Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Mon, 11 Jul 2016 13:57:12 -0500 Subject: [PATCH 07/11] Rearrange and update admin builds --- app/views/admin/builds/_build.html.haml | 65 ++++++++++--------- app/views/admin/builds/index.html.haml | 10 +-- app/views/projects/ci/builds/_build.html.haml | 18 ++--- .../projects/ci/pipelines/_pipeline.html.haml | 2 +- 4 files changed, 47 insertions(+), 48 deletions(-) diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml index 967151bc33b..ecf0205249a 100644 --- a/app/views/admin/builds/_build.html.haml +++ b/app/views/admin/builds/_build.html.haml @@ -1,31 +1,41 @@ - project = build.project -%tr.build +%tr.build.commit %td.status = ci_status_with_icon(build.status) - %td.build-link - - if can?(current_user, :read_build, build.project) - = link_to namespace_project_build_url(build.project.namespace, build.project, build) do - %strong Build ##{build.id} - - else - %strong Build ##{build.id} + %td + .branch-commit + - if can?(current_user, :read_build, build.project) + = link_to namespace_project_build_url(build.project.namespace, build.project, build) do + %span ##{build.id} + - else + %span ##{build.id} - - if build.stuck? - %i.fa.fa-warning.text-warning + - if build.stuck? + %i.fa.fa-warning.text-warning + + - if build.ref + = link_to build.ref, namespace_project_commits_path(build.project.namespace, build.project, build.ref), class: "monospace branch-name" + - else + .light none + = icon("code-fork") + + = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "monospace commit-id" + + - if build.tags.any? + .label-container + - build.tags.each do |tag| + %span.label.label-primary + = tag + - if build.try(:trigger_request) + %span.label.label-info triggered + - if build.try(:allow_failure) + %span.label.label-danger allowed to fail %td - if project = link_to project.name_with_namespace, admin_namespace_project_path(project.namespace, project) - %td - = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "monospace" - - %td - - if build.ref - = link_to build.ref, namespace_project_commits_path(build.project.namespace, build.project, build.ref) - - else - .light none - %td - if build.try(:runner) = runner_link(build.runner) @@ -36,22 +46,15 @@ #{build.stage} / #{build.name} %td - - if build.tags.any? - - build.tags.each do |tag| - %span.label.label-primary - = tag - - if build.try(:trigger_request) - %span.label.label-info triggered - - if build.try(:allow_failure) - %span.label.label-danger allowed to fail - - %td.duration - if build.duration - #{duration_in_words(build.finished_at, build.started_at)} + %p.duration + = icon("clock-o") + #{duration_in_words(build.finished_at, build.started_at)} - %td.timestamp - if build.finished_at - %span #{time_ago_with_tooltip(build.finished_at)} + %p.finished-at + = icon("calendar") + %span #{time_ago_with_tooltip(build.finished_at)} - if defined?(coverage) && coverage %td.coverage diff --git a/app/views/admin/builds/index.html.haml b/app/views/admin/builds/index.html.haml index 1e60205f91a..9ea3cca0ecb 100644 --- a/app/views/admin/builds/index.html.haml +++ b/app/views/admin/builds/index.html.haml @@ -27,7 +27,7 @@ .row-content-block.second-block #{(@scope || 'all').capitalize} builds - %ul.content-list + %ul.content-list.builds-content-list - if @builds.blank? %li .nothing-here-block No builds to show @@ -37,15 +37,11 @@ %thead %tr %th Status - %th Build ID - %th Project %th Commit - %th Ref + %th Project %th Runner %th Name - %th Tags - %th Duration - %th Finished at + %th %th - @builds.each do |build| diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 099da5d1c72..2099c9f8c5d 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -6,7 +6,7 @@ = ci_status_with_icon(build.status) %td - %div.branch-commit + .branch-commit - if can?(current_user, :read_build, build) = link_to namespace_project_build_url(build.project.namespace, build.project, build) do %span ##{build.id} @@ -28,17 +28,17 @@ - if defined?(commit_sha) && commit_sha = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace" - .label-container - - if build.tags.any? + - if build.tags.any? + .label-container - build.tags.each do |tag| %span.label.label-primary = tag - - if build.try(:trigger_request) - %span.label.label-info triggered - - if build.try(:allow_failure) - %span.label.label-danger allowed to fail - - if defined?(retried) && retried - %span.label.label-warning retried + - if build.try(:trigger_request) + %span.label.label-info triggered + - if build.try(:allow_failure) + %span.label.label-danger allowed to fail + - if defined?(retried) && retried + %span.label.label-warning retried - if defined?(runner) && runner diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index f8c03a430bd..766ea31ef70 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -6,7 +6,7 @@ %td - %div.branch-commit + .branch-commit = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline.id) do %span ##{pipeline.id} - if pipeline.ref From c57471ddb456c9640f6d77128e1fc56c7a5b35b2 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Mon, 11 Jul 2016 14:27:35 -0500 Subject: [PATCH 08/11] Add new stopwatch and commit icons; rename custom icon helper; fix commit pipeline layout --- app/assets/stylesheets/pages/pipelines.scss | 22 +++++++++++++++---- app/helpers/appearances_helper.rb | 2 +- app/views/admin/builds/_build.html.haml | 4 ++-- app/views/projects/ci/builds/_build.html.haml | 4 ++-- .../projects/ci/pipelines/_pipeline.html.haml | 4 ++-- app/views/projects/commit/_pipeline.html.haml | 4 +--- app/views/projects/issues/index.html.haml | 2 +- app/views/shared/icons/_icon_commit.svg | 3 +++ app/views/shared/icons/_icon_timer.svg | 1 + 9 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 app/views/shared/icons/_icon_commit.svg create mode 100644 app/views/shared/icons/_icon_timer.svg diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index bd3dc462302..064bb83e44c 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -1,7 +1,7 @@ .pipelines { .stage { - max-width: 70px; - width: 70px; + max-width: 80px; + width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -34,7 +34,7 @@ tr { th { - padding: 18px 10px; + padding: 16px; border: none; } } @@ -56,8 +56,11 @@ text-overflow: ellipsis; } - .fa { + svg { margin: 0 6px; + height: 14px; + width: auto; + vertical-align: middle; } .commit-id { @@ -88,6 +91,17 @@ margin: 4px 0; .fa { + font-size: 12px; + } + + svg { + height: 12px; + width: auto; + vertical-align: middle; + } + + .fa, + svg { margin-right: 5px; } } diff --git a/app/helpers/appearances_helper.rb b/app/helpers/appearances_helper.rb index 950f323e383..e12a1052988 100644 --- a/app/helpers/appearances_helper.rb +++ b/app/helpers/appearances_helper.rb @@ -31,7 +31,7 @@ module AppearancesHelper end end - def navbar_icon(icon_name, size: 16) + def custom_icon(icon_name, size: 16) render "shared/icons/#{icon_name}.svg", size: size end end diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml index ecf0205249a..c60f81f8936 100644 --- a/app/views/admin/builds/_build.html.haml +++ b/app/views/admin/builds/_build.html.haml @@ -18,7 +18,7 @@ = link_to build.ref, namespace_project_commits_path(build.project.namespace, build.project, build.ref), class: "monospace branch-name" - else .light none - = icon("code-fork") + = custom_icon("icon_commit") = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "monospace commit-id" @@ -48,7 +48,7 @@ %td - if build.duration %p.duration - = icon("clock-o") + = custom_icon("icon_timer") #{duration_in_words(build.finished_at, build.started_at)} - if build.finished_at diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 2099c9f8c5d..0c29658e4d9 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -23,7 +23,7 @@ = link_to build.ref, namespace_project_commits_path(build.project.namespace, build.project, build.ref), class: "monospace branch-name" - else .light none - = icon("code-fork") + = custom_icon("icon_commit") - if defined?(commit_sha) && commit_sha = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace" @@ -58,7 +58,7 @@ %td - if build.duration %p.duration - = icon("clock-o") + = custom_icon("icon_timer") #{duration_in_words(build.finished_at, build.started_at)} - if build.finished_at %p.finished-at diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 766ea31ef70..4ef72ff5d2a 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -11,7 +11,7 @@ %span ##{pipeline.id} - if pipeline.ref = link_to pipeline.ref, namespace_project_commits_path(@project.namespace, @project, pipeline.ref), class: "monospace branch-name" - = icon("code-fork") + = custom_icon("icon_commit") = link_to pipeline.short_sha, namespace_project_commit_path(@project.namespace, @project, pipeline.sha), class: "commit-id monospace" - if pipeline.tag? %span.label.label-primary tag @@ -47,7 +47,7 @@ %td - if pipeline.started_at && pipeline.finished_at %p.duration - = icon("clock-o") + = custom_icon("icon_timer") = duration_in_numbers(pipeline.finished_at, pipeline.started_at) - if pipeline.finished_at %p.finished-at diff --git a/app/views/projects/commit/_pipeline.html.haml b/app/views/projects/commit/_pipeline.html.haml index 0411137b7c6..41fd5459429 100644 --- a/app/views/projects/commit/_pipeline.html.haml +++ b/app/views/projects/commit/_pipeline.html.haml @@ -42,9 +42,7 @@ %th Status %th Build ID %th Name - %th Tags - %th Duration - %th Finished at + %th - if pipeline.project.build_coverage_enabled? %th Coverage %th diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index 312bd86ed04..7612fe3719a 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -32,7 +32,7 @@ Code, test, and deploy together .blank-state .blank-state-icon - = navbar_icon("issues", size: 50) + = custom_icon("issues", size: 50) %h3.blank-state-title You don't have any issues right now. %p.blank-state-text diff --git a/app/views/shared/icons/_icon_commit.svg b/app/views/shared/icons/_icon_commit.svg new file mode 100644 index 00000000000..0e96035b7b7 --- /dev/null +++ b/app/views/shared/icons/_icon_commit.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/views/shared/icons/_icon_timer.svg b/app/views/shared/icons/_icon_timer.svg new file mode 100644 index 00000000000..0b1e5804427 --- /dev/null +++ b/app/views/shared/icons/_icon_timer.svg @@ -0,0 +1 @@ + \ No newline at end of file From 8ed105bf42ed28be1d9c19e2cd6401fb3c89a046 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Mon, 11 Jul 2016 15:36:09 -0500 Subject: [PATCH 09/11] Fix label alignment bug; re-add build-link --- app/assets/stylesheets/pages/pipelines.scss | 5 ++++- app/views/admin/builds/_build.html.haml | 16 ++++++++-------- app/views/projects/ci/builds/_build.html.haml | 16 ++++++++-------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 064bb83e44c..cbf8297f387 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -81,7 +81,10 @@ } .label-container { - margin-top: 5px; + + .label { + margin-top: 5px; + } } } diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml index c60f81f8936..2b5a4628242 100644 --- a/app/views/admin/builds/_build.html.haml +++ b/app/views/admin/builds/_build.html.haml @@ -7,9 +7,9 @@ .branch-commit - if can?(current_user, :read_build, build.project) = link_to namespace_project_build_url(build.project.namespace, build.project, build) do - %span ##{build.id} + %span.build-link ##{build.id} - else - %span ##{build.id} + %span.build-link ##{build.id} - if build.stuck? %i.fa.fa-warning.text-warning @@ -22,15 +22,15 @@ = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "monospace commit-id" - - if build.tags.any? - .label-container + .label-container + - if build.tags.any? - build.tags.each do |tag| %span.label.label-primary = tag - - if build.try(:trigger_request) - %span.label.label-info triggered - - if build.try(:allow_failure) - %span.label.label-danger allowed to fail + - if build.try(:trigger_request) + %span.label.label-info triggered + - if build.try(:allow_failure) + %span.label.label-danger allowed to fail %td - if project diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 0c29658e4d9..f60929d0990 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -28,17 +28,17 @@ - if defined?(commit_sha) && commit_sha = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace" - - if build.tags.any? - .label-container + .label-container + - if build.tags.any? - build.tags.each do |tag| %span.label.label-primary = tag - - if build.try(:trigger_request) - %span.label.label-info triggered - - if build.try(:allow_failure) - %span.label.label-danger allowed to fail - - if defined?(retried) && retried - %span.label.label-warning retried + - if build.try(:trigger_request) + %span.label.label-info triggered + - if build.try(:allow_failure) + %span.label.label-danger allowed to fail + - if defined?(retried) && retried + %span.label.label-warning retried - if defined?(runner) && runner From 843ac2a351d2b957dc60ad3476faacc91d7972d8 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Mon, 11 Jul 2016 16:50:35 -0500 Subject: [PATCH 10/11] Update CHANGELOG --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index a50edf1a797..fafbf3c7edc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -83,6 +83,7 @@ v 8.10.0 (unreleased) - Style of import project buttons were fixed in the new project page. !5183 (rdemirbay) - Fix GitHub client requests when rate limit is disabled - Optimistic locking for Issues and Merge Requests (Title and description overriding prevention) + - Redesign Builds and Pipelines pages v 8.9.6 (unreleased) - Fix importing of events under notes for GitLab projects From 6b5cb2455e8ee9dee2b62ebba4f12e3b258f1a7c Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Mon, 11 Jul 2016 18:23:21 -0500 Subject: [PATCH 11/11] Update duration representation on builds pages --- app/views/admin/builds/_build.html.haml | 2 +- app/views/projects/ci/builds/_build.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml index 2b5a4628242..ce818c30c30 100644 --- a/app/views/admin/builds/_build.html.haml +++ b/app/views/admin/builds/_build.html.haml @@ -49,7 +49,7 @@ - if build.duration %p.duration = custom_icon("icon_timer") - #{duration_in_words(build.finished_at, build.started_at)} + = duration_in_numbers(build.finished_at, build.started_at) - if build.finished_at %p.finished-at diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index f60929d0990..e1b42b2cfa5 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -59,7 +59,7 @@ - if build.duration %p.duration = custom_icon("icon_timer") - #{duration_in_words(build.finished_at, build.started_at)} + = duration_in_numbers(build.finished_at, build.started_at) - if build.finished_at %p.finished-at = icon("calendar")