Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-10-10 18:10:10 +00:00
parent c642d6f861
commit 69dec37072
22 changed files with 142 additions and 134 deletions

View File

@ -1 +1 @@
e49ea29543b2d8e71bfe4bdc3b295f785bd24fb1
a3a94460be05799fdb5f9b4d1dab7832fe556bcd

View File

@ -166,7 +166,7 @@ gem 'seed-fu', '~> 2.3.7'
gem 'elasticsearch-model', '~> 7.2'
gem 'elasticsearch-rails', '~> 7.2', require: 'elasticsearch/rails/instrumentation'
gem 'elasticsearch-api', '7.13.3'
gem 'aws-sdk-core', '~> 3.156.0'
gem 'aws-sdk-core', '~> 3.159.0'
gem 'aws-sdk-cloudformation', '~> 1'
gem 'aws-sdk-s3', '~> 1.114.0'
gem 'faraday_middleware-aws-sigv4', '~>0.3.0'

View File

@ -32,9 +32,9 @@
{"name":"awesome_print","version":"1.9.2","platform":"ruby","checksum":"e99b32b704acff16d768b3468680793ced40bfdc4537eb07e06a4be11133786e"},
{"name":"awrence","version":"1.1.1","platform":"ruby","checksum":"9be584c97408ed92d5e1ca11740853646fe270de675f2f8dd44e8233226dfc97"},
{"name":"aws-eventstream","version":"1.2.0","platform":"ruby","checksum":"ffa53482c92880b001ff2fb06919b9bb82fd847cbb0fa244985d2ebb6dd0d1df"},
{"name":"aws-partitions","version":"1.638.0","platform":"ruby","checksum":"8dfe833a15e81cd586b2a9bc624c4800d6e4b003aa76f2e588972fd78be3941f"},
{"name":"aws-partitions","version":"1.644.0","platform":"ruby","checksum":"63791750839afff110c5b5a8805018c4275720d7a5c7ec79319d4d520c7da874"},
{"name":"aws-sdk-cloudformation","version":"1.41.0","platform":"ruby","checksum":"31e47539719734413671edf9b1a31f8673fbf9688549f50c41affabbcb1c6b26"},
{"name":"aws-sdk-core","version":"3.156.0","platform":"ruby","checksum":"0975d3894936dbaf9120dac7781245f177e8ba8f109100bd86a0711d4f9ee01d"},
{"name":"aws-sdk-core","version":"3.159.0","platform":"ruby","checksum":"8863e2cdfd6816a0532ad9eb82a07b81b3d12667da747e9e82554e4dd7adb231"},
{"name":"aws-sdk-kms","version":"1.57.0","platform":"ruby","checksum":"ffd7dbb9b4251f29d4f508af761d0addd7035a346a88e3481cdb4dc548e51bd5"},
{"name":"aws-sdk-s3","version":"1.114.0","platform":"ruby","checksum":"ce0f71df1a7b0fb1f88d40a70636ef1a9b08e69fb560694c5dab3f4ac7efcde4"},
{"name":"aws-sigv4","version":"1.5.1","platform":"ruby","checksum":"d68c87fff4ee843b4b92b23c7f31f957f254ec6eb064181f7119124aab8b8bb4"},

View File

@ -191,11 +191,11 @@ GEM
awesome_print (1.9.2)
awrence (1.1.1)
aws-eventstream (1.2.0)
aws-partitions (1.638.0)
aws-partitions (1.644.0)
aws-sdk-cloudformation (1.41.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-core (3.156.0)
aws-sdk-core (3.159.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
@ -1547,7 +1547,7 @@ DEPENDENCIES
autoprefixer-rails (= 10.2.5.1)
awesome_print
aws-sdk-cloudformation (~> 1)
aws-sdk-core (~> 3.156.0)
aws-sdk-core (~> 3.159.0)
aws-sdk-s3 (~> 1.114.0)
babosa (~> 1.0.4)
base32 (~> 0.3.0)

View File

@ -53,7 +53,9 @@ export default {
return {
blobContent: '',
activeViewerType:
this.blob?.richViewer && !window.location.hash ? RICH_BLOB_VIEWER : SIMPLE_BLOB_VIEWER,
this.blob?.richViewer && !window.location.hash?.startsWith('#LC')
? RICH_BLOB_VIEWER
: SIMPLE_BLOB_VIEWER,
};
},
computed: {

View File

@ -109,12 +109,6 @@ ul.content-list {
color: $gl-text-color;
word-break: break-word;
&.no-description {
.title {
line-height: $list-text-height;
}
}
.title {
font-weight: $gl-font-weight-bold;
}

View File

@ -276,42 +276,24 @@ pre.light-well {
/*
* Projects list rendered on dashboard and user page
*/
.project-row {
.description p {
margin-bottom: 0;
color: $gl-text-color-secondary;
}
}
.projects-list {
@include basic-list;
display: flex;
flex-direction: column;
// Disable Flexbox for admin page
&.admin-projects,
&.group-settings-projects {
display: block;
.project-row {
display: block;
.description > p {
margin-bottom: 0;
}
}
}
.project-row {
@include basic-list-stats;
display: flex;
align-items: center;
padding: $gl-padding-12 0;
&.no-description {
@include media-breakpoint-up(sm) {
.avatar-container {
align-self: center;
}
.metadata-info {
margin-bottom: 0;
}
}
}
}
h2 {

View File

@ -1,7 +1,6 @@
- group = local_assigns.fetch(:group)
- css_class = "gl-display-flex!#{' no-description' if group.description.blank?}"
%li.group-row.gl-py-3.gl-align-items-center{ class: css_class, data: { qa_selector: 'group_row_content' } }
%li.group-row.gl-py-3.gl-align-items-center{ class: 'gl-display-flex!', data: { qa_selector: 'group_row_content' } }
.avatar-container.rect-avatar.s40.gl-flex-shrink-0
= group_icon(group, class: "avatar s40")

View File

@ -1,34 +1,34 @@
.js-projects-list-holder
- if @projects.any?
%ul.projects-list.content-list.admin-projects
%ul.content-list
- @projects.each do |project|
%li.project-row{ class: ('no-description' if project.description.blank?) }
.controls
= render Pajamas::ButtonComponent.new(href: edit_project_path(project), button_options: { id: "edit_#{dom_id(project)}" }) do
%li.project-row.gl-align-items-center{ class: 'gl-display-flex!' }
.avatar-container.rect-avatar.s40.gl-flex-shrink-0
= project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40)
.gl-min-w-0.gl-flex-grow-1
.title
= link_to(admin_project_path(project)) do
%span.project-full-name
%span.namespace-name
- if project.namespace
= project.namespace.human_name
\/
%span.project-name
= project.name
- if project.description.present?
.description
= markdown_field(project, :description)
.stats.gl-text-gray-500.gl-flex-shrink-0.gl-display-none.gl-sm-display-flex
= gl_badge_tag storage_counter(project.statistics&.storage_size)
= render_if_exists 'admin/projects/archived', project: project
.controls.gl-flex-shrink-0.gl-ml-5
= render Pajamas::ButtonComponent.new(href: edit_project_path(project), button_options: { id: dom_id(project, :edit) }) do
= s_('Edit')
= render Pajamas::ButtonComponent.new(variant: :danger, button_options: { class: 'delete-project-button', data: { delete_project_url: admin_project_path(project), project_name: project.name } } ) do
= s_('AdminProjects|Delete')
.stats
= gl_badge_tag storage_counter(project.statistics&.storage_size)
= render_if_exists 'admin/projects/archived', project: project
.title
= link_to(admin_project_path(project)) do
.dash-project-avatar
.avatar-container.rect-avatar.s40
= project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40)
%span.project-full-name
%span.namespace-name
- if project.namespace
= project.namespace.human_name
\/
%span.project-name
= project.name
- if project.description.present?
.description
= markdown_field(project, :description)
= paginate @projects, theme: 'gitlab'
- else
.nothing-here-block= _('No projects found')

View File

@ -2,7 +2,6 @@
- add_to_breadcrumbs _("Projects"), admin_projects_path
- breadcrumb_title @project.full_name
- page_title @project.full_name, _("Projects")
- @content_class = "admin-projects"
- current_user_is_group_owner = @group && @group.has_owner?(current_user)
%h1.page-title.gl-font-size-h-display

View File

@ -12,38 +12,36 @@
= link_to new_project_path(namespace_id: @group.id), class: "btn gl-button btn-sm btn-confirm" do
New project
- c.body do
%ul.projects-list.content-list.group-settings-projects
%ul.content-list
- @projects.each do |project|
%li.project-row{ class: ('no-description' if project.description.blank?) }
.controls
= render Pajamas::ButtonComponent.new(href: project_project_members_path(project), button_options: { id: "edit_#{dom_id(project)}" }) do
= _('Members')
= render Pajamas::ButtonComponent.new(href: edit_project_path(project), button_options: { id: "edit_#{dom_id(project)}" }) do
= _('Edit')
= render 'delete_project_button', project: project
%li.project-row.gl-align-items-center{ class: 'gl-display-flex!' }
.avatar-container.rect-avatar.s40.gl-flex-shrink-0
= project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40)
.gl-min-w-0.gl-flex-grow-1
.title
= link_to project_path(project), class: 'js-prefetch-document' do
%span.project-full-name
%span.namespace-name
- if project.namespace
= project.namespace.human_name
\/
%span.project-name
= project.name
%span{ class: visibility_level_color(project.visibility_level) }
= visibility_level_icon(project.visibility_level)
.stats
- if project.description.present?
.description
= markdown_field(project, :description)
.stats.gl-text-gray-500.gl-flex-shrink-0.gl-display-none.gl-sm-display-flex
= gl_badge_tag storage_counter(project.statistics&.storage_size)
= render 'project_badges', project: project
.title
= link_to project_path(project), class: 'js-prefetch-document' do
.dash-project-avatar
.avatar-container.rect-avatar.s40
= project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40)
%span.project-full-name
%span.namespace-name
- if project.namespace
= project.namespace.human_name
\/
%span.project-name
= project.name
%span{ class: visibility_level_color(project.visibility_level) }
= visibility_level_icon(project.visibility_level)
- if project.description.present?
.description
= markdown_field(project, :description)
.controls.gl-flex-shrink-0.gl-ml-5
= link_to _('Members'), project_project_members_path(project), id: dom_id(project, :edit), class: "btn gl-button"
= link_to _('Edit'), edit_project_path(project), id: dom_id(project, :edit), class: "btn gl-button"
= render 'delete_project_button', project: project
- if @projects.blank?
.nothing-here-block This group has no projects yet

View File

@ -35,7 +35,7 @@
= markdown_toolbar_button({ icon: "details-block",
data: { "md-tag" => "<details><summary>Click to expand</summary>\n{text}\n</details>", "md-prepend" => true, "md-select" => "Click to expand" },
title: _("Add a collapsible section") })
= markdown_toolbar_button({ icon: "table", data: { "md-tag" => "| header | header |\n| ------ | ------ |\n| cell | cell |\n| cell | cell |", "md-prepend" => true }, title: _("Add a table") })
= markdown_toolbar_button({ icon: "table", data: { "md-tag" => "| header | header |\n| ------ | ------ |\n| | |\n| | |", "md-prepend" => true }, title: _("Add a table") })
- if supports_file_upload
= render Pajamas::ButtonComponent.new(icon: 'paperclip', category: :tertiary, button_options: { 'aria-label': _("Attach a file or image"), class: 'has-tooltip js-attach-file-button', data: { testid: 'button-attach-file', container: 'body' } })
- if show_fullscreen_button

View File

@ -9,7 +9,7 @@
- compact_mode = false unless local_assigns[:compact_mode] == true
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && can_show_last_commit_in_list?(project)
- css_class = '' unless local_assigns[:css_class]
- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description
- css_class += " gl-display-flex!"
- cache_key = project_list_cache_key(project, pipeline_status: pipeline_status)
- updated_tooltip = time_ago_with_tooltip(project.last_activity_date)
- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project)
@ -18,7 +18,7 @@
- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon && last_pipeline.present?
- avatar_container_class = project.creator && use_creator_avatar ? '' : 'rect-avatar'
%li.project-row.d-flex{ class: css_class }
%li.project-row.gl-align-items-center{ class: css_class }
= cache(cache_key) do
- if avatar
.flex-grow-0.flex-shrink-0{ class: avatar_container_class }

View File

@ -1,11 +1,12 @@
-# "MaxBuilds" is a runner configuration keyword so it must not be translated.
- link = link_to 'MaxBuilds', 'https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section', target: '_blank', rel: 'noopener noreferrer'
- shared_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('ci/runners/runners_scope.md', anchor: 'shared-runners') }
%h4
= _('Shared runners')
.bs-callout{ data: { testid: 'shared-runners-description' } }
%p= _('These runners are shared across this GitLab instance.')
%p= s_('Runners|%{link_start}These runners%{link_end} are available to all groups and projects.').html_safe % { link_start: shared_link_start, link_end: '</a>'.html_safe }
- if Gitlab::CurrentSettings.shared_runners_text.present?
= markdown(Gitlab::CurrentSettings.current_application_settings.shared_runners_text)
- else

View File

@ -166,17 +166,17 @@ Introducing organizations allows GitLab to move towards a multi-tenant system th
Organizations solve the following problems:
1. We can group top-level namespaces by organization. This eliminates the difference between self-managed and GitLab.com. It is very similar to the initial concept of "instance groups". For example these two top-level namespaces would belong to the organization `GitLab`:
1. We can group top-level namespaces by organization. It is very similar to the initial concept of "instance groups". For example these two top-level namespaces would belong to the organization `GitLab`:
1. `https://gitlab.com/gitlab-org/`
1. `https://gitlab.com/gitlab-com/`
1. We can isolate organizations from each other. Top-level namespaces of the same organization can interact within organizations but are not allowed to interact with other namespaces in other organizations. This is useful for customers because it means an organization provides clear boundaries - similar to a self-managed instance. This means we don't have to aggregate user dashboards across everything and can locally scope them to organizations.
1. We don't need to define hierarchies inside an organization. It is a container that could be filled with whatever hierarchy / entity set makes sense (workspaces, top-level namespaces etc.)
1. Self-managed instances would set a default organization. One organization per instance.
1. Organizations can control user-profiles in a central way. This could be achieved by having an organization specific user-profile. Such a profile makes it possible for the organization administrators to control the user role in a company, enforce user e-mails, or show a graphical indicator of a user being part of the organization. An example would be a "GitLab Employee stamp" on comments.
1. Self-managed instances would set a default organization.
1. Organizations can control user-profiles in a central way. This could be achieved by having an organization specific user-profile. Such a profile makes it possible for the organization administrators to control the user role in a company, enforce user emails, or show a graphical indicator of a user being part of the organization. An example would be a "GitLab Employee stamp" on comments.
![Move to Organizations](2022-10-05-Pods-Organizations-Iteration0.png)
### Why would customers opt-in to Organizations?
#### Why would customers opt-in to Organizations?
By introducing organizations and Pods we can improve the reliability, performance and availability of our SaaS Platforms.
@ -186,7 +186,7 @@ Future iterations would create additional value but are beyond the scope of this
Organizations will likely be required in the future as well.
### Initial user experience
#### Initial user experience
1. We create a default `GitLab.com public` organization and assign all public top-level namespaces to it. This allows existing users to access all the data on GitLab.com, exactly as it does now.
1. Any user wanting to opt-in to the benefits of organizations will need to set a single default organization. Any attempts for these users to load a global page like `/dashboard` will end up redirecting to `/-/organizations/<DEFAULT_ORGANIZATION>/dashboard`.

View File

@ -176,7 +176,7 @@ in the Helm Chart configuration rather than the `Gemfile`.
#### Preserving backwards compatibility
Removing the `Gemfile` would break incoming e-mail processing for source
Removing the `Gemfile` would break incoming email processing for source
installs. For now, source installs are advised to upgrade manually to
the version specified in Omnibus and run `bin/mail_room` directly as
done with Omnibus.

View File

@ -298,7 +298,7 @@ sudo docker exec -it gitlab editor /etc/gitlab/gitlab.rb
Once you open `/etc/gitlab/gitlab.rb` make sure to set the `external_url` to
point to a valid URL.
To receive e-mails from GitLab you have to configure the
To receive emails from GitLab you have to configure the
[SMTP settings](https://docs.gitlab.com/omnibus/settings/smtp.html) because the GitLab Docker image doesn't
have an SMTP server installed. You may also be interested in
[enabling HTTPS](https://docs.gitlab.com/omnibus/settings/ssl.html).

View File

@ -168,7 +168,7 @@ Only one namespace can be linked to a subscription.
To change the password for this customers portal account:
1. Log in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in).
1. Select the **My account** drop-down and select **Account details**.
1. Select the **My account** dropdown list and select **Account details**.
1. Make the required changes to the **Your password** section.
1. Select **Save changes**.

View File

@ -122,7 +122,7 @@ Resetting a group-level default setting removes integrations that use default se
1. Navigate to **Project > Settings > Integrations**.
1. Choose the integration you want to enable or update.
1. From the drop-down, select **Use default settings**.
1. From the dropdown list, select **Use default settings**.
1. Ensure the toggle is set to **Enable integration**.
1. Select **Save changes**.
@ -130,6 +130,6 @@ Resetting a group-level default setting removes integrations that use default se
1. Navigate to project or group's **Settings > Integrations**.
1. Choose the integration you want to enable or update.
1. From the drop-down, select **Use custom settings**.
1. From the dropdown list, select **Use custom settings**.
1. Ensure the toggle is set to **Enable integration** and enter all required settings.
1. Select **Save changes**.

View File

@ -96,8 +96,8 @@ You can create a merge request from your fork to contribute back to the main pro
1. On the top bar, select **Main menu > Projects** and find your project.
1. Select your fork of the repository.
1. On the left menu, go to **Merge requests**, and select **New merge request**.
1. In the **Source branch** drop-down list box, select the branch in your forked repository as the source branch.
1. In the **Target branch** drop-down list box, select the branch from the upstream repository as the target branch.
1. In the **Source branch** dropdown list box, select the branch in your forked repository as the source branch.
1. In the **Target branch** dropdown list box, select the branch from the upstream repository as the target branch.
You can set a [default target project](#set-the-default-target-project) to
change the default target branch (which can be useful if you are working in a
forked project).

View File

@ -34490,6 +34490,9 @@ msgid_plural "Runners|%d selected runners deleted"
msgstr[0] ""
msgstr[1] ""
msgid "Runners|%{link_start}These runners%{link_end} are available to all groups and projects."
msgstr ""
msgid "Runners|%{percentage} spot."
msgstr ""
@ -40797,9 +40800,6 @@ msgstr ""
msgid "These runners are shared across projects in this group."
msgstr ""
msgid "These runners are shared across this GitLab instance."
msgstr ""
msgid "These runners are specific to this project."
msgstr ""

View File

@ -169,37 +169,70 @@ describe('Blob Embeddable', () => {
});
describe('URLS with hash', () => {
beforeEach(() => {
window.location.hash = '#LC2';
});
afterEach(() => {
window.location.hash = '';
});
it('renders simple viewer by default if URL contains hash', () => {
createComponent({
data: {},
describe('if hash starts with #LC', () => {
beforeEach(() => {
window.location.hash = '#LC2';
});
expect(wrapper.vm.activeViewerType).toBe(SimpleViewerMock.type);
expect(wrapper.findComponent(SimpleViewer).exists()).toBe(true);
});
it('renders simple viewer by default', () => {
createComponent({
data: {},
});
describe('switchViewer()', () => {
it('switches to the passed viewer', async () => {
createComponent();
wrapper.vm.switchViewer(RichViewerMock.type);
await nextTick();
expect(wrapper.vm.activeViewerType).toBe(RichViewerMock.type);
expect(wrapper.findComponent(RichViewer).exists()).toBe(true);
await wrapper.vm.switchViewer(SimpleViewerMock.type);
expect(wrapper.vm.activeViewerType).toBe(SimpleViewerMock.type);
expect(wrapper.findComponent(SimpleViewer).exists()).toBe(true);
});
describe('switchViewer()', () => {
it('switches to the passed viewer', async () => {
createComponent();
wrapper.vm.switchViewer(RichViewerMock.type);
await nextTick();
expect(wrapper.vm.activeViewerType).toBe(RichViewerMock.type);
expect(wrapper.findComponent(RichViewer).exists()).toBe(true);
await wrapper.vm.switchViewer(SimpleViewerMock.type);
expect(wrapper.vm.activeViewerType).toBe(SimpleViewerMock.type);
expect(wrapper.findComponent(SimpleViewer).exists()).toBe(true);
});
});
});
describe('if hash starts with anything else', () => {
beforeEach(() => {
window.location.hash = '#last-headline';
});
it('renders rich viewer by default', () => {
createComponent({
data: {},
});
expect(wrapper.vm.activeViewerType).toBe(RichViewerMock.type);
expect(wrapper.findComponent(RichViewer).exists()).toBe(true);
});
describe('switchViewer()', () => {
it('switches to the passed viewer', async () => {
createComponent();
wrapper.vm.switchViewer(SimpleViewerMock.type);
await nextTick();
expect(wrapper.vm.activeViewerType).toBe(SimpleViewerMock.type);
expect(wrapper.findComponent(SimpleViewer).exists()).toBe(true);
await wrapper.vm.switchViewer(RichViewerMock.type);
expect(wrapper.vm.activeViewerType).toBe(RichViewerMock.type);
expect(wrapper.findComponent(RichViewer).exists()).toBe(true);
});
});
});
});
});