diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-04-16 13:26:06 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-04-16 13:26:06 +0000 |
commit | 5af7e8422bdff28fff3cde6cf31a0c6fde21918b (patch) | |
tree | c74a137f4bb9e9c5135445be1ee2e8812b78bdf4 | |
parent | 86be4a6f466205b415de74330dd495a2e8b3c9d0 (diff) | |
parent | 579fa8b8ec7eb38d40c96521f517c9dab8c3b97a (diff) | |
download | gitlab-ce-5af7e8422bdff28fff3cde6cf31a0c6fde21918b.tar.gz |
Merge branch 'gt-fix-styling-for-pages-status' into 'master'
Fix styling for `app/assets/stylesheets/pages/status.scss`
Closes #59929
See merge request gitlab-org/gitlab-ce!26875
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/icons.scss | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/pipelines.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/status.scss | 4 | ||||
-rw-r--r-- | app/helpers/ci_status_helper.rb | 6 | ||||
-rw-r--r-- | app/models/project_services/mock_ci_service.rb | 2 | ||||
-rw-r--r-- | app/presenters/merge_request_presenter.rb | 2 | ||||
-rw-r--r-- | doc/user/project/integrations/mock_ci.md | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/status/build/failed_allowed.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/status/success_warning.rb | 2 | ||||
-rw-r--r-- | spec/javascripts/jobs/mock_data.js | 6 | ||||
-rw-r--r-- | spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/vue_shared/components/ci_badge_link_spec.js | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/build/failed_allowed_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/success_warning_spec.rb | 2 | ||||
-rw-r--r-- | spec/presenters/merge_request_presenter_spec.rb | 4 |
16 files changed, 24 insertions, 24 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js index 58363f632a9..6b3d60a9128 100644 --- a/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js +++ b/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js @@ -112,7 +112,7 @@ export default class MergeRequestStore { this.ciStatus = data.ci_status; this.isPipelineFailed = this.ciStatus === 'failed' || this.ciStatus === 'canceled'; this.isPipelinePassing = - this.ciStatus === 'success' || this.ciStatus === 'success_with_warnings'; + this.ciStatus === 'success' || this.ciStatus === 'success-with-warnings'; this.isPipelineSkipped = this.ciStatus === 'skipped'; this.pipelineDetailedStatus = pipelineStatus; this.isPipelineActive = data.pipeline ? data.pipeline.active : false; diff --git a/app/assets/stylesheets/framework/icons.scss b/app/assets/stylesheets/framework/icons.scss index 3ab61cc5c47..1be5ef276fd 100644 --- a/app/assets/stylesheets/framework/icons.scss +++ b/app/assets/stylesheets/framework/icons.scss @@ -20,8 +20,8 @@ } .ci-status-icon-pending, -.ci-status-icon-failed_with_warnings, -.ci-status-icon-success_with_warnings { +.ci-status-icon-failed-with-warnings, +.ci-status-icon-success-with-warnings { svg { fill: $orange-500; } diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 3e6aa43175e..093fc89a56f 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -785,7 +785,7 @@ } &.ci-status-icon-pending, - &.ci-status-icon-success_with_warnings { + &.ci-status-icon-success-with-warnings { @include mini-pipeline-graph-color($white, $orange-100, $orange-200, $orange-500, $orange-600, $orange-700); } diff --git a/app/assets/stylesheets/pages/status.scss b/app/assets/stylesheets/pages/status.scss index a59bb31bdcb..613f643af3a 100644 --- a/app/assets/stylesheets/pages/status.scss +++ b/app/assets/stylesheets/pages/status.scss @@ -38,8 +38,8 @@ } &.ci-pending, - &.ci-failed_with_warnings, - &.ci-success_with_warnings { + &.ci-failed-with-warnings, + &.ci-success-with-warnings { @include status-color($orange-100, $orange-500, $orange-700); } diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index 355b91a8661..3122d8b5163 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -16,7 +16,7 @@ module CiStatusHelper label = case status when 'success' 'passed' - when 'success_with_warnings' + when 'success-with-warnings' 'passed with warnings' when 'manual' 'waiting for manual action' @@ -37,7 +37,7 @@ module CiStatusHelper case status when 'success' s_('CiStatusText|passed') - when 'success_with_warnings' + when 'success-with-warnings' s_('CiStatusText|passed') when 'manual' s_('CiStatusText|blocked') @@ -71,7 +71,7 @@ module CiStatusHelper case status when 'success' 'status_success' - when 'success_with_warnings' + when 'success-with-warnings' 'status_warning' when 'failed' 'status_failed' diff --git a/app/models/project_services/mock_ci_service.rb b/app/models/project_services/mock_ci_service.rb index d8bba58dcbf..c5e5f4f6400 100644 --- a/app/models/project_services/mock_ci_service.rb +++ b/app/models/project_services/mock_ci_service.rb @@ -2,7 +2,7 @@ # For an example companion mocking service, see https://gitlab.com/gitlab-org/gitlab-mock-ci-service class MockCiService < CiService - ALLOWED_STATES = %w[failed canceled running pending success success_with_warnings skipped not_found].freeze + ALLOWED_STATES = %w[failed canceled running pending success success-with-warnings skipped not_found].freeze prop_accessor :mock_service_url validates :mock_service_url, presence: true, public_url: true, if: :activated? diff --git a/app/presenters/merge_request_presenter.rb b/app/presenters/merge_request_presenter.rb index e4a62deda7a..0c5369ba32c 100644 --- a/app/presenters/merge_request_presenter.rb +++ b/app/presenters/merge_request_presenter.rb @@ -13,7 +13,7 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated def ci_status if pipeline status = pipeline.status - status = "success_with_warnings" if pipeline.success? && pipeline.has_warnings? + status = "success-with-warnings" if pipeline.success? && pipeline.has_warnings? status || "preparing" else diff --git a/doc/user/project/integrations/mock_ci.md b/doc/user/project/integrations/mock_ci.md index 8b1908c46fe..1c64b275d6e 100644 --- a/doc/user/project/integrations/mock_ci.md +++ b/doc/user/project/integrations/mock_ci.md @@ -5,7 +5,7 @@ To set up the mock CI service server, respond to the following endpoints - `commit_status`: `#{project.namespace.path}/#{project.path}/status/#{sha}.json` - - Have your service return `200 { status: ['failed'|'canceled'|'running'|'pending'|'success'|'success_with_warnings'|'skipped'|'not_found'] }` + - Have your service return `200 { status: ['failed'|'canceled'|'running'|'pending'|'success'|'success-with-warnings'|'skipped'|'not_found'] }` - If the service returns a 404, it is interpreted as `pending` - `build_page`: `#{project.namespace.path}/#{project.path}/status/#{sha}` - Just where the build is linked to, doesn't matter if implemented diff --git a/lib/gitlab/ci/status/build/failed_allowed.rb b/lib/gitlab/ci/status/build/failed_allowed.rb index d7570fdd3e2..8972498a069 100644 --- a/lib/gitlab/ci/status/build/failed_allowed.rb +++ b/lib/gitlab/ci/status/build/failed_allowed.rb @@ -14,7 +14,7 @@ module Gitlab end def group - 'failed_with_warnings' + 'failed-with-warnings' end def status_tooltip diff --git a/lib/gitlab/ci/status/success_warning.rb b/lib/gitlab/ci/status/success_warning.rb index 6632cd9b143..47623ad945f 100644 --- a/lib/gitlab/ci/status/success_warning.rb +++ b/lib/gitlab/ci/status/success_warning.rb @@ -21,7 +21,7 @@ module Gitlab end def group - 'success_with_warnings' + 'success-with-warnings' end def self.matches?(subject, user) diff --git a/spec/javascripts/jobs/mock_data.js b/spec/javascripts/jobs/mock_data.js index 0398f184c0a..1a7f338c5fa 100644 --- a/spec/javascripts/jobs/mock_data.js +++ b/spec/javascripts/jobs/mock_data.js @@ -678,7 +678,7 @@ export const stages = [ icon: 'status_warning', text: 'failed', label: 'failed (allowed to fail)', - group: 'failed_with_warnings', + group: 'failed-with-warnings', tooltip: 'failed - (unknown failure) (allowed to fail)', has_details: true, details_path: '/gitlab-org/gitlab-shell/-/jobs/454', @@ -710,7 +710,7 @@ export const stages = [ icon: 'status_warning', text: 'failed', label: 'failed (allowed to fail)', - group: 'failed_with_warnings', + group: 'failed-with-warnings', tooltip: 'failed - (unknown failure) (allowed to fail)', has_details: true, details_path: '/gitlab-org/gitlab-shell/-/jobs/454', @@ -738,7 +738,7 @@ export const stages = [ icon: 'status_warning', text: 'passed', label: 'passed with warnings', - group: 'success_with_warnings', + group: 'success-with-warnings', tooltip: 'passed', has_details: true, details_path: '/gitlab-org/gitlab-shell/pipelines/27#test', diff --git a/spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js b/spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js index c226704694c..e2cd0f084fd 100644 --- a/spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js +++ b/spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js @@ -36,8 +36,8 @@ describe('MergeRequestStore', () => { expect(store.isPipelinePassing).toBe(true); }); - it('is true when the CI status is `success_with_warnings`', () => { - store.setData({ ...mockData, ci_status: 'success_with_warnings' }); + it('is true when the CI status is `success-with-warnings`', () => { + store.setData({ ...mockData, ci_status: 'success-with-warnings' }); expect(store.isPipelinePassing).toBe(true); }); diff --git a/spec/javascripts/vue_shared/components/ci_badge_link_spec.js b/spec/javascripts/vue_shared/components/ci_badge_link_spec.js index 4b0b7ba66e5..42481f8c334 100644 --- a/spec/javascripts/vue_shared/components/ci_badge_link_spec.js +++ b/spec/javascripts/vue_shared/components/ci_badge_link_spec.js @@ -59,7 +59,7 @@ describe('CI Badge Link Component', () => { success_warining: { text: 'passed', label: 'passed', - group: 'success_with_warnings', + group: 'success-with-warnings', icon: 'status_warning', details_path: 'status/warning', }, diff --git a/spec/lib/gitlab/ci/status/build/failed_allowed_spec.rb b/spec/lib/gitlab/ci/status/build/failed_allowed_spec.rb index af03d5a1308..2a5915d75d0 100644 --- a/spec/lib/gitlab/ci/status/build/failed_allowed_spec.rb +++ b/spec/lib/gitlab/ci/status/build/failed_allowed_spec.rb @@ -31,7 +31,7 @@ describe Gitlab::Ci::Status::Build::FailedAllowed do describe '#group' do it 'returns status failed with warnings status group' do - expect(subject.group).to eq 'failed_with_warnings' + expect(subject.group).to eq 'failed-with-warnings' end end diff --git a/spec/lib/gitlab/ci/status/success_warning_spec.rb b/spec/lib/gitlab/ci/status/success_warning_spec.rb index 6d05545d1d8..9493b1d89f2 100644 --- a/spec/lib/gitlab/ci/status/success_warning_spec.rb +++ b/spec/lib/gitlab/ci/status/success_warning_spec.rb @@ -20,7 +20,7 @@ describe Gitlab::Ci::Status::SuccessWarning do end describe '#group' do - it { expect(subject.group).to eq 'success_with_warnings' } + it { expect(subject.group).to eq 'success-with-warnings' } end describe '.matches?' do diff --git a/spec/presenters/merge_request_presenter_spec.rb b/spec/presenters/merge_request_presenter_spec.rb index 4a0f91c4c7a..e5f08aeb1fa 100644 --- a/spec/presenters/merge_request_presenter_spec.rb +++ b/spec/presenters/merge_request_presenter_spec.rb @@ -40,8 +40,8 @@ describe MergeRequestPresenter do allow(pipeline).to receive(:has_warnings?) { true } end - it 'returns "success_with_warnings"' do - is_expected.to eq('success_with_warnings') + it 'returns "success-with-warnings"' do + is_expected.to eq('success-with-warnings') end end |