From da55496b6fc3ef1c65c4369cabb89b874dbc79e6 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Fri, 15 Jul 2016 10:26:15 -0500 Subject: [PATCH] Add new running icon; add a bunch of styles to get svg to match existing fa icons --- app/assets/stylesheets/pages/pipelines.scss | 9 +++++++++ app/assets/stylesheets/pages/projects.scss | 7 +++++++ app/assets/stylesheets/pages/status.scss | 8 ++++++++ app/helpers/ci_status_helper.rb | 4 ++-- .../projects/ci/pipelines/_pipeline.html.haml | 2 +- app/views/shared/icons/_icon_running.svg | 12 ++++++++++++ app/views/shared/icons/_icon_status_cancel.svg | 12 ++++++++++++ app/views/shared/icons/_icon_status_failed.svg | 12 ++++++++++++ app/views/shared/icons/_icon_status_passed.svg | 15 +++++++++++++++ app/views/shared/icons/_icon_status_pending.svg | 13 +++++++++++++ app/views/shared/icons/_icon_status_warning.svg | 15 +++++++++++++++ 11 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 app/views/shared/icons/_icon_running.svg create mode 100644 app/views/shared/icons/_icon_status_cancel.svg create mode 100644 app/views/shared/icons/_icon_status_failed.svg create mode 100644 app/views/shared/icons/_icon_status_passed.svg create mode 100644 app/views/shared/icons/_icon_status_pending.svg create mode 100644 app/views/shared/icons/_icon_status_warning.svg diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index a3b72ec9574..8d411bd658b 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -123,6 +123,15 @@ right: 1px; } } + + .stage-cell { + + svg { + height: 13px; + width: 13px; + margin-left: 3px; + } + } .duration, .finished-at { diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index ea9f7cf0540..5572999d19c 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -536,6 +536,13 @@ pre.light-well { .ci-status { margin-right: $gl-padding; + + &.ci-running { + + svg { + margin-right: 3px; + } + } } .commit-row-message { diff --git a/app/assets/stylesheets/pages/status.scss b/app/assets/stylesheets/pages/status.scss index c6b053150be..8f3d9362a0a 100644 --- a/app/assets/stylesheets/pages/status.scss +++ b/app/assets/stylesheets/pages/status.scss @@ -41,6 +41,14 @@ color: $blue-normal; border-color: $blue-normal; } + + svg { + width: 13px; + height: 13px; + position: relative; + top: 1px; + margin-left: 3px; + } } .ci-status-icon-success { diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index e6c99c9959e..5219a0ff47b 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -32,12 +32,12 @@ module CiStatusHelper when 'pending' 'clock-o' when 'running' - 'spinner' + 'icon_running' else 'circle' end - icon(icon_name + ' fw') + status == 'running' ? custom_icon(icon_name) : icon(icon_name + ' fw') end def render_commit_status(commit, tooltip_placement: 'auto left', cssclass: '') diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 7ae699832f6..26c4ffd2bd4 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -35,7 +35,7 @@ - stages_status = pipeline.statuses.latest.stages_status - stages.each do |stage| - %td + %td.stage-cell - status = stages_status[stage] - tooltip = "#{stage.titleize}: #{status || 'not found'}" - if status diff --git a/app/views/shared/icons/_icon_running.svg b/app/views/shared/icons/_icon_running.svg new file mode 100644 index 00000000000..1b6a29958e6 --- /dev/null +++ b/app/views/shared/icons/_icon_running.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_cancel.svg b/app/views/shared/icons/_icon_status_cancel.svg new file mode 100644 index 00000000000..6a0bc1490c4 --- /dev/null +++ b/app/views/shared/icons/_icon_status_cancel.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_failed.svg b/app/views/shared/icons/_icon_status_failed.svg new file mode 100644 index 00000000000..c41ca18cae7 --- /dev/null +++ b/app/views/shared/icons/_icon_status_failed.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_passed.svg b/app/views/shared/icons/_icon_status_passed.svg new file mode 100644 index 00000000000..260eab013a3 --- /dev/null +++ b/app/views/shared/icons/_icon_status_passed.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_pending.svg b/app/views/shared/icons/_icon_status_pending.svg new file mode 100644 index 00000000000..035cd8b4ccc --- /dev/null +++ b/app/views/shared/icons/_icon_status_pending.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_warning.svg b/app/views/shared/icons/_icon_status_warning.svg new file mode 100644 index 00000000000..d47e7a1c93f --- /dev/null +++ b/app/views/shared/icons/_icon_status_warning.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + -- GitLab