diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-15 00:07:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-15 00:07:19 +0300 |
commit | eaa1d6fdd776adb3df4a820d3b66588541fd2710 (patch) | |
tree | 0dc004c149c477c923f30fd37ed934db1d0fd88d /app | |
parent | c3ccd2fdf136f7b3962ef5243ed6ce01de47d8ef (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
9 files changed, 36 insertions, 40 deletions
diff --git a/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue b/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue index 651662d6395..c0bde3a4411 100644 --- a/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue +++ b/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue @@ -140,9 +140,9 @@ export default { default: '', }, computeMinutes: { - type: String, + type: Number, required: false, - default: '', + default: 0, }, yamlErrors: { type: String, @@ -315,7 +315,7 @@ export default { return cancelable && userPermissions.updatePipeline; }, showComputeMinutes() { - return this.isFinished && this.computeMinutes !== '0.0'; + return this.isFinished && this.computeMinutes; }, }, methods: { diff --git a/app/assets/javascripts/ci/pipeline_details/pipeline_details_header.js b/app/assets/javascripts/ci/pipeline_details/pipeline_details_header.js index 4966b657887..e21ccd835e0 100644 --- a/app/assets/javascripts/ci/pipeline_details/pipeline_details_header.js +++ b/app/assets/javascripts/ci/pipeline_details/pipeline_details_header.js @@ -55,7 +55,7 @@ export const createPipelineDetailsHeaderApp = (elSelector, apolloProvider, graph props: { name, totalJobs, - computeMinutes, + computeMinutes: Number(computeMinutes), yamlErrors, failureReason, refText, diff --git a/app/assets/javascripts/security_configuration/components/continuous_vulnerability_scan.vue b/app/assets/javascripts/security_configuration/components/continuous_vulnerability_scan.vue index 61cbde2107c..df648f665c7 100644 --- a/app/assets/javascripts/security_configuration/components/continuous_vulnerability_scan.vue +++ b/app/assets/javascripts/security_configuration/components/continuous_vulnerability_scan.vue @@ -41,6 +41,12 @@ export default { shouldShowAlert() { return this.errorMessage && !this.isAlertDismissed; }, + hasCvsSection() { + return ( + this.glFeatures.dependencyScanningOnAdvisoryIngestion && + !this.glFeatures.globalDependencyScanningOnAdvisoryIngestion + ); + }, }, methods: { reportError(error) { @@ -80,7 +86,7 @@ export default { </script> <template> - <div v-if="glFeatures.dependencyScanningOnAdvisoryIngestion"> + <div v-if="hasCvsSection"> <h4 class="gl-font-base gl-m-0 gl-mt-6"> {{ $options.i18n.title }} <gl-badge diff --git a/app/assets/stylesheets/pages/events.scss b/app/assets/stylesheets/pages/events.scss index f6c79a4eca2..269b3078495 100644 --- a/app/assets/stylesheets/pages/events.scss +++ b/app/assets/stylesheets/pages/events.scss @@ -158,36 +158,6 @@ } } -@include media-breakpoint-down(xs) { - .event-item { - padding-left: 0; - - .event-user-info { - margin-bottom: $gl-padding-4; - } - - .event-title { - white-space: normal; - overflow: visible; - max-width: 100%; - } - - .system-note-image { - display: none; - } - - .event-body { - margin-top: $gl-padding-4; - margin-right: 0; - padding-left: 0; - } - - .event-item-timestamp { - display: none; - } - } -} - // hide event scope (namespace + project) where it is not necessary .project-activity { .event-scope { diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index e8e8607a0b5..ec9bdc35337 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -1171,3 +1171,17 @@ $system-note-icon-m-left: $avatar-m-left + $icon-size-diff / $avatar-m-ratio; padding: $gl-padding; } } + +.project-activity-item:not(:last-of-type) { + position: relative; + + &::before { + // Avatar width is 32px, connecting line width is 2px. + // To center the line relatively to the avatar it should be positioned 15px from the left: + // (32px (avatar size) - 2px (line thickness)) / 2 = 15px + // stylelint-disable length-zero-no-unit + @include vertical-line(0px, 15px); + top: auto; // Override top to auto align + background: var(--gray-50, $gray-50); + } +} diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 759b0e5f62b..08bee6cbcf8 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -601,7 +601,11 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo when :parsed render json: Gitlab::Json.dump(report_comparison[:data]), status: :ok when :error - render json: { status_reason: report_comparison[:status_reason] }, status: :bad_request + render json: { + errors: [report_comparison[:status_reason]], + status_reason: report_comparison[:status_reason] + }, + status: :bad_request else raise "Failed to build comparison response as comparison yielded unknown status '#{report_comparison[:status]}'" end diff --git a/app/helpers/avatars_helper.rb b/app/helpers/avatars_helper.rb index d62498aea0b..73c74f4e6b3 100644 --- a/app/helpers/avatars_helper.rb +++ b/app/helpers/avatars_helper.rb @@ -59,11 +59,13 @@ module AvatarsHelper end def author_avatar(commit_or_event, options = {}) + css_class = options[:css_class] || "gl-display-none gl-sm-display-inline-block" + user_avatar(options.merge({ user: commit_or_event.author, user_name: commit_or_event.author_name, user_email: commit_or_event.author_email, - css_class: 'd-none d-sm-inline-block' + css_class: css_class })) end diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 769af0d9ef9..ebd0c3aaf6a 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -309,14 +309,14 @@ module EventsHelper base_class = 'system-note-image' classes = current_path?('users#activity') ? "#{event.action_name.parameterize}-icon gl-rounded-full gl-bg-gray-50 gl-line-height-0" : "user-avatar" - content = current_path?('users#activity') ? icon_for_event(event.action_name, size: 14) : author_avatar(event, size: 32) + content = current_path?('users#activity') ? icon_for_event(event.action_name, size: 14) : author_avatar(event, size: 32, css_class: 'gl-display-inline-block') tag.div(class: "#{base_class} #{classes}") { content } end def inline_event_icon(event) unless current_path?('users#activity') - content_tag :span, class: "system-note-image-inline d-none d-sm-flex gl-mr-2 #{event.action_name.parameterize}-icon align-self-center" do + content_tag :span, class: "system-note-image-inline gl-display-flex gl-mr-2 #{event.action_name.parameterize}-icon align-self-center" do next design_event_icon(event.action, size: 14) if event.design? icon_for_event(event.action_name, size: 14) diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml index c28fe7c8330..6eec4cdb7cf 100644 --- a/app/views/events/_event.html.haml +++ b/app/views/events/_event.html.haml @@ -1,7 +1,7 @@ - event = event.present - if event.visible_to_user?(current_user) - .event-item{ class: current_path?('users#activity') ? 'user-profile-activity gl-border-bottom-0 gl-pl-7! gl-pb-3' : '' } + .event-item.gl-border-bottom-0.gl-pb-3{ class: current_path?('users#activity') ? 'gl-pl-7!' : 'project-activity-item' } .event-item-timestamp.gl-font-sm #{time_ago_with_tooltip(event.created_at)} |