Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
47da688506
commit
ebe0e306bb
|
|
@ -70,6 +70,7 @@ eslint-report.html
|
|||
/tags
|
||||
/vendor/bundle/*
|
||||
/vendor/gitaly-ruby
|
||||
/vendor/package_metadata_db/
|
||||
/builds*
|
||||
/.gitlab_workhorse_secret
|
||||
/.gitlab_pages_secret
|
||||
|
|
|
|||
|
|
@ -59,11 +59,11 @@ stages:
|
|||
- job: download-knapsack-report
|
||||
artifacts: true
|
||||
optional: true
|
||||
- job: check-release-set
|
||||
variables:
|
||||
QA_GENERATE_ALLURE_REPORT: "true"
|
||||
QA_CAN_TEST_PRAEFECT: "false"
|
||||
QA_INTERCEPT_REQUESTS: "true"
|
||||
QA_RUN_TYPE: e2e-package-and-test
|
||||
EE_LICENSE: $QA_EE_LICENSE
|
||||
GITHUB_ACCESS_TOKEN: $QA_GITHUB_ACCESS_TOKEN
|
||||
GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN
|
||||
|
|
@ -155,7 +155,6 @@ trigger-omnibus:
|
|||
RUBY3_BUILD: $OMNIBUS_GITLAB_RUBY3_BUILD
|
||||
RUBY2_BUILD: $OMNIBUS_GITLAB_RUBY2_BUILD
|
||||
CACHE_EDITION: $OMNIBUS_GITLAB_CACHE_EDITION
|
||||
SKIP_QA_DOCKER: "true"
|
||||
SKIP_QA_TEST: "true"
|
||||
ee: "true"
|
||||
trigger:
|
||||
|
|
@ -642,7 +641,6 @@ e2e-test-report:
|
|||
GITLAB_AUTH_TOKEN: $PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE
|
||||
ALLURE_PROJECT_PATH: $CI_PROJECT_PATH
|
||||
ALLURE_MERGE_REQUEST_IID: $CI_MERGE_REQUEST_IID
|
||||
ALLURE_JOB_NAME: e2e-package-and-test
|
||||
GIT_STRATEGY: none
|
||||
|
||||
upload-knapsack-report:
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ variables:
|
|||
OMNIBUS_GITLAB_RUBY3_BUILD: "false"
|
||||
OMNIBUS_GITLAB_RUBY2_BUILD: "false"
|
||||
OMNIBUS_GITLAB_CACHE_EDITION: "GITLAB"
|
||||
ALLURE_JOB_NAME: $CI_PROJECT_NAME
|
||||
QA_LOG_LEVEL: "info"
|
||||
QA_TESTS: ""
|
||||
QA_FEATURE_FLAGS: ""
|
||||
|
|
|
|||
|
|
@ -1143,9 +1143,7 @@ RSpec/MissingFeatureCategory:
|
|||
- 'ee/spec/lib/quality/seeders/vulnerabilities_spec.rb'
|
||||
- 'ee/spec/lib/sidebars/groups/menus/administration_menu_spec.rb'
|
||||
- 'ee/spec/lib/sidebars/groups/menus/analytics_menu_spec.rb'
|
||||
- 'ee/spec/lib/sidebars/groups/menus/epics_menu_spec.rb'
|
||||
- 'ee/spec/lib/sidebars/groups/menus/security_compliance_menu_spec.rb'
|
||||
- 'ee/spec/lib/sidebars/groups/menus/wiki_menu_spec.rb'
|
||||
- 'ee/spec/lib/slack/api_spec.rb'
|
||||
- 'ee/spec/lib/slack/block_kit/app_home_opened_spec.rb'
|
||||
- 'ee/spec/lib/slack/block_kit/incident_management/incident_modal_opened_spec.rb'
|
||||
|
|
@ -5400,37 +5398,22 @@ RSpec/MissingFeatureCategory:
|
|||
- 'spec/lib/sidebars/concerns/container_with_html_options_spec.rb'
|
||||
- 'spec/lib/sidebars/concerns/link_with_html_options_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/ci_cd_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/group_information_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/invite_team_members_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/issues_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/kubernetes_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/merge_requests_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/observability_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/packages_registries_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/scope_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/groups/menus/settings_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/menu_item_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/context_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/analytics_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/ci_cd_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/confluence_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/deployments_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/external_issue_tracker_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/external_wiki_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/hidden_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/infrastructure_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/invite_team_members_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/issues_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/merge_requests_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/monitor_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/packages_registries_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/project_information_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/scope_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/security_compliance_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/settings_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/shimo_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/snippets_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/wiki_menu_spec.rb'
|
||||
- 'spec/lib/sidebars/projects/menus/zentao_menu_spec.rb'
|
||||
- 'spec/lib/system_check/app/authorized_keys_permission_check_spec.rb'
|
||||
- 'spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb'
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
f99ae76f9fecec6c162dbd990845ba9c7c5727d6
|
||||
1739a8ca9a5786b4730620b742153f45e00cb094
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { DEFAULT_PER_PAGE } from '~/api';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { __ } from '~/locale';
|
||||
import axios from '../lib/utils/axios_utils';
|
||||
import { buildApiUrl } from './api_utils';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { GlIcon, GlLink, GlSprintf } from '@gitlab/ui';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import Api from '~/api';
|
||||
import { __ } from '~/locale';
|
||||
import state from '../state';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { GlModal, GlButton } from '@gitlab/ui';
|
||||
import { mapActions, mapState, mapGetters } from 'vuex';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { __, sprintf } from '~/locale';
|
||||
import { modalTypes } from '../../constants';
|
||||
import { trimPathComponents, getPathParent } from '../../utils';
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
import { SourceEditorExtension } from '~/editor/extensions/source_editor_extension_base';
|
||||
import { EditorWebIdeExtension } from '~/editor/extensions/source_editor_webide_ext';
|
||||
import SourceEditor from '~/editor/source_editor';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import ModelManager from '~/ide/lib/common/model_manager';
|
||||
import { defaultDiffEditorOptions, defaultEditorOptions } from '~/ide/lib/editor_options';
|
||||
import { __ } from '~/locale';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { escape } from 'lodash';
|
||||
import Vue from 'vue';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { HTTP_STATUS_NOT_FOUND } from '~/lib/utils/http_status';
|
||||
import { visitUrl } from '~/lib/utils/url_utility';
|
||||
import { __, sprintf } from '~/locale';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { __ } from '~/locale';
|
||||
import { leftSidebarViews, PERMISSION_READ_MR, MAX_MR_FILES_AUTO_OPEN } from '../../constants';
|
||||
import service from '../../services';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { escape } from 'lodash';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { __, sprintf } from '~/locale';
|
||||
import { logError } from '~/lib/logger';
|
||||
import api from '~/api';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { addNumericSuffix } from '~/ide/utils';
|
||||
import { sprintf, __ } from '~/locale';
|
||||
import Tracking from '~/tracking';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { HTTP_STATUS_NOT_FOUND, HTTP_STATUS_UNPROCESSABLE_ENTITY } from '~/lib/utils/http_status';
|
||||
import * as terminalService from '../../../../services/terminals';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import * as messages from '../messages';
|
||||
import * as types from '../mutation_types';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { GlDropdown, GlSearchBoxByType } from '@gitlab/ui';
|
|||
import { debounce } from 'lodash';
|
||||
|
||||
import { s__ } from '~/locale';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import searchNamespacesWhereUserCanCreateProjectsQuery from '~/projects/new/queries/search_namespaces_where_user_can_create_projects.query.graphql';
|
||||
import { DEBOUNCE_DELAY } from '~/vue_shared/components/filtered_search_bar/constants';
|
||||
import { MINIMUM_SEARCH_LENGTH } from '~/graphql_shared/constants';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { GlSprintf, GlModal } from '@gitlab/ui';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { HTTP_STATUS_NOT_FOUND } from '~/lib/utils/http_status';
|
||||
import { redirectTo } from '~/lib/utils/url_utility';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { GlModal } from '@gitlab/ui';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { visitUrl } from '~/lib/utils/url_utility';
|
||||
import { __, s__, sprintf } from '~/locale';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { sanitize } from '~/lib/dompurify';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { __ } from '~/locale';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { GlEmptyState } from '@gitlab/ui';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { n__ } from '~/locale';
|
||||
import { joinPaths } from '~/lib/utils/url_utility';
|
||||
import RegistryList from '~/packages_and_registries/shared/components/registry_list.vue';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { GlResizeObserverDirective, GlEmptyState } from '@gitlab/ui';
|
||||
import { GlBreakpointInstance } from '@gitlab/ui/dist/utils';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { joinPaths } from '~/lib/utils/url_utility';
|
||||
import Tracking from '~/tracking';
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
} from '@gitlab/ui';
|
||||
import { get } from 'lodash';
|
||||
import getContainerRepositoriesQuery from 'shared_queries/container_registry/get_container_repositories.query.graphql';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import Tracking from '~/tracking';
|
||||
import PersistedSearch from '~/packages_and_registries/shared/components/persisted_search.vue';
|
||||
import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
TAG_LABEL,
|
||||
} from '~/packages_and_registries/harbor_registry/constants/index';
|
||||
import { OPERATORS_IS } from '~/vue_shared/components/filtered_search_bar/constants';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
|
||||
import TagsLoader from '~/packages_and_registries/shared/components/tags_loader.vue';
|
||||
import ArtifactsList from '~/packages_and_registries/harbor_registry/components/details/artifacts_list.vue';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import TagsList from '~/packages_and_registries/harbor_registry/components/tags/
|
|||
import { getHarborTags } from '~/rest_api';
|
||||
import { FETCH_TAGS_ERROR_MESSAGE } from '~/packages_and_registries/harbor_registry/constants';
|
||||
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { formatPagination } from '~/packages_and_registries/harbor_registry/utils';
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
dockerPushCommand,
|
||||
dockerLoginCommand,
|
||||
} from '~/packages_and_registries/harbor_registry/utils';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import {
|
||||
SORT_FIELDS,
|
||||
CONNECTION_ERROR_TITLE,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Api from '~/api';
|
||||
import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/flash';
|
||||
import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/alert';
|
||||
import {
|
||||
DELETE_PACKAGE_ERROR_MESSAGE,
|
||||
DELETE_PACKAGE_FILE_ERROR_MESSAGE,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { GlEmptyState, GlLink, GlSprintf } from '@gitlab/ui';
|
||||
import { mapActions, mapState } from 'vuex';
|
||||
import { createAlert, VARIANT_INFO } from '~/flash';
|
||||
import { createAlert, VARIANT_INFO } from '~/alert';
|
||||
import { historyReplaceState } from '~/lib/utils/common_utils';
|
||||
import { s__ } from '~/locale';
|
||||
import { SHOW_DELETE_SUCCESS_ALERT } from '~/packages_and_registries/shared/constants';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Api from '~/api';
|
||||
import { createAlert, VARIANT_SUCCESS } from '~/flash';
|
||||
import { createAlert, VARIANT_SUCCESS } from '~/alert';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { DELETE_PACKAGE_ERROR_MESSAGE } from '~/packages_and_registries/shared/constants';
|
||||
import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import destroyPackagesMutation from '~/packages_and_registries/package_registry/graphql/mutations/destroy_packages.mutation.graphql';
|
||||
import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/flash';
|
||||
import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/alert';
|
||||
|
||||
import {
|
||||
DELETE_PACKAGE_ERROR_MESSAGE,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
GlTabs,
|
||||
GlSprintf,
|
||||
} from '@gitlab/ui';
|
||||
import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/flash';
|
||||
import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/alert';
|
||||
import { TYPENAME_PACKAGES_PACKAGE } from '~/graphql_shared/constants';
|
||||
import { convertToGraphQLId } from '~/graphql_shared/utils';
|
||||
import { numberToHumanSize } from '~/lib/utils/number_utils';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { GlEmptyState, GlLink, GlSprintf } from '@gitlab/ui';
|
||||
import { createAlert, VARIANT_INFO } from '~/flash';
|
||||
import { createAlert, VARIANT_INFO } from '~/alert';
|
||||
import { historyReplaceState } from '~/lib/utils/common_utils';
|
||||
import { s__ } from '~/locale';
|
||||
import { SHOW_DELETE_SUCCESS_ALERT } from '~/packages_and_registries/shared/constants';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import axios from './lib/utils/axios_utils';
|
||||
import { parseBoolean } from './lib/utils/common_utils';
|
||||
import { __ } from './locale';
|
||||
|
|
|
|||
|
|
@ -14,11 +14,6 @@ export const I18N = {
|
|||
wildcardsHelpText: s__(
|
||||
'BranchRules|%{linkStart}Wildcards%{linkEnd} such as *-stable or production/ are supported',
|
||||
),
|
||||
forcePushTitle: s__('BranchRules|Force push'),
|
||||
allowForcePushDescription: s__(
|
||||
'BranchRules|All users with push access are allowed to force push.',
|
||||
),
|
||||
disallowForcePushDescription: s__('BranchRules|Force push is not allowed.'),
|
||||
approvalsTitle: s__('BranchRules|Approvals'),
|
||||
manageApprovalsLinkTitle: s__('BranchRules|Manage in merge request approvals'),
|
||||
approvalsDescription: s__(
|
||||
|
|
@ -33,6 +28,9 @@ export const I18N = {
|
|||
allowedToPushHeader: s__('BranchRules|Allowed to push and merge (%{total})'),
|
||||
allowedToMergeHeader: s__('BranchRules|Allowed to merge (%{total})'),
|
||||
approvalsHeader: s__('BranchRules|Required approvals (%{total})'),
|
||||
allowForcePushTitle: s__('BranchRules|Allows force push'),
|
||||
doesNotAllowForcePushTitle: s__('BranchRules|Does not allow force push'),
|
||||
forcePushDescription: s__('BranchRules|From users with push access.'),
|
||||
requiresCodeOwnerApprovalTitle: s__('BranchRules|Requires approval from code owners'),
|
||||
doesNotRequireCodeOwnerApprovalTitle: s__(
|
||||
'BranchRules|Does not require approval from code owners',
|
||||
|
|
|
|||
|
|
@ -70,10 +70,15 @@ export default {
|
|||
};
|
||||
},
|
||||
computed: {
|
||||
forcePushDescription() {
|
||||
return this.branchProtection?.allowForcePush
|
||||
? this.$options.i18n.allowForcePushDescription
|
||||
: this.$options.i18n.disallowForcePushDescription;
|
||||
forcePushAttributes() {
|
||||
const { allowForcePush } = this.branchProtection;
|
||||
const icon = allowForcePush ? REQUIRED_ICON : NOT_REQUIRED_ICON;
|
||||
const iconClass = allowForcePush ? REQUIRED_ICON_CLASS : NOT_REQUIRED_ICON_CLASS;
|
||||
const title = allowForcePush
|
||||
? this.$options.i18n.allowForcePushTitle
|
||||
: this.$options.i18n.doesNotAllowForcePushTitle;
|
||||
|
||||
return { icon, iconClass, title };
|
||||
},
|
||||
codeOwnersApprovalAttributes() {
|
||||
const { codeOwnerApprovalRequired } = this.branchProtection;
|
||||
|
|
@ -184,10 +189,6 @@ export default {
|
|||
:groups="pushAccessLevels.groups"
|
||||
/>
|
||||
|
||||
<!-- Force push -->
|
||||
<strong>{{ $options.i18n.forcePushTitle }}</strong>
|
||||
<p>{{ forcePushDescription }}</p>
|
||||
|
||||
<!-- Allowed to merge -->
|
||||
<protection
|
||||
:header="allowedToMergeHeader"
|
||||
|
|
@ -198,11 +199,25 @@ export default {
|
|||
:groups="mergeAccessLevels.groups"
|
||||
/>
|
||||
|
||||
<!-- Force push -->
|
||||
<div class="gl-display-flex gl-align-items-center">
|
||||
<gl-icon
|
||||
:size="14"
|
||||
data-testid="force-push-icon"
|
||||
:name="forcePushAttributes.icon"
|
||||
:class="forcePushAttributes.iconClass"
|
||||
/>
|
||||
<strong class="gl-ml-2">{{ forcePushAttributes.title }}</strong>
|
||||
</div>
|
||||
|
||||
<div class="gl-text-gray-400 gl-mb-2">{{ $options.i18n.forcePushDescription }}</div>
|
||||
|
||||
<!-- EE start -->
|
||||
<!-- Code Owners -->
|
||||
<div v-if="showCodeOwners">
|
||||
<div class="gl-display-flex gl-align-items-center">
|
||||
<gl-icon
|
||||
data-testid="code-owners-icon"
|
||||
:size="14"
|
||||
:name="codeOwnersApprovalAttributes.icon"
|
||||
:class="codeOwnersApprovalAttributes.iconClass"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import $ from 'jquery';
|
||||
import CreateItemDropdown from '~/create_item_dropdown';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import AccessorUtilities from '~/lib/utils/accessor';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { __ } from '~/locale';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { find } from 'lodash';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { __ } from '~/locale';
|
||||
import AccessDropdown from '~/projects/settings/access_dropdown';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { refreshUserMergeRequestCounts } from '~/commons/nav/user_merge_requests';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { TYPE_ISSUE } from '~/issues/constants';
|
||||
import { __ } from '~/locale';
|
||||
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { GlDropdownItem } from '@gitlab/ui';
|
||||
import Vue from 'vue';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { TYPE_ALERT, TYPE_ISSUE, TYPE_MERGE_REQUEST } from '~/issues/constants';
|
||||
import { __, n__ } from '~/locale';
|
||||
import UserSelect from '~/vue_shared/components/user_select/user_select.vue';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { GlIcon, GlLink, GlPopover, GlTooltipDirective } from '@gitlab/ui';
|
||||
import { __, n__, sprintf } from '~/locale';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { convertToGraphQLId, getIdFromGraphQLId } from '~/graphql_shared/utils';
|
||||
import { TYPENAME_ISSUE } from '~/graphql_shared/constants';
|
||||
import getIssueCrmContactsQuery from '../../queries/get_issue_crm_contacts.query.graphql';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import ProjectSelect from '~/sidebar/components/move/issuable_move_dropdown.vue';
|
||||
import { __ } from '~/locale';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { visitUrl } from '~/lib/utils/url_utility';
|
||||
import moveIssueMutation from '../../queries/move_issue.mutation.graphql';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { GlAlert } from '@gitlab/ui';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { logError } from '~/lib/logger';
|
||||
import { s__ } from '~/locale';
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
// It will soon be overhauled in Issue https://gitlab.com/gitlab-org/gitlab/-/issues/233736
|
||||
import Vue from 'vue';
|
||||
import { refreshUserMergeRequestCounts } from '~/commons/nav/user_merge_requests';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { TYPE_ISSUE } from '~/issues/constants';
|
||||
import { __ } from '~/locale';
|
||||
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { GlDropdown, GlDropdownItem, GlTooltip, GlSprintf } from '@gitlab/ui';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { TYPE_INCIDENT } from '~/issues/constants';
|
||||
import SidebarEditableItem from '~/sidebar/components/sidebar_editable_item.vue';
|
||||
import updateIssuableSeverity from '../../queries/update_issuable_severity.mutation.graphql';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { GlLoadingIcon, GlTableLite, GlButton, GlTooltipDirective } from '@gitlab/ui';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { TYPENAME_ISSUE, TYPENAME_MERGE_REQUEST } from '~/graphql_shared/constants';
|
||||
import { convertToGraphQLId } from '~/graphql_shared/utils';
|
||||
import { TYPE_ISSUE } from '~/issues/constants';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { GlButton, GlIcon, GlTooltipDirective } from '@gitlab/ui';
|
||||
import { produce } from 'immer';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { __, sprintf } from '~/locale';
|
||||
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
|
||||
import Tracking from '~/tracking';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { __ } from '~/locale';
|
||||
import toast from '~/vue_shared/plugins/global_toast';
|
||||
import { visitUrl } from '~/lib/utils/url_utility';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable consistent-return */
|
||||
|
||||
import $ from 'jquery';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import { loadingIconForLegacyJS } from '~/loading_icon_for_legacy_js';
|
||||
import { spriteIcon } from '~/lib/utils/common_utils';
|
||||
import FilesCommentButton from './files_comment_button';
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ export default {
|
|||
isSubmittingSpam: false,
|
||||
errorMessage: '',
|
||||
canCreateSnippet: false,
|
||||
isDeleteModalVisible: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -164,10 +165,10 @@ export default {
|
|||
: `${gon.relative_url_root}dashboard/snippets`;
|
||||
},
|
||||
closeDeleteModal() {
|
||||
this.$refs.deleteModal.hide();
|
||||
this.isDeleteModalVisible = false;
|
||||
},
|
||||
showDeleteModal() {
|
||||
this.$refs.deleteModal.show();
|
||||
this.isDeleteModalVisible = true;
|
||||
},
|
||||
deleteSnippet() {
|
||||
this.isLoading = true;
|
||||
|
|
@ -291,12 +292,22 @@ export default {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<gl-modal ref="deleteModal" modal-id="delete-modal" title="Example title">
|
||||
<gl-modal
|
||||
ref="deleteModal"
|
||||
v-model="isDeleteModalVisible"
|
||||
modal-id="delete-modal"
|
||||
title="Example title"
|
||||
>
|
||||
<template #modal-title>{{ __('Delete snippet?') }}</template>
|
||||
|
||||
<gl-alert v-if="errorMessage" variant="danger" class="mb-2" @dismiss="errorMessage = ''">{{
|
||||
errorMessage
|
||||
}}</gl-alert>
|
||||
<gl-alert
|
||||
v-if="errorMessage"
|
||||
variant="danger"
|
||||
class="mb-2"
|
||||
data-testid="delete-alert"
|
||||
@dismiss="errorMessage = ''"
|
||||
>{{ errorMessage }}</gl-alert
|
||||
>
|
||||
|
||||
<gl-sprintf :message="__('Are you sure you want to delete %{name}?')">
|
||||
<template #name>
|
||||
|
|
@ -311,6 +322,7 @@ export default {
|
|||
category="primary"
|
||||
:disabled="isLoading"
|
||||
data-qa-selector="delete_snippet_button"
|
||||
data-testid="delete-snippet"
|
||||
@click="deleteSnippet"
|
||||
>
|
||||
<gl-loading-icon v-if="isLoading" size="sm" inline />
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export default {
|
|||
v-gl-tooltip
|
||||
:title="tooltipText"
|
||||
:tooltip-placement="tooltipPlacement"
|
||||
class="gl-ml-3"
|
||||
class="gl-ml-1"
|
||||
data-testid="user-avatar-link-username"
|
||||
>
|
||||
{{ username }}
|
||||
|
|
|
|||
|
|
@ -288,16 +288,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController
|
|||
def authorize_update_environment!
|
||||
access_denied! unless can?(current_user, :update_environment, environment)
|
||||
end
|
||||
|
||||
def append_info_to_payload(payload)
|
||||
super
|
||||
|
||||
return unless Feature.enabled?(:environments_search_logging) && params[:search].present?
|
||||
|
||||
# Merging to :metadata will ensure these are logged as top level keys
|
||||
payload[:metadata] ||= {}
|
||||
payload[:metadata]['meta.environment.search'] = params[:search]
|
||||
end
|
||||
end
|
||||
|
||||
Projects::EnvironmentsController.prepend_mod_with('Projects::EnvironmentsController')
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ module SidebarsHelper
|
|||
Sidebars::Projects::SuperSidebarPanel.new(context)
|
||||
when 'group'
|
||||
context = group_sidebar_context(group, user, **context_adds)
|
||||
Sidebars::Groups::Panel.new(context)
|
||||
Sidebars::Groups::SuperSidebarPanel.new(context)
|
||||
else
|
||||
Sidebars::YourWork::Panel.new(Sidebars::Context.new(current_user: user, container: nil, **context_adds))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -89,6 +89,14 @@ class Project < ApplicationRecord
|
|||
|
||||
DEFAULT_SQUASH_COMMIT_TEMPLATE = '%{title}'
|
||||
|
||||
PROJECT_FEATURES_DEFAULTS = {
|
||||
issues: gitlab_config_features.issues,
|
||||
merge_requests: gitlab_config_features.merge_requests,
|
||||
builds: gitlab_config_features.builds,
|
||||
wiki: gitlab_config_features.wiki,
|
||||
snippets: gitlab_config_features.snippets
|
||||
}.freeze
|
||||
|
||||
cache_markdown_field :description, pipeline: :description
|
||||
|
||||
attribute :packages_enabled, default: true
|
||||
|
|
@ -101,18 +109,13 @@ class Project < ApplicationRecord
|
|||
attribute :autoclose_referenced_issues, default: true
|
||||
attribute :ci_config_path, default: -> { Gitlab::CurrentSettings.default_ci_config_path }
|
||||
|
||||
default_value_for :issues_enabled, gitlab_config_features.issues
|
||||
default_value_for :merge_requests_enabled, gitlab_config_features.merge_requests
|
||||
default_value_for :builds_enabled, gitlab_config_features.builds
|
||||
default_value_for :wiki_enabled, gitlab_config_features.wiki
|
||||
default_value_for :snippets_enabled, gitlab_config_features.snippets
|
||||
|
||||
add_authentication_token_field :runners_token,
|
||||
encrypted: -> { Feature.enabled?(:projects_tokens_optional_encryption) ? :optional : :required },
|
||||
prefix: RunnersTokenPrefixable::RUNNERS_TOKEN_PREFIX
|
||||
|
||||
# Storage specific hooks
|
||||
after_initialize :use_hashed_storage
|
||||
after_initialize :set_project_feature_defaults, if: :new_record?
|
||||
before_validation :mark_remote_mirrors_for_removal, if: -> { RemoteMirror.table_exists? }
|
||||
|
||||
before_validation :ensure_project_namespace_in_sync
|
||||
|
|
@ -951,27 +954,35 @@ class Project < ApplicationRecord
|
|||
.where(pending_delete: false)
|
||||
.where(archived: false)
|
||||
end
|
||||
|
||||
def project_features_defaults
|
||||
PROJECT_FEATURES_DEFAULTS
|
||||
end
|
||||
end
|
||||
|
||||
def initialize(attributes = nil)
|
||||
# We can't use default_value_for because the database has a default
|
||||
# value of 0 for visibility_level. If someone attempts to create a
|
||||
# private project, default_value_for will assume that the
|
||||
# visibility_level hasn't changed and will use the application
|
||||
# setting default, which could be internal or public. For projects
|
||||
# inside a private group, those levels are invalid.
|
||||
#
|
||||
# To fix the problem, we assign the actual default in the application if
|
||||
# no explicit visibility has been initialized.
|
||||
# We assign the actual snippet default if no explicit visibility has been initialized.
|
||||
attributes ||= {}
|
||||
|
||||
unless visibility_attribute_present?(attributes)
|
||||
attributes[:visibility_level] = Gitlab::CurrentSettings.default_project_visibility
|
||||
end
|
||||
|
||||
@init_attributes = attributes
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
# Remove along with ProjectFeaturesCompatibility module
|
||||
def set_project_feature_defaults
|
||||
self.class.project_features_defaults.each do |attr, value|
|
||||
# If the deprecated _enabled or the accepted _access_level attribute is specified, we don't need to set the default
|
||||
next unless @init_attributes[:"#{attr}_enabled"].nil? && @init_attributes[:"#{attr}_access_level"].nil?
|
||||
|
||||
public_send("#{attr}_enabled=", value) # rubocop:disable GitlabSecurity/PublicSend
|
||||
end
|
||||
end
|
||||
|
||||
def parent_loaded?
|
||||
association(:namespace).loaded?
|
||||
end
|
||||
|
|
@ -1176,15 +1187,6 @@ class Project < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
# Because we use default_value_for we need to be sure
|
||||
# packages_enabled= method does exist even if we rollback migration.
|
||||
# Otherwise many tests from spec/migrations will fail.
|
||||
def packages_enabled=(value)
|
||||
if has_attribute?(:packages_enabled)
|
||||
write_attribute(:packages_enabled, value)
|
||||
end
|
||||
end
|
||||
|
||||
def cleanup
|
||||
@repository = nil
|
||||
end
|
||||
|
|
|
|||
|
|
@ -203,14 +203,7 @@ class Snippet < ApplicationRecord
|
|||
end
|
||||
|
||||
def initialize(attributes = {})
|
||||
# We can't use default_value_for because the database has a default
|
||||
# value of 0 for visibility_level. If someone attempts to create a
|
||||
# private snippet, default_value_for will assume that the
|
||||
# visibility_level hasn't changed and will use the application
|
||||
# setting default, which could be internal or public.
|
||||
#
|
||||
# To fix the problem, we assign the actual snippet default if no
|
||||
# explicit visibility has been initialized.
|
||||
# We assign the actual snippet default if no explicit visibility has been initialized.
|
||||
attributes ||= {}
|
||||
|
||||
unless visibility_attribute_present?(attributes)
|
||||
|
|
|
|||
|
|
@ -7,34 +7,48 @@ class WikiDirectory
|
|||
|
||||
validates :slug, presence: true
|
||||
alias_method :to_param, :slug
|
||||
# Groups a list of wiki pages into a nested collection of WikiPage and WikiDirectory objects,
|
||||
# preserving the order of the passed pages.
|
||||
#
|
||||
# Returns an array with all entries for the toplevel directory.
|
||||
#
|
||||
# @param [Array<WikiPage>] pages
|
||||
# @return [Array<WikiPage, WikiDirectory>]
|
||||
#
|
||||
def self.group_pages(pages)
|
||||
# Build a hash to map paths to created WikiDirectory objects,
|
||||
# and recursively create them for each level of the path.
|
||||
# For the toplevel directory we use '' as path, as that's what WikiPage#directory returns.
|
||||
directories = Hash.new do |_, path|
|
||||
directories[path] = new(path).tap do |directory|
|
||||
if path.present?
|
||||
parent = File.dirname(path)
|
||||
parent = '' if parent == '.'
|
||||
directories[parent].entries << directory
|
||||
directories[parent].entries.delete_if { |item| item.is_a?(WikiPage) && item.slug == directory.slug }
|
||||
class << self
|
||||
# Groups a list of wiki pages into a nested collection of WikiPage and WikiDirectory objects,
|
||||
# preserving the order of the passed pages.
|
||||
#
|
||||
# Returns an array with all entries for the toplevel directory.
|
||||
#
|
||||
# @param [Array<WikiPage>] pages
|
||||
# @return [Array<WikiPage, WikiDirectory>]
|
||||
#
|
||||
def group_pages(pages)
|
||||
# Build a hash to map paths to created WikiDirectory objects,
|
||||
# and recursively create them for each level of the path.
|
||||
# For the toplevel directory we use '' as path, as that's what WikiPage#directory returns.
|
||||
directories = Hash.new do |_, path|
|
||||
directories[path] = new(path).tap do |directory|
|
||||
if path.present?
|
||||
parent = File.dirname(path)
|
||||
parent = '' if parent == '.'
|
||||
directories[parent].entries << directory
|
||||
directories[parent].entries.delete_if do |item|
|
||||
item.is_a?(WikiPage) && item.slug.casecmp?(directory.slug)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
pages.each do |page|
|
||||
next unless directory_for_page?(directories[page.directory], page)
|
||||
|
||||
directories[page.directory].entries << page
|
||||
end
|
||||
|
||||
directories[''].entries
|
||||
end
|
||||
|
||||
pages.each do |page|
|
||||
directories[page.directory].entries << page
|
||||
end
|
||||
private
|
||||
|
||||
directories[''].entries
|
||||
def directory_for_page?(directory, page)
|
||||
directory.entries.none? do |item|
|
||||
item.is_a?(WikiDirectory) && item.slug.casecmp?(page.slug)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def initialize(slug, entries = [])
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: environments_search_logging
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107866
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/386778
|
||||
milestone: '15.8'
|
||||
type: development
|
||||
group: group::configure
|
||||
default_enabled: false
|
||||
|
|
@ -170,7 +170,7 @@ Updates to example must be made at:
|
|||
|
||||
# Replace <database_host> and <database_password>
|
||||
gitlab_rails['db_host'] = '<database_host>'
|
||||
gitlab_rails['db_port'] = '5432'
|
||||
gitlab_rails['db_port'] = 5432
|
||||
gitlab_rails['db_password'] = '<database_password>'
|
||||
## Prevent database migrations from running on upgrade automatically
|
||||
gitlab_rails['auto_migrate'] = false
|
||||
|
|
@ -257,7 +257,7 @@ To configure the metrics server:
|
|||
```ruby
|
||||
sidekiq['metrics_enabled'] = true
|
||||
sidekiq['listen_address'] = "localhost"
|
||||
sidekiq['listen_port'] = "8082"
|
||||
sidekiq['listen_port'] = 8082
|
||||
|
||||
# Optionally log all the metrics server logs to log/sidekiq_exporter.log
|
||||
sidekiq['exporter_log_enabled'] = true
|
||||
|
|
@ -299,7 +299,7 @@ To make health checks available from `localhost:8092`:
|
|||
```ruby
|
||||
sidekiq['health_checks_enabled'] = true
|
||||
sidekiq['health_checks_listen_address'] = "localhost"
|
||||
sidekiq['health_checks_listen_port'] = "8092"
|
||||
sidekiq['health_checks_listen_port'] = 8092
|
||||
```
|
||||
|
||||
1. Reconfigure GitLab:
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ include:
|
|||
- template: Terraform.latest.gitlab-ci.yml
|
||||
|
||||
deploy:
|
||||
envrionment:
|
||||
environment:
|
||||
name: $TF_STATE_NAME
|
||||
action: start
|
||||
on_stop: destroy
|
||||
|
|
@ -65,7 +65,7 @@ build:
|
|||
- when: on_success
|
||||
|
||||
deploy:
|
||||
envrionment:
|
||||
environment:
|
||||
name: $TF_STATE_NAME
|
||||
action: start
|
||||
on_stop: destroy
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@
|
|||
redis_slot: ci_templates
|
||||
aggregation: weekly
|
||||
- name: p_ci_templates_security_api_discovery
|
||||
category: ci_templates
|
||||
redis_slot: ci_templates
|
||||
aggregation: weekly
|
||||
- name: p_ci_templates_security_fortify_fod_sast
|
||||
|
|
@ -452,10 +451,8 @@
|
|||
redis_slot: ci_templates
|
||||
aggregation: weekly
|
||||
- name: p_ci_templates_terraform_module_base
|
||||
category: ci_templates
|
||||
redis_slot: ci_templates
|
||||
aggregation: weekly
|
||||
- name: p_ci_templates_terraform_module
|
||||
category: ci_templates
|
||||
redis_slot: ci_templates
|
||||
aggregation: weekly
|
||||
|
|
|
|||
|
|
@ -182,7 +182,6 @@
|
|||
aggregation: daily
|
||||
# Runner group
|
||||
- name: g_runner_fleet_read_jobs_statistics
|
||||
category: runner
|
||||
redis_slot: runner
|
||||
aggregation: weekly
|
||||
# Secrets Management
|
||||
|
|
|
|||
|
|
@ -1,22 +1,16 @@
|
|||
---
|
||||
- name: i_container_registry_push_tag_user
|
||||
category: user_container_registry
|
||||
aggregation: weekly
|
||||
redis_slot: container_registry
|
||||
- name: i_container_registry_delete_tag_user
|
||||
category: user_container_registry
|
||||
aggregation: weekly
|
||||
redis_slot: container_registry
|
||||
- name: i_container_registry_push_repository_user
|
||||
category: user_container_registry
|
||||
aggregation: weekly
|
||||
redis_slot: container_registry
|
||||
- name: i_container_registry_delete_repository_user
|
||||
category: user_container_registry
|
||||
aggregation: weekly
|
||||
redis_slot: container_registry
|
||||
- name: i_container_registry_create_repository_user
|
||||
category: user_container_registry
|
||||
aggregation: weekly
|
||||
redis_slot: container_registry
|
||||
|
||||
|
|
@ -5,10 +5,15 @@ module Sidebars
|
|||
# Contains helper methods aid conversion of a "normal" panel
|
||||
# into a Super Sidebar Panel
|
||||
module SuperSidebarPanel
|
||||
# Picks an element from the given list and adds it to the current menus
|
||||
# Used for menus which behave the same in the old nav and Supersidebar
|
||||
def pick_from_old_menus(old_menus, element)
|
||||
add_menu(remove_element(old_menus, element))
|
||||
# Picks menus from a list and adds them to the current menu list
|
||||
# if they should be picked into the super sidebar
|
||||
def pick_from_old_menus(old_menus)
|
||||
old_menus.select! do |menu|
|
||||
next true unless menu.pick_into_super_sidebar?
|
||||
|
||||
add_menu(menu)
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
def transform_old_menus(current_menus, *old_menus)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@ module Sidebars
|
|||
'rocket'
|
||||
end
|
||||
|
||||
override :pick_into_super_sidebar?
|
||||
def pick_into_super_sidebar?
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def runners_menu_item
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@ module Sidebars
|
|||
{ path: 'groups#subgroups' }
|
||||
end
|
||||
|
||||
override :serialize_as_menu_item_args
|
||||
def serialize_as_menu_item_args
|
||||
nil
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def activity_menu_item
|
||||
|
|
@ -38,6 +43,7 @@ module Sidebars
|
|||
::Sidebars::MenuItem.new(
|
||||
title: _('Activity'),
|
||||
link: activity_group_path(context.group),
|
||||
super_sidebar_parent: ::Sidebars::Groups::SuperSidebarMenus::PlanMenu,
|
||||
active_routes: { path: 'groups#activity' },
|
||||
item_id: :activity
|
||||
)
|
||||
|
|
@ -51,6 +57,8 @@ module Sidebars
|
|||
::Sidebars::MenuItem.new(
|
||||
title: _('Labels'),
|
||||
link: group_labels_path(context.group),
|
||||
super_sidebar_parent: ::Sidebars::Groups::SuperSidebarMenus::PlanMenu,
|
||||
super_sidebar_before: :activity,
|
||||
active_routes: { controller: :labels },
|
||||
item_id: :labels
|
||||
)
|
||||
|
|
@ -64,6 +72,8 @@ module Sidebars
|
|||
::Sidebars::MenuItem.new(
|
||||
title: _('Members'),
|
||||
link: group_group_members_path(context.group),
|
||||
sprite_icon: context.is_super_sidebar ? 'users' : nil,
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu,
|
||||
active_routes: { path: 'group_members#index' },
|
||||
item_id: :members
|
||||
)
|
||||
|
|
|
|||
|
|
@ -49,12 +49,25 @@ module Sidebars
|
|||
}
|
||||
end
|
||||
|
||||
override :serialize_as_menu_item_args
|
||||
def serialize_as_menu_item_args
|
||||
super.merge({
|
||||
active_routes: list_menu_item.active_routes,
|
||||
sprite_icon: sprite_icon,
|
||||
pill_count: pill_count,
|
||||
has_pill: has_pill?,
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu,
|
||||
item_id: :group_issue_list
|
||||
})
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def list_menu_item
|
||||
::Sidebars::MenuItem.new(
|
||||
title: _('List'),
|
||||
link: issues_group_path(context.group),
|
||||
super_sidebar_parent: ::Sidebars::NilMenuItem,
|
||||
active_routes: { path: 'groups#issues' },
|
||||
container_html_options: { aria: { label: _('Issues') } },
|
||||
item_id: :issue_list
|
||||
|
|
@ -66,11 +79,16 @@ module Sidebars
|
|||
return ::Sidebars::NilMenuItem.new(item_id: :boards)
|
||||
end
|
||||
|
||||
title = context.group.multiple_issue_boards_available? ? s_('IssueBoards|Boards') : s_('IssueBoards|Board')
|
||||
title = if context.is_super_sidebar
|
||||
context.group.multiple_issue_boards_available? ? s_('Issue boards') : s_('Issue board')
|
||||
else
|
||||
context.group.multiple_issue_boards_available? ? s_('IssueBoards|Boards') : s_('IssueBoards|Board')
|
||||
end
|
||||
|
||||
::Sidebars::MenuItem.new(
|
||||
title: title,
|
||||
link: group_boards_path(context.group),
|
||||
super_sidebar_parent: ::Sidebars::Groups::SuperSidebarMenus::PlanMenu,
|
||||
active_routes: { path: %w[boards#index boards#show] },
|
||||
item_id: :boards
|
||||
)
|
||||
|
|
@ -84,6 +102,7 @@ module Sidebars
|
|||
::Sidebars::MenuItem.new(
|
||||
title: _('Milestones'),
|
||||
link: group_milestones_path(context.group),
|
||||
super_sidebar_parent: ::Sidebars::Groups::SuperSidebarMenus::PlanMenu,
|
||||
active_routes: { path: 'milestones#index' },
|
||||
item_id: :milestones
|
||||
)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,14 @@ module Sidebars
|
|||
def active_routes
|
||||
{ controller: :clusters }
|
||||
end
|
||||
|
||||
override :serialize_as_menu_item_args
|
||||
def serialize_as_menu_item_args
|
||||
super.merge({
|
||||
super_sidebar_parent: ::Sidebars::Groups::SuperSidebarMenus::OperationsMenu,
|
||||
item_id: :group_kubernetes_clusters
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -52,6 +52,17 @@ module Sidebars
|
|||
def active_routes
|
||||
{ path: 'groups#merge_requests' }
|
||||
end
|
||||
|
||||
override :serialize_as_menu_item_args
|
||||
def serialize_as_menu_item_args
|
||||
super.merge({
|
||||
sprite_icon: sprite_icon,
|
||||
pill_count: pill_count,
|
||||
has_pill: has_pill?,
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu,
|
||||
item_id: :group_merge_request_list
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@ module Sidebars
|
|||
Gitlab::Observability.allowed_for_action?(context.current_user, context.group, :explore)
|
||||
end
|
||||
|
||||
override :pick_into_super_sidebar?
|
||||
def pick_into_super_sidebar?
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def dashboards_menu_item
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ module Sidebars
|
|||
'package'
|
||||
end
|
||||
|
||||
override :serialize_as_menu_item_args
|
||||
def serialize_as_menu_item_args
|
||||
nil
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def packages_registry_menu_item
|
||||
|
|
@ -31,6 +36,7 @@ module Sidebars
|
|||
::Sidebars::MenuItem.new(
|
||||
title: _('Package Registry'),
|
||||
link: group_packages_path(context.group),
|
||||
super_sidebar_parent: ::Sidebars::Groups::SuperSidebarMenus::OperationsMenu,
|
||||
active_routes: { controller: 'groups/packages' },
|
||||
item_id: :packages_registry
|
||||
)
|
||||
|
|
@ -44,6 +50,7 @@ module Sidebars
|
|||
::Sidebars::MenuItem.new(
|
||||
title: _('Container Registry'),
|
||||
link: group_container_registries_path(context.group),
|
||||
super_sidebar_parent: ::Sidebars::Groups::SuperSidebarMenus::OperationsMenu,
|
||||
active_routes: { controller: 'groups/registry/repositories' },
|
||||
item_id: :container_registry
|
||||
)
|
||||
|
|
@ -59,6 +66,7 @@ module Sidebars
|
|||
::Sidebars::MenuItem.new(
|
||||
title: _('Harbor Registry'),
|
||||
link: group_harbor_repositories_path(context.group),
|
||||
super_sidebar_parent: ::Sidebars::Groups::SuperSidebarMenus::OperationsMenu,
|
||||
active_routes: { controller: 'groups/harbor/repositories' },
|
||||
item_id: :harbor_registry
|
||||
)
|
||||
|
|
@ -74,6 +82,8 @@ module Sidebars
|
|||
::Sidebars::MenuItem.new(
|
||||
title: _('Dependency Proxy'),
|
||||
link: group_dependency_proxy_path(context.group),
|
||||
super_sidebar_parent: ::Sidebars::Groups::SuperSidebarMenus::OperationsMenu,
|
||||
super_sidebar_before: :packages_registry,
|
||||
active_routes: { controller: 'groups/dependency_proxies' },
|
||||
item_id: :dependency_proxy
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,6 +32,16 @@ module Sidebars
|
|||
def render?
|
||||
true
|
||||
end
|
||||
|
||||
override :serialize_as_menu_item_args
|
||||
def serialize_as_menu_item_args
|
||||
super.merge({
|
||||
title: _('Group overview'),
|
||||
sprite_icon: 'group',
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu,
|
||||
item_id: :group_overview
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -47,6 +47,11 @@ module Sidebars
|
|||
}
|
||||
end
|
||||
|
||||
override :pick_into_super_sidebar?
|
||||
def pick_into_super_sidebar?
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def general_menu_item
|
||||
|
|
|
|||
|
|
@ -24,15 +24,6 @@ module Sidebars
|
|||
context.group.subgroup? ? _('Subgroup navigation') : _('Group navigation')
|
||||
end
|
||||
|
||||
override :super_sidebar_context_header
|
||||
def super_sidebar_context_header
|
||||
@super_sidebar_context_header ||= {
|
||||
title: context.group.name,
|
||||
avatar: context.group.avatar_url,
|
||||
id: context.group.id
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def add_invite_members_menu
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Sidebars
|
||||
module Groups
|
||||
module SuperSidebarMenus
|
||||
class OperationsMenu < ::Sidebars::Menu
|
||||
override :title
|
||||
def title
|
||||
_('Operations')
|
||||
end
|
||||
|
||||
override :sprite_icon
|
||||
def sprite_icon
|
||||
'deployments'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Sidebars
|
||||
module Groups
|
||||
module SuperSidebarMenus
|
||||
class PlanMenu < ::Sidebars::Menu
|
||||
override :title
|
||||
def title
|
||||
_('Plan')
|
||||
end
|
||||
|
||||
override :sprite_icon
|
||||
def sprite_icon
|
||||
'planning'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Sidebars
|
||||
module Groups
|
||||
class SuperSidebarPanel < ::Sidebars::Groups::Panel
|
||||
include ::Sidebars::Concerns::SuperSidebarPanel
|
||||
extend ::Gitlab::Utils::Override
|
||||
|
||||
override :configure_menus
|
||||
def configure_menus
|
||||
super
|
||||
old_menus = @menus
|
||||
@menus = []
|
||||
|
||||
add_menu(Sidebars::StaticMenu.new(context))
|
||||
add_menu(Sidebars::Groups::SuperSidebarMenus::PlanMenu.new(context))
|
||||
|
||||
pick_from_old_menus(old_menus)
|
||||
|
||||
insert_menu_before(
|
||||
Sidebars::Groups::Menus::ObservabilityMenu,
|
||||
Sidebars::Groups::SuperSidebarMenus::OperationsMenu.new(context)
|
||||
)
|
||||
|
||||
insert_menu_before(
|
||||
Sidebars::Groups::Menus::SettingsMenu,
|
||||
Sidebars::UncategorizedMenu.new(context)
|
||||
)
|
||||
|
||||
transform_old_menus(@menus, @scope_menu, *old_menus)
|
||||
end
|
||||
|
||||
override :super_sidebar_context_header
|
||||
def super_sidebar_context_header
|
||||
{
|
||||
title: context.group.name,
|
||||
avatar: context.group.avatar_url,
|
||||
id: context.group.id
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -96,6 +96,10 @@ module Sidebars
|
|||
end
|
||||
end
|
||||
|
||||
def pick_into_super_sidebar?
|
||||
false
|
||||
end
|
||||
|
||||
# Returns whether the menu has any renderable menu item
|
||||
def has_renderable_items?
|
||||
renderable_items.any?
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@ module Sidebars
|
|||
'chart'
|
||||
end
|
||||
|
||||
override :pick_into_super_sidebar?
|
||||
def pick_into_super_sidebar?
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ci_cd_analytics_menu_item
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@ module Sidebars
|
|||
'rocket'
|
||||
end
|
||||
|
||||
override :pick_into_super_sidebar?
|
||||
def pick_into_super_sidebar?
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def pipelines_menu_item
|
||||
|
|
|
|||
|
|
@ -74,7 +74,8 @@ module Sidebars
|
|||
sprite_icon: sprite_icon,
|
||||
pill_count: pill_count,
|
||||
has_pill: has_pill?,
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu,
|
||||
item_id: :project_issue_list
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,8 @@ module Sidebars
|
|||
sprite_icon: sprite_icon,
|
||||
pill_count: pill_count,
|
||||
has_pill: has_pill?,
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu,
|
||||
item_id: :project_merge_request_list
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@ module Sidebars
|
|||
{ controller: [:user, :gcp] }
|
||||
end
|
||||
|
||||
override :pick_into_super_sidebar?
|
||||
def pick_into_super_sidebar?
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def feature_enabled?
|
||||
|
|
|
|||
|
|
@ -44,6 +44,11 @@ module Sidebars
|
|||
'doc-text'
|
||||
end
|
||||
|
||||
override :pick_into_super_sidebar?
|
||||
def pick_into_super_sidebar?
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def files_menu_item
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ module Sidebars
|
|||
super.merge({
|
||||
title: _('Project overview'),
|
||||
sprite_icon: 'project',
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu
|
||||
super_sidebar_parent: ::Sidebars::StaticMenu,
|
||||
item_id: :project_overview
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@ module Sidebars
|
|||
'shield'
|
||||
end
|
||||
|
||||
override :pick_into_super_sidebar?
|
||||
def pick_into_super_sidebar?
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def configuration_menu_item
|
||||
|
|
|
|||
|
|
@ -44,6 +44,11 @@ module Sidebars
|
|||
'settings'
|
||||
end
|
||||
|
||||
override :pick_into_super_sidebar?
|
||||
def pick_into_super_sidebar?
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def general_menu_item
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ module Sidebars
|
|||
def serialize_as_menu_item_args
|
||||
super.deep_merge({
|
||||
super_sidebar_parent: ::Sidebars::Projects::Menus::RepositoryMenu,
|
||||
super_sidebar_before: :contributors
|
||||
super_sidebar_before: :contributors,
|
||||
item_id: :project_snippets
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ module Sidebars
|
|||
override :serialize_as_menu_item_args
|
||||
def serialize_as_menu_item_args
|
||||
super.merge({
|
||||
super_sidebar_parent: ::Sidebars::Projects::SuperSidebarMenus::PlanMenu
|
||||
super_sidebar_parent: ::Sidebars::Projects::SuperSidebarMenus::PlanMenu,
|
||||
item_id: :project_wiki
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -14,15 +14,18 @@ module Sidebars
|
|||
|
||||
add_menu(Sidebars::StaticMenu.new(context))
|
||||
add_menu(Sidebars::Projects::SuperSidebarMenus::PlanMenu.new(context))
|
||||
# "Develop" menu
|
||||
pick_from_old_menus(old_menus, Sidebars::Projects::Menus::RepositoryMenu)
|
||||
pick_from_old_menus(old_menus, Sidebars::Projects::Menus::CiCdMenu)
|
||||
pick_from_old_menus(old_menus, Sidebars::Projects::Menus::SecurityComplianceMenu)
|
||||
add_menu(Sidebars::Projects::SuperSidebarMenus::OperationsMenu.new(context))
|
||||
pick_from_old_menus(old_menus, Sidebars::Projects::Menus::MonitorMenu)
|
||||
pick_from_old_menus(old_menus, Sidebars::Projects::Menus::AnalyticsMenu)
|
||||
add_menu(Sidebars::UncategorizedMenu.new(context))
|
||||
pick_from_old_menus(old_menus, Sidebars::Projects::Menus::SettingsMenu)
|
||||
|
||||
pick_from_old_menus(old_menus)
|
||||
|
||||
insert_menu_before(
|
||||
Sidebars::Projects::Menus::MonitorMenu,
|
||||
Sidebars::Projects::SuperSidebarMenus::OperationsMenu.new(context)
|
||||
)
|
||||
|
||||
insert_menu_before(
|
||||
Sidebars::Projects::Menus::SettingsMenu,
|
||||
Sidebars::UncategorizedMenu.new(context)
|
||||
)
|
||||
|
||||
transform_old_menus(@menus, @scope_menu, *old_menus)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ namespace :gitlab do
|
|||
def ci_template_event(event_name)
|
||||
{
|
||||
'name' => event_name,
|
||||
'category' => 'ci_templates',
|
||||
'redis_slot' => Gitlab::UsageDataCounters::CiTemplateUniqueCounter::REDIS_SLOT,
|
||||
'aggregation' => 'weekly'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7150,9 +7150,6 @@ msgstr ""
|
|||
msgid "BranchRules|All branches"
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|All users with push access are allowed to force push."
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Allow all users with push access to %{linkStart}force push%{linkEnd}."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -7171,6 +7168,9 @@ msgstr ""
|
|||
msgid "BranchRules|Allowed to push and merge (%{total})"
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Allows force push"
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Also accepts code pushes that change files listed in CODEOWNERS file."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -7207,13 +7207,13 @@ msgstr ""
|
|||
msgid "BranchRules|Details"
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Does not allow force push"
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Does not require approval from code owners"
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Force push"
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Force push is not allowed."
|
||||
msgid "BranchRules|From users with push access."
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Groups"
|
||||
|
|
@ -16210,6 +16210,9 @@ msgstr ""
|
|||
msgid "Epic actions"
|
||||
msgstr ""
|
||||
|
||||
msgid "Epic boards"
|
||||
msgstr ""
|
||||
|
||||
msgid "Epic cannot be found."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -19908,6 +19911,9 @@ msgstr ""
|
|||
msgid "Group navigation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Group overview"
|
||||
msgstr ""
|
||||
|
||||
msgid "Group overview content"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -23676,6 +23682,12 @@ msgstr ""
|
|||
msgid "Issue already promoted to epic."
|
||||
msgstr ""
|
||||
|
||||
msgid "Issue board"
|
||||
msgstr ""
|
||||
|
||||
msgid "Issue boards"
|
||||
msgstr ""
|
||||
|
||||
msgid "Issue cannot be found."
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,11 @@ YML
|
|||
echo "Using .gitlab/ci/review-apps/main.gitlab-ci.yml and .gitlab/ci/package-and-test/main.gitlab-ci.yml"
|
||||
cp .gitlab/ci/review-apps/main.gitlab-ci.yml "$REVIEW_PIPELINE_YML"
|
||||
echo "$variables" >>"$REVIEW_PIPELINE_YML"
|
||||
|
||||
cp .gitlab/ci/package-and-test/main.gitlab-ci.yml "$OMNIBUS_PIPELINE_YML"
|
||||
echo "$variables" >>"$OMNIBUS_PIPELINE_YML"
|
||||
echo " ALLURE_JOB_NAME: e2e-package-and-test" >>"$OMNIBUS_PIPELINE_YML"
|
||||
echo " QA_RUN_TYPE: e2e-package-and-test" >>"$OMNIBUS_PIPELINE_YML"
|
||||
|
||||
echo "Successfully generated review-app and package-and-test pipeline with following variables section:"
|
||||
echo "$variables"
|
||||
|
|
|
|||
|
|
@ -999,94 +999,6 @@ RSpec.describe Projects::EnvironmentsController, feature_category: :continuous_d
|
|||
end
|
||||
end
|
||||
|
||||
describe '#append_info_to_payload' do
|
||||
let(:search_param) { 'my search param' }
|
||||
|
||||
context 'when search_environment_logging feature is disabled' do
|
||||
before do
|
||||
stub_feature_flags(environments_search_logging: false)
|
||||
end
|
||||
|
||||
it 'does not log search params in meta.environment.search' do
|
||||
expect(controller).to receive(:append_info_to_payload).and_wrap_original do |method, payload|
|
||||
method.call(payload)
|
||||
|
||||
expect(payload[:metadata]).not_to have_key('meta.environment.search')
|
||||
expect(payload[:action]).to eq("search")
|
||||
expect(payload[:controller]).to eq("Projects::EnvironmentsController")
|
||||
end
|
||||
|
||||
get :search, params: environment_params(format: :json, search: search_param)
|
||||
end
|
||||
|
||||
it 'logs params correctly when search params are missing' do
|
||||
expect(controller).to receive(:append_info_to_payload).and_wrap_original do |method, payload|
|
||||
method.call(payload)
|
||||
|
||||
expect(payload[:metadata]).not_to have_key('meta.environment.search')
|
||||
expect(payload[:action]).to eq("search")
|
||||
expect(payload[:controller]).to eq("Projects::EnvironmentsController")
|
||||
end
|
||||
|
||||
get :search, params: environment_params(format: :json)
|
||||
end
|
||||
|
||||
it 'logs params correctly when search params is empty string' do
|
||||
expect(controller).to receive(:append_info_to_payload).and_wrap_original do |method, payload|
|
||||
method.call(payload)
|
||||
|
||||
expect(payload[:metadata]).not_to have_key('meta.environment.search')
|
||||
expect(payload[:action]).to eq("search")
|
||||
expect(payload[:controller]).to eq("Projects::EnvironmentsController")
|
||||
end
|
||||
|
||||
get :search, params: environment_params(format: :json, search: "")
|
||||
end
|
||||
end
|
||||
|
||||
context 'when search_environment_logging feature is enabled' do
|
||||
before do
|
||||
stub_feature_flags(environments_search_logging: true)
|
||||
end
|
||||
|
||||
it 'logs search params in meta.environment.search' do
|
||||
expect(controller).to receive(:append_info_to_payload).and_wrap_original do |method, payload|
|
||||
method.call(payload)
|
||||
|
||||
expect(payload[:metadata]['meta.environment.search']).to eq(search_param)
|
||||
expect(payload[:action]).to eq("search")
|
||||
expect(payload[:controller]).to eq("Projects::EnvironmentsController")
|
||||
end
|
||||
|
||||
get :search, params: environment_params(format: :json, search: search_param)
|
||||
end
|
||||
|
||||
it 'logs params correctly when search params are missing' do
|
||||
expect(controller).to receive(:append_info_to_payload).and_wrap_original do |method, payload|
|
||||
method.call(payload)
|
||||
|
||||
expect(payload[:metadata]).not_to have_key('meta.environment.search')
|
||||
expect(payload[:action]).to eq("search")
|
||||
expect(payload[:controller]).to eq("Projects::EnvironmentsController")
|
||||
end
|
||||
|
||||
get :search, params: environment_params(format: :json)
|
||||
end
|
||||
|
||||
it 'logs params correctly when search params is empty string' do
|
||||
expect(controller).to receive(:append_info_to_payload).and_wrap_original do |method, payload|
|
||||
method.call(payload)
|
||||
|
||||
expect(payload[:metadata]).not_to have_key('meta.environment.search')
|
||||
expect(payload[:action]).to eq("search")
|
||||
expect(payload[:controller]).to eq("Projects::EnvironmentsController")
|
||||
end
|
||||
|
||||
get :search, params: environment_params(format: :json, search: "")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def environment_params(opts = {})
|
||||
opts.reverse_merge(namespace_id: project.namespace, project_id: project, id: environment.id)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ import {
|
|||
HTTP_STATUS_OK,
|
||||
} from '~/lib/utils/http_status';
|
||||
|
||||
jest.mock('~/flash');
|
||||
|
||||
describe('Api', () => {
|
||||
const dummyApiVersion = 'v3000';
|
||||
const dummyUrlRoot = '/gitlab';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import redirectToCorrectPage from '~/blame/blame_redirect';
|
||||
import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
|
||||
jest.mock('~/flash');
|
||||
jest.mock('~/alert');
|
||||
|
||||
describe('Blame page redirect', () => {
|
||||
beforeEach(() => {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import {
|
|||
mockMilestones,
|
||||
} from '../mock_data';
|
||||
|
||||
jest.mock('~/flash');
|
||||
jest.mock('~/alert');
|
||||
|
||||
// We need this helper to make sure projectPath is including
|
||||
// subgroups when the movIssue action is called.
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ import waitForPromises from 'helpers/wait_for_promises';
|
|||
import { MAX_REQUESTS } from '~/clusters_list/constants';
|
||||
import * as actions from '~/clusters_list/store/actions';
|
||||
import * as types from '~/clusters_list/store/mutation_types';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_OK } from '~/lib/utils/http_status';
|
||||
import Poll from '~/lib/utils/poll';
|
||||
import { apiData } from '../mock_data';
|
||||
|
||||
jest.mock('~/flash');
|
||||
jest.mock('~/alert');
|
||||
|
||||
describe('Clusters store actions', () => {
|
||||
let captureException;
|
||||
|
|
@ -81,7 +81,7 @@ describe('Clusters store actions', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('should show flash on API error', async () => {
|
||||
it('should show alert on API error', async () => {
|
||||
mock.onGet().reply(HTTP_STATUS_BAD_REQUEST, 'Not Found');
|
||||
|
||||
await testAction(
|
||||
|
|
|
|||
|
|
@ -7,20 +7,12 @@ import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/h
|
|||
import { TEST_HOST } from 'helpers/test_constants';
|
||||
import NewDeployToken from '~/deploy_tokens/components/new_deploy_token.vue';
|
||||
import waitForPromises from 'helpers/wait_for_promises';
|
||||
import { createAlert, VARIANT_INFO } from '~/flash';
|
||||
import { createAlert, VARIANT_INFO } from '~/alert';
|
||||
|
||||
const createNewTokenPath = `${TEST_HOST}/create`;
|
||||
const deployTokensHelpUrl = `${TEST_HOST}/help`;
|
||||
|
||||
jest.mock('~/flash', () => {
|
||||
const original = jest.requireActual('~/flash');
|
||||
|
||||
return {
|
||||
__esModule: true,
|
||||
...original,
|
||||
createAlert: jest.fn(),
|
||||
};
|
||||
});
|
||||
jest.mock('~/alert');
|
||||
|
||||
describe('New Deploy Token', () => {
|
||||
let wrapper;
|
||||
|
|
@ -91,7 +83,7 @@ describe('New Deploy Token', () => {
|
|||
});
|
||||
}
|
||||
|
||||
it('should flash error message if token creation fails', async () => {
|
||||
it('should alert error message if token creation fails', async () => {
|
||||
const mockAxios = new MockAdapter(axios);
|
||||
|
||||
const date = new Date();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import {
|
|||
DESIGN_SNOWPLOW_EVENT_TYPES,
|
||||
DESIGN_SERVICE_PING_EVENT_TYPES,
|
||||
} from '~/design_management/utils/tracking';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import * as cacheUpdate from '~/design_management/utils/cache_update';
|
||||
import mockAllVersions from '../../mock_data/all_versions';
|
||||
import design from '../../mock_data/design';
|
||||
|
|
@ -32,7 +32,7 @@ import mockResponseWithDesigns from '../../mock_data/designs';
|
|||
import mockResponseNoDesigns from '../../mock_data/no_designs';
|
||||
import { mockCreateImageNoteDiffResponse } from '../../mock_data/apollo_mock';
|
||||
|
||||
jest.mock('~/flash');
|
||||
jest.mock('~/alert');
|
||||
jest.mock('~/api.js');
|
||||
|
||||
const focusInput = jest.fn();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import {
|
|||
DESIGN_TRACKING_PAGE_NAME,
|
||||
DESIGN_SNOWPLOW_EVENT_TYPES,
|
||||
} from '~/design_management/utils/tracking';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import DesignDropzone from '~/vue_shared/components/upload_dropzone/upload_dropzone.vue';
|
||||
import {
|
||||
designListQueryResponse,
|
||||
|
|
@ -41,7 +41,7 @@ import {
|
|||
moveDesignMutationResponseWithErrors,
|
||||
} from '../mock_data/apollo_mock';
|
||||
|
||||
jest.mock('~/flash');
|
||||
jest.mock('~/alert');
|
||||
const mockPageEl = {
|
||||
classList: {
|
||||
remove: jest.fn(),
|
||||
|
|
@ -800,7 +800,7 @@ describe('Design management index page', () => {
|
|||
expect(draggableAttributes().disabled).toBe(false);
|
||||
});
|
||||
|
||||
it('displays flash if mutation had a recoverable error', async () => {
|
||||
it('displays alert if mutation had a recoverable error', async () => {
|
||||
createComponentWithApollo({
|
||||
moveHandler: jest.fn().mockResolvedValue(moveDesignMutationResponseWithErrors),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import {
|
|||
ADD_IMAGE_DIFF_NOTE_ERROR,
|
||||
UPDATE_IMAGE_DIFF_NOTE_ERROR,
|
||||
} from '~/design_management/utils/error_messages';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import design from '../mock_data/design';
|
||||
|
||||
jest.mock('~/flash');
|
||||
jest.mock('~/alert');
|
||||
|
||||
describe('Design Management cache update', () => {
|
||||
const mockErrors = ['code red!'];
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import * as diffActions from '~/diffs/store/actions';
|
|||
import * as types from '~/diffs/store/mutation_types';
|
||||
import * as utils from '~/diffs/store/utils';
|
||||
import * as treeWorkerUtils from '~/diffs/utils/tree_worker_utils';
|
||||
import { createAlert } from '~/flash';
|
||||
import { createAlert } from '~/alert';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import * as commonUtils from '~/lib/utils/common_utils';
|
||||
import {
|
||||
|
|
@ -26,7 +26,7 @@ import { mergeUrlParams } from '~/lib/utils/url_utility';
|
|||
import eventHub from '~/notes/event_hub';
|
||||
import { diffMetadata } from '../mock_data/diff_metadata';
|
||||
|
||||
jest.mock('~/flash');
|
||||
jest.mock('~/alert');
|
||||
|
||||
describe('DiffsStoreActions', () => {
|
||||
let mock;
|
||||
|
|
@ -273,7 +273,7 @@ describe('DiffsStoreActions', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('should show flash on API error', async () => {
|
||||
it('should show alert on API error', async () => {
|
||||
mock.onGet(endpointCoverage).reply(HTTP_STATUS_BAD_REQUEST);
|
||||
|
||||
await testAction(diffActions.fetchCoverageFiles, {}, { endpointCoverage }, [], []);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue