Skip to content
Snippets Groups Projects
Commit 508430d6 authored by Alex Hanselka's avatar Alex Hanselka :palm_tree:
Browse files

Merge branch '11-7-stable-patch-5' into '11-7-stable'

Prepare 11.7.5 release

See merge request gitlab-org/gitlab-ce!24941
parents 483018c7 c28360c5
No related branches found
No related tags found
Loading
Pipeline #46279013 passed
Showing
with 67 additions and 35 deletions
......@@ -4,10 +4,6 @@ import store from './store';
import ErrorTrackingList from './components/error_tracking_list.vue';
export default () => {
if (!gon.features.errorTracking) {
return;
}
// eslint-disable-next-line no-new
new Vue({
el: '#js-error_tracking',
......
......@@ -415,12 +415,13 @@ export const submitSuggestion = (
commit(types.APPLY_SUGGESTION, { discussionId, noteId, suggestionId });
callback();
})
.catch(() => {
Flash(
__('Something went wrong while applying the suggestion. Please try again.'),
'alert',
flashContainer,
.catch(err => {
const defaultMessage = __(
'Something went wrong while applying the suggestion. Please try again.',
);
const flashMessage = err.response.data ? `${err.response.data.message}.` : defaultMessage;
Flash(__(flashMessage), 'alert', flashContainer);
callback();
});
};
......
import $ from 'jquery';
import ZenMode from '~/zen_mode';
import GLForm from '~/gl_form';
document.addEventListener('DOMContentLoaded', () => {
new ZenMode(); // eslint-disable-line no-new
new GLForm($('.release-form')); // eslint-disable-line no-new
});
# frozen_string_literal: true
class Projects::ErrorTrackingController < Projects::ApplicationController
before_action :check_feature_flag!
before_action :authorize_read_sentry_issue!
before_action :push_feature_flag_to_frontend
POLLING_INTERVAL = 10_000
......@@ -43,12 +41,4 @@ def serialize_errors(errors)
.new(project: project, user: current_user)
.represent(errors)
end
def check_feature_flag!
render_404 unless Feature.enabled?(:error_tracking, project)
end
def push_feature_flag_to_frontend
push_frontend_feature_flag(:error_tracking, current_user)
end
end
......@@ -285,7 +285,7 @@ def show_issue_count?(disabled: false, compact_mode: false)
# overridden in EE
def settings_operations_available?
Feature.enabled?(:error_tracking, @project) && can?(current_user, :read_environment, @project)
can?(current_user, :read_environment, @project)
end
private
......@@ -328,7 +328,7 @@ def get_project_nav_tabs(project, current_user)
def external_nav_tabs(project)
[].tap do |tabs|
tabs << :external_issue_tracker if project.external_issue_tracker
tabs << :external_wiki if project.has_external_wiki?
tabs << :external_wiki if project.external_wiki
end
end
......
......@@ -44,7 +44,11 @@ def favicon_path
private
def logo_system_path(logo, mount_type)
return unless logo&.upload
# Legacy attachments may not have have an associated Upload record,
# so fallback to the AttachmentUploader#url if this is the
# case. AttachmentUploader#path doesn't work because for a local
# file, this is an absolute path to the file.
return logo&.url unless logo&.upload
# If we're using a CDN, we need to use the full URL
asset_host = ActionController::Base.asset_host
......
......@@ -525,6 +525,8 @@ def blob_at(sha, path)
# items is an Array like: [[oid, path], [oid1, path1]]
def blobs_at(items)
return [] unless exists?
raw_repository.batch_blobs(items).map { |blob| Blob.decorate(blob, project) }
end
......
......@@ -54,7 +54,7 @@ def initialize(project:, url:, compare_host_keys: nil)
# Needed for reactive caching
def self.primary_key
'id'
:id
end
def id
......
......@@ -11,7 +11,7 @@ def execute(suggestion)
return error('Suggestion is not appliable')
end
unless latest_diff_refs?(suggestion)
unless latest_source_head?(suggestion)
return error('The file has been changed')
end
......@@ -29,12 +29,13 @@ def execute(suggestion)
private
# Checks whether the latest diff refs for the branch matches with
# the position refs we're using to update the file content. Since
# the persisted refs are updated async (for MergeRequest),
# it's more consistent to fetch this data directly from the repository.
def latest_diff_refs?(suggestion)
suggestion.position.diff_refs == suggestion.noteable.repository_diff_refs
# Checks whether the latest source branch HEAD matches with
# the position HEAD we're using to update the file content. Since
# the persisted HEAD is updated async (for MergeRequest),
# it's more consistent to fetch this data directly from the
# repository.
def latest_source_head?(suggestion)
suggestion.position.head_sha == suggestion.noteable.source_branch_sha
end
def file_update_params(suggestion)
......
......@@ -227,7 +227,7 @@
%span
= _('Environments')
- if project_nav_tab?(:error_tracking) && Feature.enabled?(:error_tracking, @project)
- if project_nav_tab?(:error_tracking)
= nav_link(controller: :error_tracking) do
= link_to project_error_tracking_index_path(@project), title: _('Error Tracking'), class: 'shortcuts-tracking qa-operations-tracking-link' do
%span
......
%div{ class: container_class }
.nav-block.d-none.d-sm-block.activities
.nav-block.d-none.d-sm-flex.activities
= render 'shared/event_filter'
.controls
= link_to project_path(@project, rss_url_options), title: s_("ProjectActivityRSS|Subscribe"), class: 'btn d-none d-sm-inline-block has-tooltip' do
......
- return unless Feature.enabled?(:error_tracking, @project) && can?(current_user, :read_environment, @project)
- return unless can?(current_user, :read_environment, @project)
- setting = error_tracking_setting
......
......@@ -28,7 +28,7 @@
= render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name]
- if can?(current_user, :push_code, @project)
= link_to edit_project_tag_release_path(@project, tag.name), class: 'btn has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do
= link_to edit_project_tag_release_path(@project, tag.name), class: 'btn btn-edit has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do
= icon("pencil")
- if can?(current_user, :admin_project, @project)
......
......@@ -20,7 +20,7 @@
.nav-controls.controls-flex
- if can?(current_user, :push_code, @project)
= link_to edit_project_tag_release_path(@project, @tag.name), class: 'btn controls-item has-tooltip', title: s_('TagsPage|Edit release notes') do
= link_to edit_project_tag_release_path(@project, @tag.name), class: 'btn btn-edit controls-item has-tooltip', title: s_('TagsPage|Edit release notes') do
= icon("pencil")
= link_to project_tree_path(@project, @tag.name), class: 'btn controls-item has-tooltip', title: s_('TagsPage|Browse files') do
= icon('files-o')
......
---
title: Fix form functionality for edit tag page
merge_request: 24645
author:
type: fixed
---
title: Changed external wiki query method to prevent attribute caching
merge_request: 24907
author:
type: fixed
---
title: Adjusts suggestions unable to be applied
merge_request: 24603
author:
type: fixed
---
title: Fix Detect Host Keys not working
merge_request: 24884
author:
type: fixed
---
title: Fix 500 errors with legacy appearance logos
merge_request: 24615
author:
type: fixed
---
title: Downcase aliased OAuth2 callback providers
merge_request: 24877
author:
type: fixed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment