Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-09-13 06:14:22 +00:00
parent ed191717b5
commit 2baf0eca39
15 changed files with 113 additions and 46 deletions

View File

@ -38,6 +38,7 @@ import {
TOKEN_TITLE_ORGANIZATION,
TOKEN_TITLE_RELEASE,
TOKEN_TITLE_TYPE,
FILTERED_SEARCH_TERM,
} from '~/vue_shared/components/filtered_search_bar/constants';
import IssuableList from '~/vue_shared/issuable/list/components/issuable_list_root.vue';
import { IssuableListTabs, IssuableStates } from '~/vue_shared/issuable/list/constants';
@ -466,6 +467,9 @@ export default {
issuesHelpPagePath() {
return helpPagePath('user/project/issues/index');
},
shouldDisableSomeFilters() {
return this.isAnonymousSearchDisabled && !this.isSignedIn;
},
},
watch: {
$route(newValue, oldValue) {
@ -582,13 +586,9 @@ export default {
this.issuesError = null;
},
handleFilter(filter) {
if (this.isAnonymousSearchDisabled && !this.isSignedIn) {
this.showAnonymousSearchingMessage();
return;
}
this.setFilterTokens(filter);
this.pageParams = getInitialPageParams(this.pageSize);
this.filterTokens = filter;
this.$router.push({ query: this.urlParams });
},
@ -678,6 +678,28 @@ export default {
Sentry.captureException(error);
});
},
setFilterTokens(filtersArg) {
const filters = this.removeDisabledSearchTerms(filtersArg);
this.filterTokens = filters;
// If we filtered something out, let's show a warning message
if (filters.length < filtersArg.length) {
this.showAnonymousSearchingMessage();
}
},
removeDisabledSearchTerms(filters) {
// If we shouldn't disable anything, let's return the same thing
if (!this.shouldDisableSomeFilters) {
return filters;
}
const filtersWithoutSearchTerms = filters.filter(
(token) => !(token.type === FILTERED_SEARCH_TERM && token.value?.data),
);
return filtersWithoutSearchTerms;
},
showAnonymousSearchingMessage() {
createFlash({
message: this.$options.i18n.anonymousSearchingMessage,
@ -724,17 +746,9 @@ export default {
sortKey = defaultSortKey;
}
const isSearchDisabled =
this.isAnonymousSearchDisabled &&
!this.isSignedIn &&
window.location.search.includes('search=');
if (isSearchDisabled) {
this.showAnonymousSearchingMessage();
}
this.exportCsvPathWithQuery = this.getExportCsvPathWithQuery();
this.filterTokens = isSearchDisabled ? [] : getFilterTokens(window.location.search);
this.setFilterTokens(getFilterTokens(window.location.search));
this.pageParams = getInitialPageParams(
this.pageSize,
isPositiveInteger(firstPageSize) ? parseInt(firstPageSize, 10) : undefined,

View File

@ -285,6 +285,19 @@ $gl-line-height-42: px-to-rem(42px);
padding-right: $gl-spacing-scale-10;
}
// TODO: will be moved to @gitlab/ui as part of https://gitlab.com/gitlab-org/gitlab/-/issues/349008
.gl-sm-mt-6 {
@include media-breakpoint-up(sm) {
margin-top: $gl-spacing-scale-6;
}
}
.gl-sm-mt-6\! {
@include media-breakpoint-up(sm) {
margin-top: $gl-spacing-scale-6 !important;
}
}
/*
All of the following (up until the "End gitlab-ui#1709" comment) will be moved
to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1709

View File

@ -625,6 +625,10 @@ class ApplicationSetting < ApplicationRecord
validates :inactive_projects_send_warning_email_after_months,
numericality: { only_integer: true, greater_than: 0, less_than: :inactive_projects_delete_after_months }
validates :cube_api_base_url,
addressable_url: { allow_localhost: true, allow_local_network: false },
allow_blank: true
attr_encrypted :asset_proxy_secret_key,
mode: :per_attribute_iv,
key: Settings.attr_encrypted_db_key_base_truncated,
@ -662,6 +666,7 @@ class ApplicationSetting < ApplicationRecord
attr_encrypted :database_grafana_api_key, encryption_options_base_32_aes_256_gcm.merge(encode: false, encode_iv: false)
attr_encrypted :arkose_labs_public_api_key, encryption_options_base_32_aes_256_gcm.merge(encode: false, encode_iv: false)
attr_encrypted :arkose_labs_private_api_key, encryption_options_base_32_aes_256_gcm.merge(encode: false, encode_iv: false)
attr_encrypted :cube_api_key, encryption_options_base_32_aes_256_gcm
validates :disable_feed_token,
inclusion: { in: [true, false], message: _('must be a boolean value') }

View File

@ -0,0 +1,8 @@
---
name: cube_api_proxy
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/96250
rollout_issue_url:
milestone: '15.4'
type: development
group: group::product_analytics
default_enabled: false

View File

@ -1,8 +0,0 @@
---
name: group_ip_restrictions_allow_global
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87579
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/362603
milestone: '15.1'
type: development
group: group::source code
default_enabled: false

View File

@ -0,0 +1,11 @@
# frozen_string_literal: true
class AddCubeApiKeyToApplicationSettings < Gitlab::Database::Migration[2.0]
def change
# rubocop:disable Migration/AddLimitToTextColumns
add_column :application_settings, :cube_api_base_url, :text
add_column :application_settings, :encrypted_cube_api_key, :binary
add_column :application_settings, :encrypted_cube_api_key_iv, :binary
# rubocop:enable Migration/AddLimitToTextColumns
end
end

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
class AddTextLimitToCubeApiBaseUrl < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
def up
add_text_limit :application_settings, :cube_api_base_url, 512
end
def down
remove_text_limit :application_settings, :cube_api_base_url
end
end

View File

@ -0,0 +1 @@
2e5f7b79076a35fdb61aec46dea27d45f81e47c20f962f12b494fc7a8c714813

View File

@ -0,0 +1 @@
4d7bde950a405f424c0bf3828d21e6bfd16746e091e177abfb397114c5b5b53c

View File

@ -11511,6 +11511,9 @@ CREATE TABLE application_settings (
deactivate_dormant_users_period integer DEFAULT 90 NOT NULL,
auto_ban_user_on_excessive_projects_download boolean DEFAULT false NOT NULL,
max_pages_custom_domains_per_project integer DEFAULT 0 NOT NULL,
cube_api_base_url text,
encrypted_cube_api_key bytea,
encrypted_cube_api_key_iv bytea,
CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)),
CONSTRAINT app_settings_container_registry_pre_import_tags_rate_positive CHECK ((container_registry_pre_import_tags_rate >= (0)::numeric)),
CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)),
@ -11542,6 +11545,7 @@ CREATE TABLE application_settings (
CONSTRAINT check_7ccfe2764a CHECK ((char_length(arkose_labs_namespace) <= 255)),
CONSTRAINT check_85a39b68ff CHECK ((char_length(encrypted_ci_jwt_signing_key_iv) <= 255)),
CONSTRAINT check_8dca35398a CHECK ((char_length(public_runner_releases_url) <= 255)),
CONSTRAINT check_8e7df605a1 CHECK ((char_length(cube_api_base_url) <= 512)),
CONSTRAINT check_9a719834eb CHECK ((char_length(secret_detection_token_revocation_url) <= 255)),
CONSTRAINT check_9c6c447a13 CHECK ((char_length(maintenance_mode_message) <= 255)),
CONSTRAINT check_a5704163cc CHECK ((char_length(secret_detection_revocation_token_types_url) <= 255)),

View File

@ -277,13 +277,8 @@ work in every repository. They can only be re-enabled by an administrator user o
## Configure globally-allowed IP address ranges
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87579) in GitLab 15.1 [with a flag](../../../administration/feature_flags.md) named `group_ip_restrictions_allow_global`. Disabled by default.
FLAG:
On self-managed GitLab, by default this feature is not available. To make it available
per group, ask an administrator to [enable the feature flag](../../../administration/feature_flags.md)
named `group_ip_restrictions_allow_global`.
On GitLab.com, this feature is available.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87579) in GitLab 15.1 [with a flag](../../../administration/feature_flags.md) named `group_ip_restrictions_allow_global`. Disabled by default.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/366445) in GitLab 15.4. [Feature flag `group_ip_restrictions_allow_global`](https://gitlab.com/gitlab-org/gitlab/-/issues/366445) removed.
This setting allows you to set IP address ranges to be combined with group-level IP allowlists.
It helps administrators prevent aspects of the GitLab installation from being blocked

View File

@ -349,13 +349,19 @@ The chart shows data for the last 500 workflow items.
- In the **From** field, select a start date.
- In the **To** field, select an end date.
## Tasks by type chart
## View tasks by type
This chart shows a cumulative count of issues and merge requests per day.
The **Tasks by type** chart displays the cumulative number of issues and merge requests per day for your group.
This chart uses the global page filters for displaying data based on the selected
group, projects, and time frame. The chart defaults to showing counts for issues but can be
toggled to show data for merge requests and further refined for specific group-level labels.
The chart uses the global page filters to display data based on the selected
group, projects, and time frame.
By default the top group-level labels (max. 10) are pre-selected, with the ability to
select up to a total of 15 labels.
To view tasks by type:
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Analytics > Value stream**.
1. Below the **Filter results** text box, select **Overview**. The **Tasks by type** chart displays below the **Total time** chart.
1. To switch between the task type, select the **Settings** (**{settings}**) dropdown list
and select **Issues** or **Merge Requests**.
1. To add or remove labels, select the **Settings** (**{settings}**) dropdown list
and select or search for a label. By default the top group-level labels (maximum 10) are selected. You can select a maximum of 15 labels.

View File

@ -53,7 +53,7 @@
"@gitlab/at.js": "1.5.7",
"@gitlab/favicon-overlay": "2.0.0",
"@gitlab/svgs": "3.3.0",
"@gitlab/ui": "43.14.0",
"@gitlab/ui": "43.16.0",
"@gitlab/visual-review-tools": "1.7.3",
"@gitlab/web-ide": "0.0.1-dev-20220815034418",
"@rails/actioncable": "6.1.4-7",

View File

@ -59,6 +59,8 @@ import {
WORK_ITEM_TYPE_ENUM_TEST_CASE,
} from '~/work_items/constants';
import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants';
jest.mock('@sentry/browser');
jest.mock('~/flash');
jest.mock('~/lib/utils/scroll_utils', () => ({ scrollUp: jest.fn() }));
@ -429,8 +431,9 @@ describe('CE IssuesListApp component', () => {
});
});
it('is not set from url params', () => {
expect(findIssuableList().props('initialFilterValue')).toEqual([]);
it('is set from url params and removes search terms', () => {
const expected = filteredTokens.filter((token) => token.type !== FILTERED_SEARCH_TERM);
expect(findIssuableList().props('initialFilterValue')).toEqual(expected);
});
it('shows an alert to tell the user they must be signed in to search', () => {
@ -1006,8 +1009,9 @@ describe('CE IssuesListApp component', () => {
findIssuableList().vm.$emit('filter', filteredTokens);
});
it('does not update url params', () => {
expect(router.push).not.toHaveBeenCalled();
it('removes search terms', () => {
const expected = filteredTokens.filter((token) => token.type !== FILTERED_SEARCH_TERM);
expect(findIssuableList().props('initialFilterValue')).toEqual(expected);
});
it('shows an alert to tell the user they must be signed in to search', () => {

View File

@ -1064,10 +1064,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-3.3.0.tgz#99b044484fcf3d5a6431281e320e2405540ff5a9"
integrity sha512-S8Hqf+ms8aNrSgmci9SVoIyj/0qQnizU5uV5vUPAOwiufMDFDyI5qfcgn4EYZ6mnju3LiO+ReSL/PPTD4qNgHA==
"@gitlab/ui@43.14.0":
version "43.14.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-43.14.0.tgz#3f68f73977ad1e5403326af3dc9f6569f527c06b"
integrity sha512-tUqJ4c77m0rr3py9yEJG3+kANzs0Kao03Yi/7aaNsYMjzYBtt5V0fm0iQrv9plUl+vli2k+TFNYqf5MVxu6XZA==
"@gitlab/ui@43.16.0":
version "43.16.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-43.16.0.tgz#cb383b5ca95b7b3d3fbb5d134a71676050c0aa20"
integrity sha512-wdB2Mjto7UgLaeeW6mSmUiWW2xxhl98msB18kcDFqth2cJ59JHvA6eUydmt8Es6pJ9kKj7MLUiC64wEaNgpQBA==
dependencies:
"@popperjs/core" "^2.11.2"
bootstrap-vue "2.20.1"