Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-05-24 09:18:22 +00:00
parent 8ed2760d39
commit 852aade153
124 changed files with 565 additions and 402 deletions

View File

@ -2,26 +2,6 @@
# Cop supports --autocorrect.
Layout/SpaceInLambdaLiteral:
Exclude:
- 'app/models/clusters/agent.rb'
- 'app/models/clusters/agent_token.rb'
- 'app/models/clusters/agents/activity_event.rb'
- 'app/models/clusters/cluster.rb'
- 'app/models/clusters/kubernetes_namespace.rb'
- 'app/models/commit_status.rb'
- 'app/models/concerns/analytics/cycle_analytics/stage_event_model.rb'
- 'app/models/concerns/approvable.rb'
- 'app/models/concerns/ci/artifactable.rb'
- 'app/models/concerns/ci/has_status.rb'
- 'app/models/concerns/ci/has_variable.rb'
- 'app/models/concerns/has_environment_scope.rb'
- 'app/models/concerns/id_in_ordered.rb'
- 'app/models/concerns/incident_management/escalatable.rb'
- 'app/models/concerns/issuable.rb'
- 'app/models/concerns/mentionable.rb'
- 'app/models/concerns/milestoneable.rb'
- 'app/models/concerns/reactive_caching.rb'
- 'app/models/concerns/shardable.rb'
- 'app/models/concerns/timebox.rb'
- 'app/models/jira_connect_installation.rb'
- 'app/models/jira_connect_subscription.rb'
- 'app/models/jira_import_state.rb'

View File

@ -33,19 +33,6 @@ Lint/AmbiguousOperatorPrecedence:
- 'lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb'
- 'lib/gitlab/database/postgres_hll/buckets.rb'
- 'lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb'
- 'scripts/packages/automated_cleanup.rb'
- 'scripts/perf/gc/print_gc_stats.rb'
- 'scripts/perf/query_limiting_report.rb'
- 'scripts/review_apps/automated_cleanup.rb'
- 'spec/controllers/projects/issues_controller_spec.rb'
- 'spec/controllers/search_controller_spec.rb'
- 'spec/helpers/time_helper_spec.rb'
- 'spec/lib/api/helpers/pagination_strategies_spec.rb'
- 'spec/lib/banzai/filter/front_matter_filter_spec.rb'
- 'spec/lib/gitlab/ci/ansi2json/line_spec.rb'
- 'spec/lib/gitlab/ci/runner_releases_spec.rb'
- 'spec/lib/gitlab/ci/trace/chunked_io_spec.rb'
- 'spec/lib/gitlab/ci/trace/stream_spec.rb'
- 'spec/lib/gitlab/conan_token_spec.rb'
- 'spec/lib/gitlab/database/background_migration/batched_job_spec.rb'
- 'spec/lib/gitlab/database/batch_count_spec.rb'

View File

@ -99,7 +99,7 @@ export default {
:items="messages"
:fields="$options.fields"
:tbody-tr-attr="{ 'data-testid': 'message-row' }"
class="gl-mt-n1 gl-mb-n2"
class="-gl-mt-1 gl-mb-n2"
stacked="md"
>
<template #cell(preview)="{ item: { message, theme, broadcast_type, dismissable } }">

View File

@ -217,7 +217,7 @@ export default {
:fields="$options.fields"
stacked="md"
data-testid="deploy-keys-list"
class="gl-mt-n1 gl-mb-n2"
class="-gl-mt-1 gl-mb-n2"
>
<template #table-busy>
<gl-loading-icon size="sm" class="gl-my-5" />

View File

@ -180,7 +180,7 @@ export default {
</template>
<template #cell(actions)="{ item }">
<gl-button-group class="gl-ml-3 gl-mt-n2 gl-mb-n2">
<gl-button-group class="gl-ml-3 -gl-mt-2 gl-mb-n2">
<gl-button
icon="settings"
:aria-label="$options.i18n.editIntegration"

View File

@ -357,7 +357,7 @@ export default {
<gl-tab :title="$options.i18n.settingsTabs.currentIntegrations">
<gl-alert
v-if="showSuccessfulCreateAlert"
class="gl-mt-n2"
class="-gl-mt-2"
:primary-button-text="$options.i18n.integrationCreated.btnCaption"
:title="$options.i18n.integrationCreated.title"
@primaryAction="viewCreatedIntegration"

View File

@ -105,7 +105,7 @@ export default {
title: $options.i18n.moveCardText,
boundary: 'viewport',
}"
class="move-to-position gl-display-block gl-mb-2 gl-ml-auto gl-mt-n3 gl-mr-n3 js-no-trigger"
class="move-to-position gl-display-block gl-mb-2 gl-ml-auto -gl-mt-3 gl-mr-n3 js-no-trigger"
category="tertiary"
:items="$options.BOARD_CARD_MOVE_TO_POSITIONS_OPTIONS"
icon="ellipsis_v"

View File

@ -94,7 +94,7 @@ export default {
</gl-tooltip>
</div>
</div>
<div class="gl-font-monospace gl-white-space-pre-line gl-font-sm gl-mt-n5">
<div class="gl-font-monospace gl-white-space-pre-line gl-font-sm -gl-mt-5">
{{ template.content }}
</div>
<gl-modal

View File

@ -157,7 +157,7 @@ export default {
<div class="gl-relative">
<gl-button
v-gl-tooltip
class="gl-absolute gl-mt-n3 gl-ml-2"
class="gl-absolute -gl-mt-3 gl-ml-2"
variant="default"
category="tertiary"
size="medium"

View File

@ -172,7 +172,7 @@ export default {
v-if="node.attrs.showPreview"
:contenteditable="false"
data-testid="sandbox-preview"
class="gl-mt-n3! gl-ml-n4! gl-mr-n4! gl-mb-3 gl-bg-white! gl-p-4 gl-border-b-1 gl-border-b-solid gl-border-b-gray-100"
class="!-gl-mt-3 gl-ml-n4! gl-mr-n4! gl-mb-3 gl-bg-white! gl-p-4 gl-border-b-1 gl-border-b-solid gl-border-b-gray-100"
>
<sandboxed-mermaid v-if="node.attrs.language === 'mermaid'" :source="diagramSource" />
<img v-else ref="diagramContainer" :src="diagramUrl" />

View File

@ -127,7 +127,7 @@ export default {
{{ item.cronTimezone.formattedTimezone }}
</template>
<template #cell(actions)="{ item }">
<div class="gl-display-flex gl-justify-content-end gl-mt-n2 gl-mb-n2">
<div class="gl-display-flex gl-justify-content-end -gl-mt-2 gl-mb-n2">
<gl-button
v-gl-modal.deploy-freeze-modal
icon="pencil"

View File

@ -309,7 +309,7 @@ export default {
<imported-badge v-if="isImported" :importable-type="$options.TYPE_COMMENT" size="sm" />
</span>
</div>
<div class="gl-display-flex gl-align-items-flex-start gl-mt-n2 gl-mr-n2">
<div class="gl-display-flex gl-align-items-flex-start -gl-mt-2 gl-mr-n2">
<slot name="resolve-discussion"></slot>
<emoji-picker
v-if="canAwardEmoji"

View File

@ -102,7 +102,7 @@ export default {
};
</script>
<template>
<div v-if="clusterAgent" class="gl-p-5 gl-bg-gray-10 gl-mt-n3">
<div v-if="clusterAgent" class="gl-p-5 gl-bg-gray-10 -gl-mt-3">
<div
class="gl-display-flex gl-flex-wrap gl-justify-content-space-between gl-align-items-center"
>

View File

@ -145,7 +145,7 @@ export default {
<gl-tabs
v-model="currentTabIndex"
content-class="gl-leading-reset"
class="gl-mt-n3"
class="-gl-mt-3"
data-testid="incident-tabs"
>
<gl-tab :title="$options.i18n.summaryTitle" data-testid="summary-tab">

View File

@ -130,7 +130,7 @@ export default {
</script>
<template>
<div class="issuable-discussion incident-timeline-events gl-mt-n3">
<div class="issuable-discussion incident-timeline-events -gl-mt-3">
<div
v-for="[eventDate, events] in dateGroupedEvents"
:key="eventDate"

View File

@ -82,7 +82,7 @@ export default {
:copy-button-title="$options.COPY_SECRET"
:value="secret"
readonly
class="gl-mt-n3 gl-mb-0"
class="-gl-mt-3 gl-mb-0"
>
<template #description>
{{ $options.DESCRIPTION_SECRET }}

View File

@ -428,7 +428,7 @@ export default {
:aria-label="detailsShowing ? __('Collapse') : __('Expand')"
data-testid="toggle-details-button"
category="tertiary"
class="gl-mt-n2!"
class="!-gl-mt-2"
size="small"
@click="
toggleDetails();

View File

@ -352,7 +352,7 @@ export default {
</div>
</div>
<p class="gl-mt-n3 gl-text-gray-500">
<p class="-gl-mt-3 gl-text-gray-500">
{{ s__('ForkProject|Want to organize several dependent projects under the same namespace?') }}
<gl-link :href="newGroupPath" target="_blank">
{{ s__('ForkProject|Create a group') }}

View File

@ -3,9 +3,9 @@ import { initToggle } from '~/toggles';
function updateVisibility(selector, isVisible) {
Array.from(document.querySelectorAll(selector)).forEach((el) => {
if (isVisible) {
el.classList.remove('d-none');
el.classList.remove('!gl-hidden');
} else {
el.classList.add('d-none');
el.classList.add('!gl-hidden');
}
});
}

View File

@ -669,7 +669,7 @@ export default {
/>
<input v-model="enforceAuthChecksOnUploads" type="checkbox" />
{{ s__('ProjectSettings|Require authentication to view media files') }}
<span class="gl-text-gray-500 gl-display-block gl-ml-5 gl-mt-n3">{{
<span class="gl-text-gray-500 gl-display-block gl-ml-5 -gl-mt-3">{{
s__('ProjectSettings|Prevents direct linking to potentially sensitive media files')
}}</span>
</label>

View File

@ -199,7 +199,7 @@ export default {
<gl-alert
v-if="alertMessage"
variant="warning"
class="gl-mt-n5 gl-mb-4 gl-mx-n5"
class="-gl-mt-5 gl-mb-4 gl-mx-n5"
@dismiss="dismissAlert"
>
{{ alertMessage }}

View File

@ -56,7 +56,7 @@ export default {
<search-result-hover-layover :text-message="$options.i18n.OVERLAY_SEARCH">
<gl-icon
name="search-results"
class="gl-flex-shrink-0 gl-mr-2 gl-pt-2 gl-mt-n2 gl-text-gray-500"
class="gl-flex-shrink-0 gl-mr-2 gl-pt-2 -gl-mt-2 gl-text-gray-500"
/>
<span class="gl-flex-grow-1">
{{ item.scopeName }}

View File

@ -90,7 +90,7 @@ export default {
</template>
<div class="row">
<div
class="col-md-5 order-md-last col-12 gl-mt-5 gl-md-mt-n2! gl-md-pt-2 svg-content svg-225"
class="col-md-5 order-md-last col-12 gl-mt-5 md:!-gl-mt-2 gl-md-pt-2 svg-content svg-225"
>
<img data-testid="pipeline-image" :src="pipelineSvgPath" />
</div>

View File

@ -86,7 +86,7 @@ class LabelsFinder < UnionFinder
def by_search(labels)
return labels unless search?
labels.search(params[:search])
labels.search(params[:search], search_in: params[:search_in])
end
def by_subscription(labels)

View File

@ -12,6 +12,10 @@ module Resolvers
required: false,
description: 'Search term to find labels with.'
argument :search_in, [Types::Issuables::Labels::SearchFieldListEnum],
default_value: [:title, :description],
description: 'Specify which fields to search in.'
argument :include_ancestor_groups, GraphQL::Types::Boolean,
required: false,
description: 'Include labels from ancestor groups.',

View File

@ -0,0 +1,17 @@
# frozen_string_literal: true
module Types
module Issuables
module Labels
# rubocop: disable Search/NamespacedClass -- not search related
class SearchFieldListEnum < BaseEnum
graphql_name 'LabelSearchFieldList'
description 'List of fields where the provided searchTerm should be looked up'
value 'TITLE', 'Search in the label title.', value: :title
value 'DESCRIPTION', 'Search in the label description.', value: :description
end
# rubocop: enable Search/NamespacedClass
end
end
end

View File

@ -33,8 +33,8 @@ module Clusters
has_many :environments, class_name: '::Environment', inverse_of: :cluster_agent, foreign_key: :cluster_agent_id
scope :ordered_by_name, -> { order(:name) }
scope :with_name, -> (name) { where(name: name) }
scope :has_vulnerabilities, -> (value = true) { where(has_vulnerabilities: value) }
scope :with_name, ->(name) { where(name: name) }
scope :has_vulnerabilities, ->(value = true) { where(has_vulnerabilities: value) }
validates :name,
presence: true,

View File

@ -25,7 +25,7 @@ module Clusters
validates :name, presence: true, length: { maximum: 255 }
scope :order_last_used_at_desc, -> { order(arel_table[:last_used_at].desc.nulls_last) }
scope :with_status, -> (status) { where(status: status) }
scope :with_status, ->(status) { where(status: status) }
scope :active, -> { where(status: :active) }
scope :connected, -> { active.where("last_used_at > ?", Clusters::Agent::INACTIVE_AFTER.ago) }

View File

@ -13,7 +13,7 @@ module Clusters
belongs_to :agent_token, class_name: 'Clusters::AgentToken'
scope :in_timeline_order, -> { order(recorded_at: :desc, id: :desc) }
scope :recorded_before, -> (cutoff) { where('recorded_at < ?', cutoff) }
scope :recorded_before, ->(cutoff) { where('recorded_at < ?', cutoff) }
validates :recorded_at, :kind, :level, presence: true

View File

@ -103,11 +103,11 @@ module Clusters
scope :default_environment, -> { where(environment_scope: DEFAULT_ENVIRONMENT) }
scope :with_management_project, -> { where.not(management_project: nil) }
scope :for_project_namespace, -> (namespace_id) { joins(:projects).where(projects: { namespace_id: namespace_id }) }
scope :with_name, -> (name) { where(name: name) }
scope :for_project_namespace, ->(namespace_id) { joins(:projects).where(projects: { namespace_id: namespace_id }) }
scope :with_name, ->(name) { where(name: name) }
scope :with_integration_prometheus, -> { includes(:integration_prometheus).joins(:integration_prometheus) }
scope :with_project_http_integrations, -> (project_ids) do
scope :with_project_http_integrations, ->(project_ids) do
conditions = { projects: :alert_management_http_integrations }
includes(conditions).joins(conditions).where(projects: { id: project_ids })
end

View File

@ -27,7 +27,7 @@ module Clusters
algorithm: 'aes-256-cbc'
scope :has_service_account_token, -> { where.not(encrypted_service_account_token: nil) }
scope :with_environment_name, -> (name) { joins(:environment).where(environments: { name: name }) }
scope :with_environment_name, ->(name) { joins(:environment).where(environments: { name: name }) }
def token_name
"#{namespace}-token"

View File

@ -69,12 +69,12 @@ class CommitStatus < Ci::ApplicationRecord
scope :latest_ordered, -> { latest.ordered.includes(project: :namespace) }
scope :retried_ordered, -> { retried.order(name: :asc, id: :desc).includes(project: :namespace) }
scope :ordered_by_pipeline, -> { order(pipeline_id: :asc) }
scope :before_stage, -> (index) { where('stage_idx < ?', index) }
scope :for_stage, -> (index) { where(stage_idx: index) }
scope :after_stage, -> (index) { where('stage_idx > ?', index) }
scope :for_project, -> (project_id) { where(project_id: project_id) }
scope :for_ref, -> (ref) { where(ref: ref) }
scope :by_name, -> (name) { where(name: name) }
scope :before_stage, ->(index) { where('stage_idx < ?', index) }
scope :for_stage, ->(index) { where(stage_idx: index) }
scope :after_stage, ->(index) { where('stage_idx > ?', index) }
scope :for_project, ->(project_id) { where(project_id: project_id) }
scope :for_ref, ->(ref) { where(ref: ref) }
scope :by_name, ->(name) { where(name: name) }
scope :in_pipelines, ->(pipelines) { where(pipeline: pipelines) }
scope :with_pipeline, -> { joins(:pipeline) }
scope :updated_at_before, ->(date) { where("#{quoted_table_name}.updated_at < ?", date) }
@ -86,7 +86,7 @@ class CommitStatus < Ci::ApplicationRecord
scope :with_type, ->(type) { where(type: type) }
# The scope applies `pluck` to split the queries. Use with care.
scope :for_project_paths, -> (paths) do
scope :for_project_paths, ->(paths) do
# Pluck is used to split this query. Splitting the query is required for database decomposition for `ci_*` tables.
# https://docs.gitlab.com/ee/development/database/transaction_guidelines.html#database-decomposition-and-sharding
project_ids = Project.where_full_path_in(Array(paths), preload_routes: false).pluck(:id)
@ -107,7 +107,7 @@ class CommitStatus < Ci::ApplicationRecord
.where(arel_table[:partition_id].eq(Ci::Pipeline.arel_table[:partition_id]))
end
scope :match_id_and_lock_version, -> (items) do
scope :match_id_and_lock_version, ->(items) do
# it expects that items are an array of attributes to match
# each hash needs to have `id` and `lock_version`
or_conditions = items.inject(none) do |relation, item|

View File

@ -11,21 +11,21 @@ module Analytics
scope :by_stage_event_hash_id, ->(id) { where(stage_event_hash_id: id) }
scope :by_project_id, ->(id) { where(project_id: id) }
scope :by_group_id, ->(id) { where(group_id: id) }
scope :end_event_timestamp_after, -> (date) { where(arel_table[:end_event_timestamp].gteq(date)) }
scope :end_event_timestamp_before, -> (date) { where(arel_table[:end_event_timestamp].lteq(date)) }
scope :start_event_timestamp_after, -> (date) { where(arel_table[:start_event_timestamp].gteq(date)) }
scope :start_event_timestamp_before, -> (date) { where(arel_table[:start_event_timestamp].lteq(date)) }
scope :end_event_timestamp_after, ->(date) { where(arel_table[:end_event_timestamp].gteq(date)) }
scope :end_event_timestamp_before, ->(date) { where(arel_table[:end_event_timestamp].lteq(date)) }
scope :start_event_timestamp_after, ->(date) { where(arel_table[:start_event_timestamp].gteq(date)) }
scope :start_event_timestamp_before, ->(date) { where(arel_table[:start_event_timestamp].lteq(date)) }
scope :authored, ->(user) { where(author_id: user) }
scope :with_milestone_id, ->(milestone_id) { where(milestone_id: milestone_id) }
scope :without_milestone_id, -> (milestone_id) { where('milestone_id <> ? or milestone_id IS NULL', milestone_id) }
scope :without_milestone_id, ->(milestone_id) { where('milestone_id <> ? or milestone_id IS NULL', milestone_id) }
scope :end_event_is_not_happened_yet, -> { where(end_event_timestamp: nil) }
scope :for_consistency_check_worker, -> (direction) do
scope :for_consistency_check_worker, ->(direction) do
keyset_order(
:end_event_timestamp => { order_expression: arel_order(arel_table[:end_event_timestamp], direction), nullable: direction == :asc ? :nulls_last : :nulls_first },
issuable_id_column => { order_expression: arel_order(arel_table[issuable_id_column], direction), nullable: :not_nullable }
)
end
scope :order_by_end_event, -> (direction) do
scope :order_by_end_event, ->(direction) do
# ORDER BY end_event_timestamp, merge_request_id/issue_id, start_event_timestamp
# start_event_timestamp must be included in the ORDER BY clause for the duration
# calculation to work: SELECT end_event_timestamp - start_event_timestamp
@ -35,7 +35,7 @@ module Analytics
:start_event_timestamp => { order_expression: arel_order(arel_table[:start_event_timestamp], direction) }
)
end
scope :order_by_end_event_with_db_duration, -> (direction) do
scope :order_by_end_event_with_db_duration, ->(direction) do
# ORDER BY end_event_timestamp, merge_request_id/issue_id, start_event_timestamp
# start_event_timestamp must be included in the ORDER BY clause for the duration
# calculation to work: SELECT end_event_timestamp - start_event_timestamp
@ -49,7 +49,7 @@ module Analytics
}
)
end
scope :order_by_db_duration, -> (direction) do
scope :order_by_db_duration, ->(direction) do
# start_event_timestamp and end_event_timestamp do not really influence the order,
# but are included so that they are part of the returned result, for example when
# using Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher

View File

@ -10,7 +10,7 @@ module Approvable
scope :without_approvals, -> { left_outer_joins(:approvals).where(approvals: { id: nil }) }
scope :with_approvals, -> { joins(:approvals) }
scope :approved_by_users_with_ids, -> (*user_ids) do
scope :approved_by_users_with_ids, ->(*user_ids) do
with_approvals
.merge(Approval.with_user)
.where(users: { id: user_ids })
@ -18,7 +18,7 @@ module Approvable
.group(:id)
.having("COUNT(users.id) = ?", user_ids.size)
end
scope :approved_by_users_with_usernames, -> (*usernames) do
scope :approved_by_users_with_usernames, ->(*usernames) do
with_approvals
.merge(Approval.with_user)
.where(users: { username: usernames })
@ -27,7 +27,7 @@ module Approvable
.having("COUNT(users.id) = ?", usernames.size)
end
scope :not_approved_by_users_with_usernames, -> (usernames) do
scope :not_approved_by_users_with_usernames, ->(usernames) do
users = User.where(username: usernames).select(:id)
app_table = Approval.arel_table

View File

@ -32,7 +32,7 @@ module Ci
gzip: 3
}, _suffix: true
scope :expired_before, -> (timestamp) { where(arel_table[:expire_at].lt(timestamp)) }
scope :expired_before, ->(timestamp) { where(arel_table[:expire_at].lt(timestamp)) }
scope :expired, -> { expired_before(Time.current) }
scope :project_id_in, ->(ids) { where(project_id: ids) }
end

View File

@ -103,7 +103,7 @@ module Ci
where(status: klass::CANCELABLE_STATUSES)
end
scope :without_statuses, -> (names) do
scope :without_statuses, ->(names) do
with_status(all_state_names - names.to_a)
end
end

View File

@ -16,7 +16,7 @@ module Ci
format: { with: /\A[a-zA-Z0-9_]+\z/,
message: "can contain only letters, digits and '_'." }
scope :by_key, -> (key) { where(key: key) }
scope :by_key, ->(key) { where(key: key) }
scope :order_key_asc, -> { reorder(key: :asc) }
scope :order_key_desc, -> { reorder(key: :desc) }

View File

@ -22,7 +22,7 @@ module HasEnvironmentScope
# selected even if its scope matches the environment name.
# This is equivalent to using `#last` from SQL standpoint.
#
scope :on_environment, -> (environment_name, relevant_only: false) do
scope :on_environment, ->(environment_name, relevant_only: false) do
order_direction = relevant_only ? 'DESC' : 'ASC'
where = <<~SQL

View File

@ -4,7 +4,7 @@ module IdInOrdered
extend ActiveSupport::Concern
included do
scope :id_in_ordered, -> (ids) do
scope :id_in_ordered, ->(ids) do
raise ArgumentError, "ids must be an array of integers" unless ids.is_a?(Enumerable) && ids.all?(Integer)
# No need to sort if no more than 1 and the sorting code doesn't work

View File

@ -35,7 +35,7 @@ module IncidentManagement
# Ascending sort order sorts statuses: Ignored > Resolved > Acknowledged > Triggered
# Descending sort order sorts statuses: Triggered > Acknowledged > Resolved > Ignored
# https://gitlab.com/gitlab-org/gitlab/-/issues/221242#what-is-the-expected-correct-behavior
scope :order_status, -> (sort_order) { order(status: sort_order == :asc ? :desc : :asc) }
scope :order_status, ->(sort_order) { order(status: sort_order == :asc ? :desc : :asc) }
scope :open, -> { with_status(OPEN_STATUSES) }
state_machine :status, initial: :triggered do

View File

@ -267,7 +267,7 @@ module Issuable
return true unless assignees.size > MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS
errors.add :assignees,
-> (_object, _data) { self.class.max_number_of_assignees_or_reviewers_message }
->(_object, _data) { self.class.max_number_of_assignees_or_reviewers_message }
end
end

View File

@ -25,7 +25,7 @@ module Mentionable
end
if self < Participable
participant -> (user, ext) { all_references(user, extractor: ext) }
participant ->(user, ext) { all_references(user, extractor: ext) }
end
end

View File

@ -26,10 +26,10 @@ module Milestoneable
scope :any_release, -> do
where("EXISTS (?)", milestone_releases_subquery)
end
scope :with_release, -> (tag, project_id) do
scope :with_release, ->(tag, project_id) do
where("EXISTS (?)", milestone_releases_subquery.where(releases: { tag: tag, project_id: project_id }))
end
scope :without_particular_release, -> (tag, project_id) do
scope :without_particular_release, ->(tag, project_id) do
where("EXISTS (?)", milestone_releases_subquery.where.not(releases: { tag: tag, project_id: project_id }))
end

View File

@ -26,7 +26,7 @@ module ReactiveCaching
class_attribute :reactive_cache_worker_finder
# defaults
self.reactive_cache_key = -> (record) { [model_name.singular, record.id] }
self.reactive_cache_key = ->(record) { [model_name.singular, record.id] }
self.reactive_cache_lease_timeout = 2.minutes
self.reactive_cache_refresh_interval = 1.minute
self.reactive_cache_lifetime = 10.minutes

View File

@ -6,9 +6,9 @@ module Shardable
included do
belongs_to :shard
scope :for_repository_storage, -> (repository_storage) { joins(:shard).where(shards: { name: repository_storage }) }
scope :excluding_repository_storage, -> (repository_storage) { joins(:shard).where.not(shards: { name: repository_storage }) }
scope :for_shard, -> (shard) { where(shard_id: shard) }
scope :for_repository_storage, ->(repository_storage) { joins(:shard).where(shards: { name: repository_storage }) }
scope :excluding_repository_storage, ->(repository_storage) { joins(:shard).where.not(shards: { name: repository_storage }) }
scope :for_shard, ->(shard) { where(shard_id: shard) }
validates :shard, presence: true
end

View File

@ -50,7 +50,7 @@ module Timebox
has_many :merge_requests
scope :closed, -> { with_state(:closed) }
scope :with_title, -> (title) { where(title: title) }
scope :with_title, ->(title) { where(title: title) }
# A timebox is within the timeframe (start_date, end_date) if it overlaps
# with that timeframe:
@ -78,7 +78,7 @@ module Timebox
# |--- no end
# |--| defined start and end
#
scope :within_timeframe, -> (start_date, end_date) do
scope :within_timeframe, ->(start_date, end_date) do
where('start_date is not NULL or due_date is not NULL')
.where('start_date is NULL or start_date <= ?', end_date)
.where('due_date is NULL or due_date >= ?', start_date)

View File

@ -190,7 +190,17 @@ class Label < ApplicationRecord
#
# Returns an ActiveRecord::Relation.
def self.search(query, **options)
fuzzy_search(query, [:title, :description])
# make sure we prevent passing in disallowed columns
search_in = case options[:search_in]
when [:title]
[:title]
when [:description]
[:description]
else
[:title, :description]
end
fuzzy_search(query, search_in)
end
# Override Gitlab::SQL::Pattern.min_chars_for_partial_matching as

View File

@ -85,19 +85,22 @@ module Packages
end
def root?(path)
File.dirname(path).exclude?('/')
File.dirname(path).exclude?('/') || (File.dirname(path).count('/') == 1 && path.start_with?('./'))
end
def submodule?(path)
File.dirname(path).match?(SUBMODULES_REGEX) &&
File.dirname(path).count('/').in?([1, 2]) &&
!File.dirname(path).end_with?('modules')
match_directory_pattern?(path, SUBMODULES_REGEX, 'modules')
end
def example?(path)
File.dirname(path).match?(EXAMPLES_REGEX) &&
File.dirname(path).count('/').in?([1, 2]) &&
!File.dirname(path).end_with?('examples')
match_directory_pattern?(path, EXAMPLES_REGEX, 'examples')
end
def match_directory_pattern?(path, regex, suffix)
File.dirname(path).match?(regex) &&
!File.dirname(path).end_with?(suffix) &&
(File.dirname(path).count('/').in?([1, 2]) ||
(File.dirname(path).count('/') == 3 && path.start_with?('./')))
end
def parse_and_merge_metadata(file, entry_name, module_type)

View File

@ -28,7 +28,7 @@
include_subgroups: true.to_s,
membership: true.to_s,
selected: @cluster.management_project_id } }
%p.text-muted.gl-mt-n5
%p.text-muted.-gl-mt-5
= html_escape(s_('ClusterIntegration|A cluster management project can be used to run deployment jobs with Kubernetes %{code_open}cluster-admin%{code_close} privileges.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
= link_to _('More information'), help_page_path('user/clusters/management_project'), target: '_blank', rel: 'noopener noreferrer'
= field.submit _('Save changes'), pajamas_button: true

View File

@ -144,7 +144,7 @@
= link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'localization'), target: '_blank', rel: 'noopener noreferrer'
.js-listbox-input{ data: { label: _('Language'), description: s_('Preferences|This feature is experimental and translations are not yet complete.'), name: 'user[preferred_language]', items: language_choices.to_json, value: current_user.preferred_language, block: true.to_s, toggle_class: 'gl-form-input-xl' } }
%p.gl-mt-n5
%p.-gl-mt-5
= link_to help_page_url('development/i18n/translation'), class: 'text-nowrap', target: '_blank', rel: 'noopener noreferrer' do
= _("Help translate GitLab into your language")
%span{ aria: { label: _('Open new window') } }

View File

@ -1,4 +1,4 @@
%p.gl-font-weight-bold.gl-text-gray-900.gl-mt-0.gl-mt-n1.gl-mb-3{ data: { testid: 'invite-member-section',
%p.gl-font-weight-bold.gl-text-gray-900.gl-mt-0.-gl-mt-1.gl-mb-3{ data: { testid: 'invite-member-section',
track_label: 'invite_members_empty_project',
track_action: 'render' } }
= s_('InviteMember|Invite your team')

View File

@ -18,7 +18,7 @@
.item-contents.gl-display-flex.gl-align-items-center.gl-flex-wrap.gl-flex-grow-1.gl-min-h-7
.item-title.gl-display-flex.mb-xl-0.gl-min-w-0.gl-align-items-center
- if branch[:pipeline_status].present?
%span.gl-mt-n2.gl-mb-n2.gl-mr-3
%span.-gl-mt-2.gl-mb-n2.gl-mr-3
= render 'ci/status/icon', status: branch[:pipeline_status]
%span.related-branch-info
%strong

View File

@ -4,15 +4,20 @@
- if Gitlab.config.pages.namespace_in_path
- pages_url_text = "#{pages_url} (Beta)"
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5', data: { testid: 'access-page-container' } }, footer_options: { class: 'gl-alert-warning' }) do |c|
= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card', data: { testid: 'access-page-container' } }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-p-5 gl-flex gl-flex-col gl-gap-3' }, footer_options: { class: 'gl-alert-warning' }) do |c|
- c.with_header do
= s_('GitLabPages|Access pages')
.gl-new-card-title-wrapper
%h2.gl-new-card-title
= s_('GitLabPages|Access pages')
.gl-new-card-count
= sprite_icon('doc-text', css_class: 'gl-mr-2')
%span= @project.pages_domains.size + (pages_url ? 1 : 0)
- c.with_body do
%p
%p.gl-m-0
= external_link(pages_url_text, pages_url)
- @project.pages_domains.each do |domain|
%p
%p.gl-m-0
= external_link(domain.url, domain.url)
- unless @project.public_pages?
- c.with_footer do

View File

@ -1,12 +1,12 @@
- if @project.pages_deployed?
- if can?(current_user, :remove_pages, @project)
.gl-bg-red-50.gl-shadow-inner-l-3-red-600.gl-py-5.gl-px-6
.gl-bg-red-50.gl-shadow-inner-l-3-red-600.gl-py-5.gl-px-6.gl-mt-5
%h4.gl-font-lg.gl-mt-0= s_('GitLabPages|Remove pages')
%p= s_('GitLabPages|Removing pages will prevent them from being exposed to the outside world.')
%p= s_('GitLabPages|Removing pages will prevent them from being exposed to the public internet.')
= render Pajamas::ButtonComponent.new(href: project_pages_path(@project),
variant: :danger,
method: :delete,
button_options: {data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger'}, "aria-label": s_('GitLabPages|Remove pages')}) do
button_options: { data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger' }, "aria-label": s_('GitLabPages|Remove pages') }) do
= s_('GitLabPages|Remove pages')
- else
.nothing-here-block

View File

@ -1,8 +1,6 @@
- @content_class = 'limit-container-width'
%h4.page-title
%h1.gl-heading-1{ class: "!gl-mt-5" }
= s_('GitLabPages|Pages')
%p
%p.gl-text-secondary
- docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer'>".html_safe
- docs_link_end = '</a>'.html_safe
= s_('GitLabPages|With GitLab Pages you can host your static website directly from your GitLab repository. %{docs_link_start}Learn more.%{link_end}').html_safe % { docs_link_start: docs_link_start, link_end: docs_link_end }

View File

@ -2,55 +2,65 @@
- verification_enabled = Gitlab::CurrentSettings.pages_domain_verification_enabled?
- if can?(current_user, :update_pages, @project)
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}, header_options: { class: 'gl-display-flex gl-align-items-center gl-justify-content-space-between' }) do |c|
= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card' }, header_options: { class: 'gl-new-card-header gl-flex gl-items-center gl-justify-between' }, body_options: { class: 'gl-new-card-body gl-p-0' }) do |c|
- c.with_header do
Domains (#{@domains.size})
.gl-new-card-title-wrapper
%h2.gl-new-card-title
= s_('GitLabPages|Domains')
.gl-new-card-count
= sprite_icon('earth', css_class: 'gl-mr-2')
%span.js-admin-labels-count= @domains.size
- if can_add_new_domain
= render Pajamas::ButtonComponent.new(variant: :confirm, href: new_project_pages_domain_path(@project)) do
= s_('GitLabPages|New Domain')
.gl-new-card-actions
= render Pajamas::ButtonComponent.new(size: :small, href: new_project_pages_domain_path(@project)) do
= s_('GitLabPages|New domain')
- c.with_body do
- if @domains.any?
%ul.list-group.list-group-flush
- @domains.each do |domain|
%li.list-group-item.gl-display-flex.gl-justify-content-space-between.gl-align-items-center.gl-p-0
.gl-display-flex.gl-align-items-center
- if verification_enabled
- tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success']
.domain-status.ci-status-icon.has-tooltip{ class: "gl-mr-5 ci-status-icon-#{status}", title: tooltip }
= sprite_icon("status_#{status}")
.domain-name
= external_link(domain.url, domain.url)
- if domain.certificate
%div
= gl_badge_tag(s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject })
- if domain.expired?
= gl_badge_tag s_('GitLabPages|Expired'), variant: :danger
%div
= link_button_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: 'btn-grouped', variant: :confirm, category: :secondary, size: :small
= link_button_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger'}, "aria-label": s_("GitLabPages|Remove domain"), method: :delete, class: 'btn-grouped', variant: :danger, size: :small
- if domain.needs_verification?
%li.list-group-item.gl-p-0
- details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe
- details_link_end = '</a>'.html_safe
= render Pajamas::AlertComponent.new(dismissible: false,
variant: :warning,
show_icon: false) do |c|
- c.with_body do
= s_('GitLabPages|%{domain} is not verified. To learn how to verify ownership, visit your %{link_start}domain details%{link_end}.').html_safe % { domain: domain.domain,
link_start: details_link_start,
link_end: details_link_end }
- if domain.show_auto_ssl_failed_warning?
%li.list-group-item.gl-p-0
- details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe
- details_link_end = '</a>'.html_safe
= render Pajamas::AlertComponent.new(dismissible: false,
variant: :warning,
show_icon: false) do |c|
- c.with_body do
= s_("GitLabPages|Something went wrong while obtaining the Let's Encrypt certificate for %{domain}. To retry visit your %{link_start}domain details%{link_end}.").html_safe % { domain: domain.domain,
%li.list-group-item.gl-flex.gl-flex-col.gl-bg-transparent
.gl-flex.gl-justify-between.gl-items-baseline
.gl-flex.gl-gap-3
- if verification_enabled
- tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success']
.domain-status.ci-status-icon.has-tooltip{ class: "ci-status-icon-#{status}", title: tooltip }
= sprite_icon("status_#{status}")
.domain-name
= external_link(domain.url, domain.url)
- if domain.certificate && domain.pages_domain.subject
%div
= gl_badge_tag(s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject })
- if domain.expired?
= gl_badge_tag s_('GitLabPages|Expired'), variant: :danger
.gl-flex.gl-gap-2
= render Pajamas::ButtonComponent.new(href: project_pages_domain_path(@project, domain),
icon: 'pencil',
category: :tertiary,
button_options: { title: s_('GitLabPages|Edit'), data: { toggle: 'tooltip', container: 'body' } })
= render Pajamas::ButtonComponent.new(href: project_pages_domain_path(@project, domain),
icon: 'remove',
category: :tertiary,
button_options: { title: s_("GitLabPages|Remove domain"), "aria-label": s_("GitLabPages|Remove domain"), data: { method: :delete, confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger', toggle: 'tooltip', container: 'body' } })
- if domain.needs_verification?
.gl-mt-3
- details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe
- details_link_end = '</a>'.html_safe
= render Pajamas::AlertComponent.new(dismissible: false,
variant: :warning) do |c|
- c.with_body do
= s_('GitLabPages|%{domain} is not verified. To learn how to verify ownership, visit your %{link_start}domain details%{link_end}.').html_safe % { domain: domain.domain,
link_start: details_link_start,
link_end: details_link_end }
- if domain.show_auto_ssl_failed_warning?
.gl-mt-3
- details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe
- details_link_end = '</a>'.html_safe
= render Pajamas::AlertComponent.new(dismissible: false,
variant: :warning) do |c|
- c.with_body do
= s_("GitLabPages|Something went wrong while obtaining the Let's Encrypt certificate for %{domain}. To retry visit your %{link_start}domain details%{link_end}.").html_safe % { domain: domain.domain,
link_start: details_link_start,
link_end: details_link_end }
- else
.gl-text-center
.gl-text-secondary.gl-text-center.gl-p-5
= s_("You currently have no custom domains.")

View File

@ -1,11 +1,13 @@
- can_add_new_domain = can_create_pages_custom_domains?(current_user, @project)
- if can?(current_user, :update_pages, @project)
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}, body_options: { class: 'gl-text-center nothing-here-block' }) do |c|
= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card'}, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-text-center nothing-here-block gl-p-5' }) do |c|
- c.with_header do
= s_('GitLabPages|Domains')
.gl-new-card-title-wrapper
%h4.gl-new-card-title
= s_('GitLabPages|Domains')
- if can_add_new_domain
= render Pajamas::ButtonComponent.new(variant: :confirm, href: new_project_pages_domain_path(@project)) do
= s_('GitLabPages|New Domain')
= s_('GitLabPages|New domain')
- c.with_body do
= s_("GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it.")
%span.gl-text-secondary= s_("GitLabPages|Support for domains and certificates is disabled. Ask your GitLab administrator to enable it.")

View File

@ -1,5 +1,4 @@
- @breadcrumb_link = project_pages_path(@project)
- page_title s_('GitLabPages|Pages')
#js-pages{ data: @pipeline_wizard_data }

View File

@ -2,19 +2,13 @@
- unless @project.pages_deployed?
= render 'waiting'
- else
= render 'header'
%section
= render 'pages_settings'
%hr.clearfix
= render 'ssl_limitations_warning' if pages_subdomain(@project).include?(".")
= render 'access'
- if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https
= render 'list'
- else
= render 'no_domains'
= render 'destroy'
= render 'ssl_limitations_warning' if pages_subdomain(@project).include?(".")
= render 'access'
- if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https
= render 'list'
- else
= render 'no_domains'
= render 'destroy'

View File

@ -4,11 +4,9 @@
- has_user_defined_certificate = domain_presenter.certificate && domain_presenter.certificate_user_provided?
- if auto_ssl_available
.form-group.border-section
.form-group
.row
.col-sm-2
= _('Certificate')
.col-sm-10.js-auto-ssl-toggle-container
.col-12.js-auto-ssl-toggle-container
%label{ for: "pages_domain_auto_ssl_enabled_button" }
- lets_encrypt_link_url = "https://letsencrypt.org/"
- lets_encrypt_link_start = "<a href=\"%{lets_encrypt_link_url}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-nowrap\">".html_safe % { lets_encrypt_link_url: lets_encrypt_link_url }
@ -26,39 +24,40 @@
- docs_link_end = "</a>".html_safe
= _("Let's Encrypt is a free, automated, and open certificate authority (CA) that gives digital certificates in order to enable HTTPS (SSL/TLS) for websites. Learn more about Let's Encrypt configuration by following the %{docs_link_start}documentation on GitLab Pages%{docs_link_end}.").html_safe % { docs_link_url: docs_link_url, docs_link_start: docs_link_start, docs_link_end: docs_link_end }
.form-group.border-section.js-shown-unless-auto-ssl{ class: ("d-none" if auto_ssl_available_and_enabled) }
.form-group.js-shown-unless-auto-ssl{ class: ("!gl-hidden" if auto_ssl_available_and_enabled) }
- if has_user_defined_certificate
.row
.col-sm-10.offset-sm-2
= render Pajamas::CardComponent.new(body_options: { class: 'gl-display-flex gl-align-items-center gl-justify-content-space-between gl-p-5' }) do |c|
.row.gl-mt-5
.col-12
= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card gl-mt-0' }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-flex gl-items-center gl-justify-between gl-px-5 gl-py-4' }) do |c|
- c.with_header do
= _('Certificate')
.gl-new-card-title-wrapper
%h2.gl-new-card-title
= _('Certificate')
.gl-new-card-count
= sprite_icon('partner-verified', css_class: 'gl-mr-2')
- c.with_body do
%span
= domain_presenter.pages_domain.subject || _('missing')
= link_button_to _('Remove'),
clean_certificate_project_pages_domain_path(@project, domain_presenter),
data: { confirm: _('Are you sure?'), 'confirm-btn-variant': 'danger' },
'aria-label': s_("GitLabPages|Remove certificate"),
variant: :danger,
size: :small,
method: :delete
= render Pajamas::ButtonComponent.new(href: clean_certificate_project_pages_domain_path(@project, domain_presenter),
icon: 'remove',
category: :tertiary,
button_options: { title: s_('GitLabPages|Remove certificate'), "aria-label": s_('GitLabPages|Remove certificate'), data: { method: :delete, confirm: _('Are you sure?'), 'confirm-btn-variant': 'danger', toggle: 'tooltip', container: 'body', testid: 'remove-certificate' } })
- else
.row
.col-sm-10.offset-sm-2
.row.gl-mt-5
.col-12
= f.label :user_provided_certificate, _("Certificate (PEM)")
= f.text_area :user_provided_certificate,
rows: 5,
class: "form-control js-enabled-unless-auto-ssl",
disabled: auto_ssl_available_and_enabled
%span.help-inline.text-muted= _("Upload a certificate for your domain with all intermediates")
%span.help-inline.gl-text-secondary= _("Upload a certificate for your domain with all intermediates")
.row
.col-sm-10.offset-sm-2
.col-12
= f.label :user_provided_key, _("Key (PEM)")
= f.text_area :user_provided_key,
rows: 5,
class: "form-control js-enabled-unless-auto-ssl",
disabled: auto_ssl_available_and_enabled
%span.help-inline.text-muted= _("Upload a private key for your certificate")
%span.help-inline.gl-text-secondary= _("Upload a private key for your certificate")
= render 'lets_encrypt_callout', auto_ssl_available_and_enabled: auto_ssl_available_and_enabled

View File

@ -1,31 +1,32 @@
- verification_enabled = Gitlab::CurrentSettings.pages_domain_verification_enabled?
- dns_record = "#{domain_presenter.domain} ALIAS #{pages_subdomain(domain_presenter.project)}.#{Settings.pages.host}."
.form-group.border-section
.form-group
.row
.col-sm-2
= _("DNS")
.col-sm-10
.col-12
%label{ for: "domain_dns" }
= _("DNS")
.input-group
= text_field_tag :domain_dns, dns_record , class: "monospace js-select-on-focus form-control", readonly: true
.input-group-append
= clipboard_button(target: '#domain_dns', category: :primary, size: :medium)
%p.form-text.text-muted
%p.form-text.gl-text-secondary
= _("To access this domain create a new DNS record")
- if verification_enabled
.form-group.border-section
.form-group
.row
.col-sm-2
= _("Verification status")
.col-sm-10
.gl-mb-3
- text, status = domain_presenter.unverified? ? [_('Unverified'), :danger] : [_('Verified'), :success]
= gl_badge_tag text, variant: status
= link_button_to sprite_icon("redo"), verify_project_pages_domain_path(@project, domain_presenter), method: :post, class: 'gl-ml-2 has-tooltip', title: _("Retry verification"), size: :small
.col-12
.gl-flex.gl-items-baseline.gl-gap-3
%label{ for: "domain_verification" }
= _("Verification status")
.gl-flex.gl-items-baseline.gl-gap-2
- text, status = domain_presenter.unverified? ? [_('Unverified'), :danger] : [_('Verified'), :success]
= gl_badge_tag text, variant: status
= link_button_to sprite_icon("redo"), verify_project_pages_domain_path(@project, domain_presenter), method: :post, class: 'gl-ml-2 has-tooltip', title: _("Retry verification"), size: :small
.input-group
= text_field_tag :domain_verification, domain_presenter.verification_record, class: "monospace js-select-on-focus form-control", readonly: true
.input-group-append
= clipboard_button(target: '#domain_verification', category: :primary, size: :medium)
%p.form-text.text-muted
%p.form-text.gl-text-secondary
- link_to_help = link_to(_('verify ownership'), help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index', anchor: '4-verify-the-domains-ownership'))
= _("To %{link_to_help} of your domain, add the above key to a TXT record within your DNS configuration within seven days.").html_safe % { link_to_help: link_to_help }

View File

@ -4,17 +4,15 @@
- domain_presenter.errors.full_messages.each do |msg|
= msg
.form-group.border-section
.form-group
.row
- if domain_presenter.persisted?
.col-sm-2
.col-12
= _("Domain")
.col-sm-10
= external_link(domain_presenter.url, domain_presenter.url)
- else
.col-sm-2
.col-12
= f.label :domain, _("Domain")
.col-sm-10
.input-group
= f.text_field :domain, required: true, autocomplete: "off", class: "form-control"
@ -24,5 +22,5 @@
- if Gitlab.config.pages.external_https
= render 'certificate', f: f
- else
.border-section.nothing-here-block
.gl-text-secondary.gl-my-5
= _("Support for custom certificates is disabled. Ask your system's administrator to enable it.")

View File

@ -2,4 +2,4 @@
- docs_link_start = "<a href=\"%{docs_link_url}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-nowrap\">".html_safe % { docs_link_url: docs_link_url }
- docs_link_end = "</a>".html_safe
%p= _("Learn more about adding certificates to your project by following the %{docs_link_start}documentation on GitLab Pages%{docs_link_end}.").html_safe % { docs_link_url: docs_link_url, docs_link_start: docs_link_start, docs_link_end: docs_link_end }
%p.gl-text-secondary= _("%{docs_link_start}How to add certificates to your project?%{docs_link_end}").html_safe % { docs_link_url: docs_link_url, docs_link_start: docs_link_start, docs_link_end: docs_link_end }

View File

@ -1,7 +1,7 @@
- if domain_presenter.enabled?
- if domain_presenter.auto_ssl_enabled
- if domain_presenter.show_auto_ssl_failed_warning?
.form-group.border-section.js-shown-if-auto-ssl{ class: ("d-none" unless auto_ssl_available_and_enabled) }
.form-group.border-section.js-shown-if-auto-ssl{ class: ("!gl-hidden" unless auto_ssl_available_and_enabled) }
.row
.col-sm-10.offset-sm-2
= render Pajamas::AlertComponent.new(dismissible: false, variant: :warning) do |c|
@ -10,14 +10,14 @@
- c.with_actions do
= link_button_to s_('GitLabPagesDomains|Retry'), retry_auto_ssl_project_pages_domain_path(@project, domain_presenter), method: :post, size: :small
- elsif !domain_presenter.certificate_gitlab_provided?
.form-group.border-section.js-shown-if-auto-ssl{ class: ("d-none" unless auto_ssl_available_and_enabled) }
.form-group.border-section.js-shown-if-auto-ssl{ class: ("!gl-hidden" unless auto_ssl_available_and_enabled) }
.row
.col-sm-10.offset-sm-2
= render Pajamas::AlertComponent.new(dismissible: false, show_icon: false) do |c|
- c.with_body do
= _("GitLab is obtaining a Let's Encrypt SSL certificate for this domain. This process can take some time. Please try again later.")
- else
.form-group.border-section.js-shown-if-auto-ssl{ class: ("d-none" unless auto_ssl_available_and_enabled) }
.form-group.border-section.js-shown-if-auto-ssl{ class: ("!gl-hidden" unless auto_ssl_available_and_enabled) }
.row
.col-sm-10.offset-sm-2
= render Pajamas::AlertComponent.new(dismissible: false, variant: :warning, show_icon: false) do |c|

View File

@ -1,11 +1,12 @@
- add_to_breadcrumbs _("Pages"), project_pages_path(@project)
- page_title _('New Pages Domain')
%h1.page-title.gl-font-size-h-display
= _("New Pages Domain")
= render 'projects/pages_domains/helper_text'
- page_title _('New pages domain')
%h1.gl-heading-1
= _("New pages domain")
.gl-text-secondary
= render 'projects/pages_domains/helper_text'
%div
= gitlab_ui_form_for [@project, domain_presenter], html: { class: 'fieldset-form' } do |f|
= render 'form', { f: f }
.form-actions.gl-display-flex
= f.submit _('Create New Domain'), class: 'gl-mr-3', pajamas_button: true
.gl-flex.gl-gap-3.gl-mt-6
= f.submit _('Create new domain'), pajamas_button: true
= link_button_to _('Cancel'), project_pages_path(@project)

View File

@ -8,6 +8,6 @@
%div
= gitlab_ui_form_for [@project, domain_presenter], html: { class: 'fieldset-form' } do |f|
= render 'form', { f: f }
.form-actions.gl-display-flex
= f.submit _('Save Changes'), class: 'gl-mr-3', pajamas_button: true
.gl-flex.gl-gap-3.gl-mt-6
= f.submit _('Save changes'), pajamas_button: true
= link_button_to _('Cancel'), project_pages_path(@project)

View File

@ -23,7 +23,7 @@
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-3' }, footer_options: { class: "js-extra-settings #{auto_devops_enabled || 'hidden'}", data: { testid: 'extra-auto-devops-settings' } }) do |c|
- c.with_body do
- autodevops_help_link = link_to _('Learn more.'), help_page_path('topics/autodevops/index'), target: '_blank', rel: 'noopener noreferrer'
- auto_devops_badge = auto_devops_enabled ? (gl_badge_tag badge_for_auto_devops_scope(@project), { variant: :info }, { class: 'js-instance-default-badge gl-ml-3 gl-mt-n1'}) : ''
- auto_devops_badge = auto_devops_enabled ? (gl_badge_tag badge_for_auto_devops_scope(@project), { variant: :info }, { class: 'js-instance-default-badge gl-ml-3 -gl-mt-1'}) : ''
= form.gitlab_ui_checkbox_component :enabled,
(s_('CICD|Default to Auto DevOps pipeline') + auto_devops_badge).html_safe,
checkbox_options: { class: 'js-toggle-extra-settings', checked: auto_devops_enabled, data: { testid: 'enable-autodevops-checkbox' } },

View File

@ -15,6 +15,6 @@
%span
by
= link_to user_snippets_path(snippet_title.author) do
= render Pajamas::AvatarComponent.new(snippet_title.author, size: 16, class: 'gl-mt-n1')
= render Pajamas::AvatarComponent.new(snippet_title.author, size: 16, class: '-gl-mt-1')
= snippet_title.author_name
%span.light= time_ago_with_tooltip(snippet_title.created_at)

View File

@ -35,7 +35,7 @@
- if @applications.any?
.table-holder
%table.table.b-table.gl-table.b-table-stacked-sm.gl-mt-n1.gl-mb-n2
%table.table.b-table.gl-table.b-table-stacked-sm.-gl-mt-1.gl-mb-n2
%thead.d-none.d-md-table-header-group
%tr
%th= _('Name')
@ -77,7 +77,7 @@
- c.with_body do
- if @authorized_tokens.any?
.table-holder
%table.table.b-table.gl-table.b-table-stacked-sm.gl-mt-n1.gl-mb-n2
%table.table.b-table.gl-table.b-table-stacked-sm.-gl-mt-1.gl-mb-n2
%thead.d-none.d-md-table-header-group
%tr
%th= _('Name')

View File

@ -12,7 +12,7 @@
note_id: note.id } }
.timeline-entry-inner
- if note.system
.gl-float-left.gl--flex-center.gl-rounded-full.gl-mt-n1.gl-ml-2.gl-w-6.gl-h-6.gl-bg-gray-50.gl-text-gray-600
.gl-float-left.gl--flex-center.gl-rounded-full.-gl-mt-1.gl-ml-2.gl-w-6.gl-h-6.gl-bg-gray-50.gl-text-gray-600
= icon_for_system_note(note)
- else
.timeline-avatar.gl-float-left

View File

@ -3,7 +3,7 @@
- require_external_verification = Integrations::BeyondIdentity.activated_for_instance?
- if @gpg_keys.any?
.table-holder
%table.table.b-table.gl-table.b-table-stacked-md.gl-mt-n1.gl-mb-n2.ssh-keys-list
%table.table.b-table.gl-table.b-table-stacked-md.-gl-mt-1.gl-mb-n2.ssh-keys-list
%thead.d-none.d-md-table-header-group
%tr
%th= s_('Profiles|Key')

View File

@ -3,7 +3,7 @@
- if @keys.any?
.table-holder
%table.table.b-table.gl-table.b-table-stacked-md.gl-mt-n1.gl-mb-n2.ssh-keys-list{ data: { testid: 'ssh-keys-list' } }
%table.table.b-table.gl-table.b-table-stacked-md.-gl-mt-1.gl-mb-n2.ssh-keys-list{ data: { testid: 'ssh-keys-list' } }
%thead.d-none.d-md-table-header-group
%tr
%th= _('Title')

View File

@ -30,7 +30,7 @@
= link_to avatar_icon_for_user(@user, 400, current_user: current_user), target: '_blank', rel: 'noopener noreferrer', title: s_('UserProfile|View large avatar') do
= render Pajamas::AvatarComponent.new(@user, alt: s_('UserProfile|User profile picture'), size: 96, avatar_options: { itemprop: "image" })
- if @user.status&.busy?
= render Pajamas::BadgeComponent.new(s_('UserProfile|Busy'), size: 'sm', variant: 'warning', class: 'gl-absolute gl-display-flex gl-justify-content-center gl-align-items-center gl-left-1/2 gl-bg-gray-50 gl-border gl-border-white -gl-translate-x-1/2 gl-top-full gl-mt-n3')
= render Pajamas::BadgeComponent.new(s_('UserProfile|Busy'), size: 'sm', variant: 'warning', class: 'gl-absolute gl-display-flex gl-justify-content-center gl-align-items-center gl-left-1/2 gl-bg-gray-50 gl-border gl-border-white -gl-translate-x-1/2 gl-top-full -gl-mt-3')
%div
%h1.gl-heading-1.gl-line-height-1.gl-mr-2{ class: 'gl-my-0!', itemprop: 'name' }
= user_display_name(@user)

View File

@ -1,6 +1,8 @@
---
migration_job_name: BackfillNugetNormalizedVersion
description: Introduce a batched background migration to backfill the normalized_version column in packages_nuget_metadata table.
description: Introduce a batched background migration to backfill the normalized_version
column in packages_nuget_metadata table.
feature_category: package_registry
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128675
milestone: '16.4'
finalized_by: '20240508231959'

View File

@ -5,13 +5,13 @@ class CreateSharedSequenceForAuditEvents < Gitlab::Database::Migration[2.2]
def up
execute <<-SQL
CREATE SEQUENCE shared_audit_event_id_seq;
CREATE SEQUENCE IF NOT EXISTS shared_audit_event_id_seq;
SQL
end
def down
execute <<-SQL
DROP SEQUENCE shared_audit_event_id_seq;
DROP SEQUENCE IF EXISTS shared_audit_event_id_seq;
SQL
end
end

View File

@ -10,7 +10,7 @@ class CreateUserAuditEvents < Gitlab::Database::Migration[2.2]
def up
execute <<-SQL
CREATE TABLE user_audit_events (
CREATE TABLE IF NOT EXISTS user_audit_events (
id BIGINT NOT NULL DEFAULT nextval('shared_audit_event_id_seq'),
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
user_id BIGINT NOT NULL,

View File

@ -10,7 +10,7 @@ class CreateGroupAuditEvents < Gitlab::Database::Migration[2.2]
def up
execute <<-SQL
CREATE TABLE group_audit_events (
CREATE TABLE IF NOT EXISTS group_audit_events (
id BIGINT NOT NULL DEFAULT nextval('shared_audit_event_id_seq'),
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
group_id BIGINT NOT NULL,

View File

@ -10,7 +10,7 @@ class CreateProjectAuditEvents < Gitlab::Database::Migration[2.2]
def up
execute <<-SQL
CREATE TABLE project_audit_events (
CREATE TABLE IF NOT EXISTS project_audit_events (
id BIGINT NOT NULL DEFAULT nextval('shared_audit_event_id_seq'),
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
project_id BIGINT NOT NULL,

View File

@ -8,7 +8,7 @@ class CreateInstanceAuditEvents < Gitlab::Database::Migration[2.2]
def up
execute <<-SQL
CREATE TABLE instance_audit_events (
CREATE TABLE IF NOT EXISTS instance_audit_events (
id BIGINT NOT NULL DEFAULT nextval('shared_audit_event_id_seq'),
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
author_id BIGINT NOT NULL,

View File

@ -0,0 +1,21 @@
# frozen_string_literal: true
class FinalizeBackfillNugetNormalizedVersion < Gitlab::Database::Migration[2.2]
milestone '17.1'
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
ensure_batched_background_migration_is_finished(
job_class_name: 'BackfillNugetNormalizedVersion',
table_name: :packages_nuget_metadata,
column_name: :package_id,
job_arguments: [],
finalize: true
)
end
def down; end
end

View File

@ -0,0 +1 @@
deb446e69af9242ca77dd73f314ad4963063e65fbbfd03f1557eea28521e3831

View File

@ -43,21 +43,25 @@ sign in.
### View user sign ups pending approval
> - Ability to filter a user by state [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/238183) in GitLab 17.0.
To view user sign ups pending approval:
1. On the left sidebar, at the bottom, select **Admin Area**.
1. Select **Overview > Users**.
1. Select the **Pending approval** tab.
1. In the search box, filter by **State=Pending approval**, and press <kbd>Enter</kbd>.
### Approve or reject a user sign up
> - Ability to filter a user by state [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/238183) in GitLab 17.0.
A user sign up pending approval can be approved or rejected from the Admin Area.
To approve or reject a user sign up:
1. On the left sidebar, at the bottom, select **Admin Area**.
1. Select **Overview > Users**.
1. Select the **Pending approval** tab.
1. In the search box, filter by **State=Pending approval** and press <kbd>Enter</kbd>.
1. For the user sign up you want to approve or reject, select the vertical ellipsis (**{ellipsis_v}**), then **Approve** or **Reject**.
Approving a user:
@ -102,11 +106,13 @@ To report abuse from other users, see [report abuse](../user/report_abuse.md). F
### Unblock a user
> - Ability to filter a user by state [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/238183) in GitLab 17.0.
A blocked user can be unblocked from the Admin Area. To do this:
1. On the left sidebar, at the bottom, select **Admin Area**.
1. Select **Overview > Users**.
1. Select the **Blocked** tab.
1. In the search box, filter by **State=Blocked** and press <kbd>Enter</kbd>.
1. For the user you want to unblock, select the vertical ellipsis (**{ellipsis_v}**), then **Unblock**.
The user's state is set to active and they consume a
@ -120,7 +126,7 @@ the LDAP identity first needs to be deleted:
1. On the left sidebar, at the bottom, select **Admin Area**.
1. Select **Overview > Users**.
1. Select the **Blocked** tab.
1. In the search box, filter by **State=Blocked** and press <kbd>Enter</kbd>.
1. Select a user.
1. Select the **Identities** tab.
1. Find the LDAP provider and select **Delete**.
@ -218,13 +224,15 @@ A maximum of 240,000 users can be deleted per day.
### Activate a user
> - Ability to filter a user by state [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/238183) in GitLab 17.0.
A deactivated user can be activated from the Admin Area.
To do this:
1. On the left sidebar, at the bottom, select **Admin Area**.
1. Select **Overview > Users**.
1. Select the **Deactivated** tab.
1. In the search box, filter by **State=Deactivated** and press <kbd>Enter</kbd>.
1. For the user you want to activate, select the vertical ellipsis (**{ellipsis_v}**), then **Activate**.
The user's state is set to active and they consume a
@ -260,11 +268,13 @@ Users can be banned using the Admin Area. To do this:
### Unban a user
> - Ability to filter a user by state [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/238183) in GitLab 17.0.
A banned user can be unbanned using the Admin Area. To do this:
1. On the left sidebar, at the bottom, select **Admin Area**.
1. Select **Overview > Users**.
1. Select the **Banned** tab.
1. In the search box , filter by **State=Banned** and press <kbd>Enter</kbd>.
1. For the user you want to unban, select the vertical ellipsis (**{ellipsis_v}**), then **Unban user**.
The user's state is set to active and they consume a
@ -297,6 +307,7 @@ Before 15.1, additionally groups of which deleted user were the only owner among
## Trust and untrust users
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132402) in GitLab 16.5.
> - Ability to filter a user by state [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/238183) in GitLab 17.0.
You can trust and untrust users from the Admin Area.
@ -322,7 +333,7 @@ The user is trusted.
1. On the left sidebar, at the bottom, select **Admin Area**.
1. Select **Overview > Users**.
1. Select the **Trusted** tab.
1. In the search box, filter by **State=Trusted** and press <kbd>Enter</kbd>.
1. Select a user.
1. From the **User administration** dropdown list, select **Untrust user**.
1. On the confirmation dialog, select **Untrust user**.

View File

@ -22044,6 +22044,7 @@ four standard [pagination arguments](#pagination-arguments):
| <a id="grouplabelsincludeancestorgroups"></a>`includeAncestorGroups` | [`Boolean`](#boolean) | Include labels from ancestor groups. |
| <a id="grouplabelsincludedescendantgroups"></a>`includeDescendantGroups` | [`Boolean`](#boolean) | Include labels from descendant groups. |
| <a id="grouplabelsonlygrouplabels"></a>`onlyGroupLabels` | [`Boolean`](#boolean) | Include only group level labels. |
| <a id="grouplabelssearchin"></a>`searchIn` | [`[LabelSearchFieldList!]!`](#labelsearchfieldlist) | Specify which fields to search in. |
| <a id="grouplabelssearchterm"></a>`searchTerm` | [`String`](#string) | Search term to find labels with. |
##### `Group.memberRoles`
@ -28102,6 +28103,7 @@ four standard [pagination arguments](#pagination-arguments):
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="projectlabelsincludeancestorgroups"></a>`includeAncestorGroups` | [`Boolean`](#boolean) | Include labels from ancestor groups. |
| <a id="projectlabelssearchin"></a>`searchIn` | [`[LabelSearchFieldList!]!`](#labelsearchfieldlist) | Specify which fields to search in. |
| <a id="projectlabelssearchterm"></a>`searchTerm` | [`String`](#string) | Search term to find labels with. |
##### `Project.memberRoles`
@ -34118,6 +34120,15 @@ Iteration ID wildcard values.
| <a id="jobartifactfiletypeterraform"></a>`TERRAFORM` | TERRAFORM job artifact file type. |
| <a id="jobartifactfiletypetrace"></a>`TRACE` | TRACE job artifact file type. |
### `LabelSearchFieldList`
List of fields where the provided searchTerm should be looked up.
| Value | Description |
| ----- | ----------- |
| <a id="labelsearchfieldlistdescription"></a>`DESCRIPTION` | Search in the label description. |
| <a id="labelsearchfieldlisttitle"></a>`TITLE` | Search in the label title. |
### `ListLimitMetric`
List limit metric setting.

View File

@ -48,6 +48,7 @@ DETAILS:
Anthropic [`claude-3-haiku-20240307`](https://docs.anthropic.com/en/docs/models-overview#claude-3-a-new-generation-of-ai),
[`claude-2.1`](https://docs.anthropic.com/en/docs/legacy-model-guide#anthropics-legacy-models),
and [Vertex AI Search](https://cloud.google.com/enterprise-search).
- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Watch overview](https://www.youtube.com/watch?v=ZQBAuf-CTAY&list=PLFGfElNsQthYDx0A_FaNNfUm9NHsK6zED)
- [View documentation](gitlab_duo_chat.md).
NOTE:
@ -75,7 +76,7 @@ DETAILS:
- Automates repetitive tasks and helps catch bugs early.
- LLM: Anthropic [`Claude-2.1`](https://docs.anthropic.com/claude/docs/models-overview#model-comparison)
- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Watch overview](https://www.youtube.com/watch?v=g6MS1JsRWgs)
- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Watch overview](https://www.youtube.com/watch?v=zWhwuixUkYU&list=PLFGfElNsQthYDx0A_FaNNfUm9NHsK6zED)
- [View documentation](gitlab_duo_chat_examples.md#write-tests-in-the-ide).
## Beta features
@ -152,6 +153,7 @@ DETAILS:
- Helps ease merge request handoff between authors and reviewers and help reviewers efficiently understand suggestions.
- LLM: Vertex AI Codey [`text-bison`](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text)
- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Watch overview](https://www.youtube.com/watch?v=Bx6Zajyuy9k&list=PLFGfElNsQthYDx0A_FaNNfUm9NHsK6zED)
- [View documentation](project/merge_requests/ai_in_merge_requests.md#summarize-a-code-review).
### Vulnerability resolution
@ -193,6 +195,7 @@ DETAILS:
- Assists you with predicting productivity metrics and identifying anomalies across your software development lifecycle.
- LLM: Statistical forecasting
- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Watch overview](https://www.youtube.com/watch?v=6u8_8QQ5pEQ&list=PLFGfElNsQthYDx0A_FaNNfUm9NHsK6zED)
- [View documentation](ai_experiments.md#forecast-deployment-frequency-with-value-stream-forecasting).
### Product Analytics

View File

@ -273,7 +273,9 @@ After you have authorized access to the source GitLab instance, you are redirect
importer page. Here you can see a list of the top-level groups on the connected source instance where you have the Owner
role.
1. By default, the proposed group namespaces match the names as they exist in source instance, but based on your permissions, you can choose to edit these names before you proceed to import any of them.
1. By default, the proposed group namespaces match the names as they exist in source instance, but based on your permissions, you can choose to edit these names before you
proceed to import any of them. Group and project paths must conform to naming [limitations](../../reserved_names.md#limitations-on-usernames-project-and-group-names)
and are normalized if necessary to avoid import failures.
1. Next to the groups you want to import, select either:
- **Import with projects**. If this is not available, see [prerequisites](#prerequisites).
- **Import without projects**.
@ -600,6 +602,11 @@ You can receive other `404` errors when importing a group, for example:
This error indicates a problem transferring from the _source_ instance. To solve this, check that you have met the [prerequisites](#prerequisites) on the source
instance.
### Mismatched group or project path names
If a source group or project path doesn't conform to naming [limitations](../../reserved_names.md#limitations-on-usernames-project-and-group-names), the path is normalized to
ensure it is valid. For example, `Destination-Project-Path` is normalized to `destination-project-path`.
### Reducing migration duration
A single direct transfer migration runs 5 entities (groups or projects) per import at a time, independent of the number of workers available on the destination instance.

View File

@ -203,6 +203,8 @@ If you edit the policy and select **Save** again, the interval is reset.
Cleanup policies use regex patterns to determine which tags should be preserved or removed, both in the UI and the API.
GitLab uses [RE2 syntax](https://github.com/google/re2/wiki/Syntax) for regular expressions in the cleanup policy.
Regex patterns are automatically surrounded with `\A` and `\Z` anchors. Therefore, you do not need to include any
`\A`, `\Z`, `^` or `$` tokens in the regex patterns.
@ -339,7 +341,7 @@ Here are some other options you can use to reduce the container registry storage
If you see this error message, check the regex patterns to ensure they are valid.
GitLab uses [RE2 syntax](https://github.com/google/re2/wiki/Syntax) for regular expressions in the cleanup policy. You can test them with the [regex101 regex tester](https://regex101.com/) using the `Golang` flavor.
You can test them with the [regex101 regex tester](https://regex101.com/) using the `Golang` flavor.
View some common [regex pattern examples](#regex-pattern-examples).
### The cleanup policy doesn't delete any tags

View File

@ -342,6 +342,7 @@ The following table lists group permissions available for each role:
| Change group visibility level | | | | | ✓ | |
| Create and manage compliance frameworks | | | | | ✓ | |
| Create/Delete group deploy tokens | | | | | ✓ | |
| Create/Delete [group access tokens](group/settings/group_access_tokens.md) | | | | | ✓ | |
| Delete group | | | | | ✓ | |
| Delete group [epic](group/epics/index.md) | | | | | ✓ | |
| Disable notification emails | | | | | ✓ | |

View File

@ -162,7 +162,7 @@ After you have added all the DNS records:
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Deploy > Pages**.
1. Next to the domain name, select **Edit**.
1. Next to the domain name, select **Edit** (**{pencil}**).
1. In **Verification status**, select **Retry verification** (**{retry}**).
![Verify your domain](img/retry_domain_verification_v12_0.png)
@ -263,7 +263,7 @@ meet these requirements.
1. On the left sidebar, select **Search or go to** and find your project.
1. On the left sidebar, select **Deploy > Pages**.
1. Next to the domain name, select **Edit**.
1. Next to the domain name, select **Edit** (**{pencil}**).
1. In **Certificate**, turn off the **Automatic certificate management using Let's Encrypt** toggle to add an [SSL/TLS certificate](#adding-an-ssltls-certificate-to-pages).
1. Select **Save changes**.
@ -311,7 +311,7 @@ To edit a custom domain:
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Deploy > Pages**.
1. Next to the domain name, select **Edit**.
1. Next to the domain name, select **Edit** (**{pencil}**).
## Delete a custom domain
@ -321,7 +321,7 @@ To delete and remove a custom domain:
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Deploy > Pages**.
1. Next to the domain name, select **Remove**.
1. Next to the domain name, select **Remove domain** (**{remove}**)
1. When prompted, select **Remove domain**.
## Troubleshooting

View File

@ -47,7 +47,7 @@ Once you've met the requirements, enable Let's Encrypt integration:
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Deploy > Pages**.
1. Next to the domain name, select **Edit**.
1. Next to the domain name, select **Edit** (**{pencil}**).
1. Turn on the **Automatic certificate management using Let's Encrypt** toggle.
![Enable Let's Encrypt](img/lets_encrypt_integration_v12_1.png)
@ -72,7 +72,7 @@ If you get an error **Something went wrong while obtaining the Let's Encrypt cer
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Deploy > Pages**.
1. Next to the domain name, select **Edit**.
1. Next to the domain name, select **Edit** (**{pencil}**).
1. In **Verification status**, select **Retry verification** (**{retry}**).
1. If you're still getting the same error:
1. Make sure you have properly set only one `CNAME` or `A` DNS record for your domain.

View File

@ -5,8 +5,9 @@ module BulkImports
private
def normalize_path(path)
return path.downcase if path =~ Gitlab::Regex.oci_repository_path_regex
path = path.parameterize.downcase
return path if path =~ Gitlab::Regex.oci_repository_path_regex
# remove invalid characters from end and start of path
delete_invalid_edge_characters(delete_invalid_edge_characters(path))

View File

@ -6,6 +6,11 @@ module Gitlab
class MergeRequestDiffBase < Base
extend ::Gitlab::Utils::Override
# This is the minimum 'max blob size' we request for each of the diff files
# We use the blobs for checking encoding type and LFS pointer
# https://gitlab.com/gitlab-org/gitlab/-/blob/ab046ed8500fb691450d565710cad9f7a5257218/lib/gitlab/git/blob.rb#L10
MAX_BLOB_SIZE = 512.kilobytes
delegate :real_size, :overflow?, :cache_key, to: :@merge_request_diff
def initialize(merge_request_diff, diff_options:)
@ -53,8 +58,10 @@ module Gitlab
def self.max_blob_size(project)
return unless Feature.enabled?(:increase_diff_file_performance, project)
[Gitlab::Git::Diff.patch_hard_limit_bytes,
Gitlab.config.extra['maximum_text_highlight_size_kilobytes']].max
# We take into account for the highlight limit to avoid an extra gitaly call
# When the real blob size is between the highlight limit and the max blob size
# https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152151#note_1904271976
[MAX_BLOB_SIZE, Gitlab::Highlight.file_size_limit].max
end
private

View File

@ -42,15 +42,13 @@ module Gitlab
end
end
private
attr_reader :context
def self.file_size_limit
Gitlab.config.extra['maximum_text_highlight_size_kilobytes']
end
private_class_method :file_size_limit
private
attr_reader :context
def custom_language
return unless @language

View File

@ -753,6 +753,9 @@ msgid_plural "%{digit} total tests"
msgstr[0] ""
msgstr[1] ""
msgid "%{docs_link_start}How to add certificates to your project?%{docs_link_end}"
msgstr ""
msgid "%{docs_link_start}Learn about visibility levels.%{docs_link_end}"
msgstr ""
@ -15127,9 +15130,6 @@ msgstr ""
msgid "Create New Directory"
msgstr ""
msgid "Create New Domain"
msgstr ""
msgid "Create Self-Hosted Model"
msgstr ""
@ -15274,6 +15274,9 @@ msgstr ""
msgid "Create new directory"
msgstr ""
msgid "Create new domain"
msgstr ""
msgid "Create new emoji"
msgstr ""
@ -23540,7 +23543,7 @@ msgstr ""
msgid "GitLabPages|Maximum size (MB)"
msgstr ""
msgid "GitLabPages|New Domain"
msgid "GitLabPages|New domain"
msgstr ""
msgid "GitLabPages|Only project maintainers can remove pages"
@ -23549,9 +23552,6 @@ msgstr ""
msgid "GitLabPages|Pages"
msgstr ""
msgid "GitLabPages|Remove"
msgstr ""
msgid "GitLabPages|Remove certificate"
msgstr ""
@ -23561,7 +23561,7 @@ msgstr ""
msgid "GitLabPages|Remove pages"
msgstr ""
msgid "GitLabPages|Removing pages will prevent them from being exposed to the outside world."
msgid "GitLabPages|Removing pages will prevent them from being exposed to the public internet."
msgstr ""
msgid "GitLabPages|Save changes"
@ -23573,7 +23573,7 @@ msgstr ""
msgid "GitLabPages|Start over"
msgstr ""
msgid "GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it."
msgid "GitLabPages|Support for domains and certificates is disabled. Ask your GitLab administrator to enable it."
msgstr ""
msgid "GitLabPages|Unverified"
@ -30330,9 +30330,6 @@ msgstr ""
msgid "Learn more about X.509 signed commits"
msgstr ""
msgid "Learn more about adding certificates to your project by following the %{docs_link_start}documentation on GitLab Pages%{docs_link_end}."
msgstr ""
msgid "Learn more about custom project templates"
msgstr ""
@ -33932,9 +33929,6 @@ msgstr ""
msgid "New Milestone"
msgstr ""
msgid "New Pages Domain"
msgstr ""
msgid "New Pipeline Schedule"
msgstr ""
@ -34045,6 +34039,9 @@ msgstr ""
msgid "New name"
msgstr ""
msgid "New pages domain"
msgstr ""
msgid "New password"
msgstr ""

View File

@ -64,7 +64,7 @@
"@gitlab/fonts": "^1.3.0",
"@gitlab/svgs": "3.99.0",
"@gitlab/ui": "80.12.0",
"@gitlab/web-ide": "^0.0.1-dev-20240508140740",
"@gitlab/web-ide": "^0.0.1-dev-20240524043623",
"@mattiasbuelens/web-streams-adapter": "^0.1.0",
"@rails/actioncable": "7.0.8-1",
"@rails/ujs": "7.0.8-1",

View File

@ -62,7 +62,7 @@ module Packages
end
def time_ago(days:)
Time.now - days * 24 * 3600
Time.now - (days * 24 * 3600)
end
def old_enough(package, days_for_delete)

View File

@ -62,8 +62,8 @@ values << ENV['SETTING_CSV']
values += gc_stat_keys.map { |k| gc_stats[k] }
values << ::Gitlab::Metrics::System.memory_usage_rss[:total]
values << gc_total_time
values << tms.utime + tms.cutime
values << tms.stime + tms.cstime
values << (tms.utime + tms.cutime)
values << (tms.stime + tms.cstime)
values << tms.real
puts values.join(',')

View File

@ -66,17 +66,17 @@ class QueryLimitingReport
puts "\n\nFound #{total_issues.length} total issues with '#{ISSUES_SEARCH_LABEL}' search label, #{issues.length} are still opened..."
puts "\n\nFound #{code_lines.length} total occurrences of '#{CODE_LINES_SEARCH_STRING}' in code..."
puts "\n" + '-' * 80
puts "\n" + ('-' * 80)
puts "\n\nIssues without any '#{CODE_LINES_SEARCH_STRING}' code references (#{issues_without_code_references.length} total):"
pp issues_without_code_references
puts "\n" + '-' * 80
puts "\n" + ('-' * 80)
puts "\n\n'#{CODE_LINES_SEARCH_STRING}' calls with references to an issue which doesn't have '#{ISSUES_SEARCH_LABEL}' search label (#{code_lines_with_missing_issues.length} total):"
pp code_lines_with_missing_issues
puts "\n" + '-' * 80
puts "\n" + ('-' * 80)
puts "\n\n'#{CODE_LINES_SEARCH_STRING}' calls with no issue iid (#{code_lines_without_issue_iid&.length || 0} total):"
pp code_lines_without_issue_iid

View File

@ -272,7 +272,7 @@ module ReviewApps
raise "days should be an integer between 1 and 365 inclusive! Got #{days_integer}" unless days_integer.between?(1, 365)
Time.now - days_integer * 24 * 3600
Time.now - (days_integer * 24 * 3600)
end
def ignore_exception?(exception_message, exceptions_ignored)

View File

@ -167,8 +167,8 @@ RSpec.describe SearchController, feature_category: :global_search do
term_limit = Gitlab::Search::Params::SEARCH_TERM_LIMIT
term_char_limit = Gitlab::Search::AbuseDetection::ABUSIVE_TERM_SIZE
{
chars_under_limit: (('a' * (term_char_limit - 1) + ' ') * (term_limit - 1))[0, char_limit],
chars_over_limit: (('a' * (term_char_limit - 1) + ' ') * (term_limit - 1))[0, char_limit + 1],
chars_under_limit: ((('a' * (term_char_limit - 1)) + ' ') * (term_limit - 1))[0, char_limit],
chars_over_limit: ((('a' * (term_char_limit - 1)) + ' ') * (term_limit - 1))[0, char_limit + 1],
terms_under_limit: ('abc ' * (term_limit - 1)),
terms_over_limit: ('abc ' * (term_limit + 1)),
term_length_over_limit: ('a' * (term_char_limit + 1)),

Some files were not shown because too many files have changed in this diff Show More