Skip to content
Snippets Groups Projects
Commit 9027fd39 authored by Alex Hanselka's avatar Alex Hanselka
Browse files

Merge branch '11-6-stable-patch-2' into '11-6-stable'

Prepare 11.6.2 release

See merge request gitlab-org/gitlab-ce!24105
parents 598c5a7b 12278e9e
No related branches found
No related tags found
No related merge requests found
Showing
with 87 additions and 36 deletions
Loading
Loading
@@ -181,7 +181,7 @@ gem 'acts-as-taggable-on', '~> 5.0'
gem 'sidekiq', '~> 5.2.1'
gem 'sidekiq-cron', '~> 0.6.0'
gem 'redis-namespace', '~> 1.6.0'
gem 'gitlab-sidekiq-fetcher', '~> 0.1.0', require: 'sidekiq-reliable-fetch'
gem 'gitlab-sidekiq-fetcher', '~> 0.4.0', require: 'sidekiq-reliable-fetch'
 
# Cron Parser
gem 'rufus-scheduler', '~> 3.4'
Loading
Loading
Loading
Loading
@@ -280,7 +280,7 @@ GEM
gitlab-default_value_for (3.1.1)
activerecord (>= 3.2.0, < 6.0)
gitlab-markup (1.6.5)
gitlab-sidekiq-fetcher (0.1.0)
gitlab-sidekiq-fetcher (0.4.0)
sidekiq (~> 5)
gitlab-styles (2.4.1)
rubocop (~> 0.54.0)
Loading
Loading
@@ -1011,7 +1011,7 @@ DEPENDENCIES
github-markup (~> 1.7.0)
gitlab-default_value_for (~> 3.1.1)
gitlab-markup (~> 1.6.5)
gitlab-sidekiq-fetcher (~> 0.1.0)
gitlab-sidekiq-fetcher (~> 0.4.0)
gitlab-styles (~> 2.4)
gitlab_omniauth-ldap (~> 2.0.4)
gon (~> 6.2)
Loading
Loading
Loading
Loading
@@ -277,7 +277,7 @@ GEM
grpc (~> 1.0)
github-markup (1.7.0)
gitlab-markup (1.6.5)
gitlab-sidekiq-fetcher (0.1.0)
gitlab-sidekiq-fetcher (0.4.0)
sidekiq (~> 5)
gitlab-styles (2.4.1)
rubocop (~> 0.54.0)
Loading
Loading
@@ -1002,7 +1002,7 @@ DEPENDENCIES
gitaly-proto (~> 1.3.0)
github-markup (~> 1.7.0)
gitlab-markup (~> 1.6.5)
gitlab-sidekiq-fetcher (~> 0.1.0)
gitlab-sidekiq-fetcher (~> 0.4.0)
gitlab-styles (~> 2.4)
gitlab_omniauth-ldap (~> 2.0.4)
gon (~> 6.2)
Loading
Loading
@@ -1160,4 +1160,4 @@ DEPENDENCIES
wikicloth (= 0.8.1)
 
BUNDLED WITH
1.17.1
1.17.3
Loading
Loading
@@ -14,6 +14,7 @@ import MonitoringButtonComponent from './environment_monitoring.vue';
import CommitComponent from '../../vue_shared/components/commit.vue';
import eventHub from '../event_hub';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import { CLUSTER_TYPE } from '~/clusters/constants';
 
/**
* Environment Item Component
Loading
Loading
@@ -84,6 +85,15 @@ export default {
return this.model && this.model.is_protected;
},
 
/**
* Hide group cluster features which are not currently implemented.
*
* @returns {Boolean}
*/
disableGroupClusterFeatures() {
return this.model && this.model.cluster_type === CLUSTER_TYPE.GROUP;
},
/**
* Returns whether the environment can be stopped.
*
Loading
Loading
@@ -547,6 +557,7 @@ export default {
<terminal-button-component
v-if="model && model.terminal_path"
:terminal-path="model.terminal_path"
:disabled="disableGroupClusterFeatures"
/>
 
<rollback-component
Loading
Loading
Loading
Loading
@@ -19,6 +19,11 @@ export default {
required: false,
default: '',
},
disabled: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
title() {
Loading
Loading
@@ -33,6 +38,7 @@ export default {
:title="title"
:aria-label="title"
:href="terminalPath"
:class="{ disabled: disabled }"
class="btn terminal-button d-none d-sm-none d-md-block"
>
<icon name="terminal" />
Loading
Loading
Loading
Loading
@@ -82,7 +82,7 @@ export function insertMarkdownText({
tag,
cursorOffset,
blockTag,
selected,
selected = '',
wrap,
select,
}) {
Loading
Loading
@@ -212,7 +212,7 @@ export function addMarkdownListeners(form) {
blockTag: $this.data('mdBlock'),
wrap: !$this.data('mdPrepend'),
select: $this.data('mdSelect'),
tagContent: $this.data('mdTagContent').toString(),
tagContent: $this.data('mdTagContent'),
});
});
}
Loading
Loading
Loading
Loading
@@ -65,7 +65,7 @@ export default {
v-if="pipeline.flags.latest"
v-gl-tooltip
class="js-pipeline-url-latest badge badge-success"
title="__('Latest pipeline for this branch')"
:title="__('Latest pipeline for this branch')"
>
latest
</span>
Loading
Loading
@@ -100,7 +100,7 @@ export default {
<span
v-if="pipeline.flags.merge_request"
v-gl-tooltip
title="__('This pipeline is run in a merge request context')"
:title="__('This pipeline is run in a merge request context')"
class="js-pipeline-url-mergerequest badge badge-info"
>
merge request
Loading
Loading
Loading
Loading
@@ -24,7 +24,7 @@
}
}
 
&:not(.use-csslab) table {
table {
@extend .table;
}
 
Loading
Loading
Loading
Loading
@@ -42,7 +42,6 @@
padding: 10px;
text-align: right;
float: left;
line-height: 1;
 
a {
font-family: $monospace-font;
Loading
Loading
@@ -69,3 +68,9 @@
}
}
}
// Vertically aligns <table> line numbers (eg. blame view)
// see https://gitlab.com/gitlab-org/gitlab-ce/issues/54048
td.line-numbers {
line-height: 1;
}
Loading
Loading
@@ -25,8 +25,8 @@
&.w-100 {
// after upgrading to Bootstrap 4.2 we can use $modal-header-padding-x here
// https://github.com/twbs/bootstrap/pull/26976
margin-right: -2rem;
padding-right: 2rem;
margin-right: -28px;
padding-right: 28px;
}
}
 
Loading
Loading
Loading
Loading
@@ -198,6 +198,7 @@ $well-light-text-color: #5b6169;
$gl-font-size: 14px;
$gl-font-size-xs: 11px;
$gl-font-size-small: 12px;
$gl-font-size-medium: 20px;
$gl-font-size-large: 16px;
$gl-font-weight-normal: 400;
$gl-font-weight-bold: 600;
Loading
Loading
Loading
Loading
@@ -28,3 +28,9 @@ $popover-border-width: 1px;
$popover-border-color: $border-color;
$popover-box-shadow: 0 $border-radius-small $border-radius-default 0 $shadow-color;
$popover-arrow-outer-color: $shadow-color;
$h1-font-size: 14px * 2.5;
$h2-font-size: 14px * 2;
$h3-font-size: 14px * 1.75;
$h4-font-size: 14px * 1.5;
$h5-font-size: 14px * 1.25;
$h6-font-size: 14px;
Loading
Loading
@@ -26,6 +26,18 @@ module ApplicationSettingsHelper
end
end
 
def all_protocols_enabled?
Gitlab::CurrentSettings.enabled_git_access_protocol.blank?
end
def ssh_enabled?
all_protocols_enabled? || enabled_protocol == 'ssh'
end
def http_enabled?
all_protocols_enabled? || enabled_protocol == 'http'
end
def enabled_project_button(project, protocol)
case protocol
when 'ssh'
Loading
Loading
Loading
Loading
@@ -106,7 +106,7 @@ module Clusters
def terminals(environment)
with_reactive_cache do |data|
pods = filter_by_label(data[:pods], app: environment.slug)
terminals = pods.flat_map { |pod| terminals_for_pod(api_url, actual_namespace, pod) }
terminals = pods.flat_map { |pod| terminals_for_pod(api_url, actual_namespace, pod) }.compact
terminals.each { |terminal| add_terminal_auth(terminal, terminal_auth) }
end
end
Loading
Loading
# frozen_string_literal: true
 
class Environment < ActiveRecord::Base
include Gitlab::Utils::StrongMemoize
# Used to generate random suffixes for the slug
LETTERS = 'a'..'z'
NUMBERS = '0'..'9'
Loading
Loading
@@ -231,7 +232,9 @@ class Environment < ActiveRecord::Base
end
 
def deployment_platform
project.deployment_platform(environment: self.name)
strong_memoize(:deployment_platform) do
project.deployment_platform(environment: self.name)
end
end
 
private
Loading
Loading
Loading
Loading
@@ -364,8 +364,7 @@ class MergeRequest < ActiveRecord::Base
end
 
def supports_suggestion?
# Should be `true` when removing the FF.
Suggestion.feature_enabled?
true
end
 
# Calls `MergeWorker` to proceed with the merge process and
Loading
Loading
# frozen_string_literal: true
 
class Suggestion < ApplicationRecord
FEATURE_FLAG = :diff_suggestions
belongs_to :note, inverse_of: :suggestions
validates :note, presence: true
validates :commit_id, presence: true, if: :applied?
Loading
Loading
@@ -10,10 +8,6 @@ class Suggestion < ApplicationRecord
delegate :original_position, :position, :diff_file,
:noteable, to: :note
 
def self.feature_enabled?
Feature.enabled?(FEATURE_FLAG)
end
def project
noteable.source_project
end
Loading
Loading
Loading
Loading
@@ -23,6 +23,10 @@ class EnvironmentEntity < Grape::Entity
stop_project_environment_path(environment.project, environment)
end
 
expose :cluster_type, if: ->(environment, _) { cluster_platform_kubernetes? } do |environment|
cluster.cluster_type
end
expose :terminal_path, if: ->(*) { environment.has_terminals? && can_access_terminal? } do |environment|
terminal_project_environment_path(environment.project, environment)
end
Loading
Loading
@@ -48,4 +52,16 @@ class EnvironmentEntity < Grape::Entity
def can_access_terminal?
can?(request.current_user, :create_environment_terminal, environment)
end
def cluster_platform_kubernetes?
deployment_platform && deployment_platform.is_a?(Clusters::Platforms::Kubernetes)
end
def deployment_platform
environment.deployment_platform
end
def cluster
deployment_platform.cluster
end
end
- project = project || @project
 
.git-clone-holder.js-git-clone-holder.input-group
- if allowed_protocols_present?
.input-group-text.clone-dropdown-btn.btn
%span.js-clone-dropdown-label
= enabled_project_button(project, enabled_protocol)
- else
%a#clone-dropdown.input-group-text.btn.btn-primary.btn-xs.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } }
%span.append-right-4.js-clone-dropdown-label
= _('Clone')
= sprite_icon("arrow-down", css_class: "icon")
%form.p-3.dropdown-menu.dropdown-menu-right.dropdown-menu-large.dropdown-menu-selectable.clone-options-dropdown.qa-clone-options
%a#clone-dropdown.input-group-text.btn.btn-primary.btn-xs.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } }
%span.append-right-4.js-clone-dropdown-label
= _('Clone')
= sprite_icon("arrow-down", css_class: "icon")
%ul.p-3.dropdown-menu.dropdown-menu-right.dropdown-menu-large.dropdown-menu-selectable.clone-options-dropdown.qa-clone-options
- if ssh_enabled?
%li.pb-2
%label.label-bold
= _('Clone with SSH')
Loading
Loading
@@ -19,6 +15,7 @@
.input-group-append
= clipboard_button(target: '#ssh_project_clone', title: _("Copy URL to clipboard"), class: "input-group-text btn-default btn-clipboard")
= render_if_exists 'projects/buttons/geo'
- if http_enabled?
%li
%label.label-bold
= _('Clone with %{http_label}') % { http_label: gitlab_config.protocol.upcase }
Loading
Loading
Loading
Loading
@@ -5,6 +5,7 @@
- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests"
- page_description @merge_request.description
- page_card_attributes @merge_request.card_attributes
- suggest_changes_help_path = help_page_path('user/discussions/index.md', anchor: 'suggest-changes')
 
.merge-request{ data: { mr_action: j(params[:tab].presence || 'show'), url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project) } }
= render "projects/merge_requests/mr_title"
Loading
Loading
@@ -67,7 +68,7 @@
noteable_data: serialize_issuable(@merge_request),
noteable_type: 'MergeRequest',
target_type: 'merge_request',
help_page_path: nil,
help_page_path: suggest_changes_help_path,
current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json} }
 
#commits.commits.tab-pane
Loading
Loading
@@ -77,7 +78,7 @@
= render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request)
#js-diffs-app.diffs.tab-pane{ data: { "is-locked" => @merge_request.discussion_locked?,
endpoint: diffs_project_merge_request_path(@project, @merge_request, 'json', request.query_parameters),
help_page_path: nil,
help_page_path: suggest_changes_help_path,
current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json,
project_path: project_path(@merge_request.project)} }
 
Loading
Loading
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