diff --git a/.gitlab/ci/qa-common/variables.gitlab-ci.yml b/.gitlab/ci/qa-common/variables.gitlab-ci.yml index 024405aeb42..94c60ec1ba9 100644 --- a/.gitlab/ci/qa-common/variables.gitlab-ci.yml +++ b/.gitlab/ci/qa-common/variables.gitlab-ci.yml @@ -18,7 +18,7 @@ variables: # Helm chart ref used by test-on-cng pipeline GITLAB_HELM_CHART_REF: "6cdb0e1cd4ceb7c9fd01ffa2f62c4a7a4c77a23b" # Specific ref for cng-mirror project to trigger builds for - GITLAB_CNG_MIRROR_REF: "272b2069fc386348d2474eac26060e781f2a0dd2" + GITLAB_CNG_MIRROR_REF: "51637e0b7ab573aa0817945df517c7c0d0250d79" # Makes sure some of the common scripts from pipeline-common use bundler to execute commands RUN_WITH_BUNDLE: "true" # Makes sure reporting script defined in .gitlab-qa-report from pipeline-common is executed from correct folder diff --git a/GITLAB_KAS_VERSION b/GITLAB_KAS_VERSION index cce98a73a4a..99ef55e4b75 100644 --- a/GITLAB_KAS_VERSION +++ b/GITLAB_KAS_VERSION @@ -1 +1 @@ -6093f9c42ad8d328c37423e3067f3c9e7cd1ddcf +c995db1d0baa5ffa66832d48adeac8c2eabe2811 diff --git a/Gemfile.checksum b/Gemfile.checksum index 92e279b3587..7524f1d94d2 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -364,7 +364,7 @@ {"name":"kubeclient","version":"4.11.0","platform":"ruby","checksum":"4985fcd749fb8c364a668a8350a49821647f03aa52d9ee6cbc582beb8e883fcc"}, {"name":"language_server-protocol","version":"3.17.0.3","platform":"ruby","checksum":"3d5c58c02f44a20d972957a9febe386d7e7468ab3900ce6bd2b563dd910c6b3f"}, {"name":"launchy","version":"2.5.2","platform":"ruby","checksum":"8aa0441655aec5514008e1d04892c2de3ba57bd337afb984568da091121a241b"}, -{"name":"lefthook","version":"1.11.14","platform":"ruby","checksum":"c11c55f5096f5d38068b66be8a33143899b7095f28a8145c9adf0b3eb611c098"}, +{"name":"lefthook","version":"1.11.16","platform":"ruby","checksum":"1a273f1963b4a899c56f7cf14ccea90b17af239bf7acf09cbc9e4ca6298ee685"}, {"name":"letter_opener","version":"1.10.0","platform":"ruby","checksum":"2ff33f2e3b5c3c26d1959be54b395c086ca6d44826e8bf41a14ff96fdf1bdbb2"}, {"name":"letter_opener_web","version":"3.0.0","platform":"ruby","checksum":"3f391efe0e8b9b24becfab5537dfb17a5cf5eb532038f947daab58cb4b749860"}, {"name":"libyajl2","version":"2.1.0","platform":"ruby","checksum":"aa5df6c725776fc050c8418450de0f7c129cb7200b811907c4c0b3b5c0aea0ef"}, diff --git a/Gemfile.lock b/Gemfile.lock index acee5a80809..814cf1a71a2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1105,7 +1105,7 @@ GEM language_server-protocol (3.17.0.3) launchy (2.5.2) addressable (~> 2.8) - lefthook (1.11.14) + lefthook (1.11.16) letter_opener (1.10.0) launchy (>= 2.2, < 4) letter_opener_web (3.0.0) diff --git a/Gemfile.next.checksum b/Gemfile.next.checksum index 03aeb92be68..40be68656f9 100644 --- a/Gemfile.next.checksum +++ b/Gemfile.next.checksum @@ -364,7 +364,7 @@ {"name":"kubeclient","version":"4.11.0","platform":"ruby","checksum":"4985fcd749fb8c364a668a8350a49821647f03aa52d9ee6cbc582beb8e883fcc"}, {"name":"language_server-protocol","version":"3.17.0.3","platform":"ruby","checksum":"3d5c58c02f44a20d972957a9febe386d7e7468ab3900ce6bd2b563dd910c6b3f"}, {"name":"launchy","version":"2.5.2","platform":"ruby","checksum":"8aa0441655aec5514008e1d04892c2de3ba57bd337afb984568da091121a241b"}, -{"name":"lefthook","version":"1.11.14","platform":"ruby","checksum":"c11c55f5096f5d38068b66be8a33143899b7095f28a8145c9adf0b3eb611c098"}, +{"name":"lefthook","version":"1.11.16","platform":"ruby","checksum":"1a273f1963b4a899c56f7cf14ccea90b17af239bf7acf09cbc9e4ca6298ee685"}, {"name":"letter_opener","version":"1.10.0","platform":"ruby","checksum":"2ff33f2e3b5c3c26d1959be54b395c086ca6d44826e8bf41a14ff96fdf1bdbb2"}, {"name":"letter_opener_web","version":"3.0.0","platform":"ruby","checksum":"3f391efe0e8b9b24becfab5537dfb17a5cf5eb532038f947daab58cb4b749860"}, {"name":"libyajl2","version":"2.1.0","platform":"ruby","checksum":"aa5df6c725776fc050c8418450de0f7c129cb7200b811907c4c0b3b5c0aea0ef"}, diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 7665b9909f2..c08a1c7d679 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -1099,7 +1099,7 @@ GEM language_server-protocol (3.17.0.3) launchy (2.5.2) addressable (~> 2.8) - lefthook (1.11.14) + lefthook (1.11.16) letter_opener (1.10.0) launchy (>= 2.2, < 4) letter_opener_web (3.0.0) diff --git a/app/assets/javascripts/admin/projects/index/components/app.vue b/app/assets/javascripts/admin/projects/index/components/app.vue index 98dc0393ebf..5bb99fd96fe 100644 --- a/app/assets/javascripts/admin/projects/index/components/app.vue +++ b/app/assets/javascripts/admin/projects/index/components/app.vue @@ -3,6 +3,7 @@ import TabsWithList from '~/groups_projects/components/tabs_with_list.vue'; import { FILTERED_SEARCH_TOKEN_LANGUAGE, FILTERED_SEARCH_TOKEN_MIN_ACCESS_LEVEL, + FILTERED_SEARCH_TOKEN_VISIBILITY_LEVEL, PAGINATION_TYPE_KEYSET, } from '~/groups_projects/constants'; import { @@ -31,6 +32,7 @@ export default { filteredSearchSupportedTokens: [ FILTERED_SEARCH_TOKEN_LANGUAGE, FILTERED_SEARCH_TOKEN_MIN_ACCESS_LEVEL, + FILTERED_SEARCH_TOKEN_VISIBILITY_LEVEL, ], timestampTypeMap: { [SORT_OPTION_CREATED.value]: TIMESTAMP_TYPE_CREATED_AT, diff --git a/app/assets/javascripts/admin/projects/index/graphql/queries/project_counts.query.graphql b/app/assets/javascripts/admin/projects/index/graphql/queries/project_counts.query.graphql index 07a2a72dd71..6ba319bcc8e 100644 --- a/app/assets/javascripts/admin/projects/index/graphql/queries/project_counts.query.graphql +++ b/app/assets/javascripts/admin/projects/index/graphql/queries/project_counts.query.graphql @@ -2,12 +2,14 @@ query getAdminProjectCounts( $search: String $minAccessLevel: AccessLevelEnum $programmingLanguageName: String + $visibilityLevel: VisibilityLevelsEnum ) { active: projects( active: true search: $search minAccessLevel: $minAccessLevel programmingLanguageName: $programmingLanguageName + visibilityLevel: $visibilityLevel ) { count } @@ -16,6 +18,7 @@ query getAdminProjectCounts( search: $search minAccessLevel: $minAccessLevel programmingLanguageName: $programmingLanguageName + visibilityLevel: $visibilityLevel ) { count } diff --git a/app/assets/javascripts/admin/projects/index/graphql/queries/projects.query.graphql b/app/assets/javascripts/admin/projects/index/graphql/queries/projects.query.graphql index e10f2ec17a0..41c11066603 100644 --- a/app/assets/javascripts/admin/projects/index/graphql/queries/projects.query.graphql +++ b/app/assets/javascripts/admin/projects/index/graphql/queries/projects.query.graphql @@ -10,6 +10,7 @@ query getAdminProjects( $sort: String $search: String $minAccessLevel: AccessLevelEnum + $visibilityLevel: VisibilityLevelsEnum $programmingLanguageName: String ) { projects( @@ -22,6 +23,7 @@ query getAdminProjects( search: $search minAccessLevel: $minAccessLevel programmingLanguageName: $programmingLanguageName + visibilityLevel: $visibilityLevel ) { count nodes { diff --git a/app/assets/javascripts/groups_projects/components/tabs_with_list.vue b/app/assets/javascripts/groups_projects/components/tabs_with_list.vue index 59bbac30128..b09a2ee27f3 100644 --- a/app/assets/javascripts/groups_projects/components/tabs_with_list.vue +++ b/app/assets/javascripts/groups_projects/components/tabs_with_list.vue @@ -13,6 +13,12 @@ import { ACCESS_LEVEL_OWNER_INTEGER, ACCESS_LEVELS_INTEGER_TO_STRING, } from '~/access_level/constants'; +import { + VISIBILITY_LEVEL_LABELS, + VISIBILITY_LEVEL_PRIVATE_STRING, + VISIBILITY_LEVEL_INTERNAL_STRING, + VISIBILITY_LEVEL_PUBLIC_STRING, +} from '~/visibility_level/constants'; import * as Sentry from '~/sentry/sentry_browser_wrapper'; import { InternalEvents } from '~/tracking'; import { @@ -23,6 +29,7 @@ import { PAGINATION_TYPE_KEYSET, PAGINATION_TYPE_OFFSET, QUERY_PARAM_PAGE, + FILTERED_SEARCH_TOKEN_VISIBILITY_LEVEL, } from '../constants'; import userPreferencesUpdateMutation from '../graphql/mutations/user_preferences_update.mutation.graphql'; import TabView from './tab_view.vue'; @@ -186,6 +193,22 @@ export default { }, ], }, + { + type: FILTERED_SEARCH_TOKEN_VISIBILITY_LEVEL, + icon: 'eye', + title: __('Visibility'), + token: GlFilteredSearchToken, + unique: true, + operators: OPERATORS_IS, + options: [ + VISIBILITY_LEVEL_PRIVATE_STRING, + VISIBILITY_LEVEL_INTERNAL_STRING, + VISIBILITY_LEVEL_PUBLIC_STRING, + ].map((visibilityLevelString) => ({ + value: visibilityLevelString, + title: VISIBILITY_LEVEL_LABELS[visibilityLevelString], + })), + }, ].filter((filteredSearchToken) => this.filteredSearchSupportedTokens.includes(filteredSearchToken.type), ); @@ -236,9 +259,8 @@ export default { }, filters() { const filters = pick(this.routeQueryWithoutPagination, [ - FILTERED_SEARCH_TOKEN_LANGUAGE, - FILTERED_SEARCH_TOKEN_MIN_ACCESS_LEVEL, this.filteredSearchTermKey, + ...this.filteredSearchSupportedTokens, ]); // Normalize the property to Number since Vue Router 4 will @@ -265,10 +287,15 @@ export default { this.programmingLanguages.find(({ id }) => id === parseInt(programmingLanguageId, 10))?.name ); }, + visibilityLevel() { + const visibilityLevel = this.filters[FILTERED_SEARCH_TOKEN_VISIBILITY_LEVEL]; + return Array.isArray(visibilityLevel) ? visibilityLevel[0] : visibilityLevel; + }, filtersAsQueryVariables() { return { programmingLanguageName: this.programmingLanguageName, minAccessLevel: this.minAccessLevel, + visibilityLevel: this.visibilityLevel, }; }, timestampType() { @@ -509,8 +536,9 @@ export default { size="sm" class="gl-tab-counter-badge" data-testid="tab-counter-badge" - >{{ tabCount(tab) }} + {{ tabCount(tab) }} + diff --git a/app/assets/javascripts/groups_projects/constants.js b/app/assets/javascripts/groups_projects/constants.js index e6a6994b63f..8874427ac82 100644 --- a/app/assets/javascripts/groups_projects/constants.js +++ b/app/assets/javascripts/groups_projects/constants.js @@ -8,6 +8,7 @@ export const SORT_LABEL_STORAGE_SIZE = __('Storage size'); export const FILTERED_SEARCH_TOKEN_LANGUAGE = 'language'; export const FILTERED_SEARCH_TOKEN_MIN_ACCESS_LEVEL = 'min_access_level'; +export const FILTERED_SEARCH_TOKEN_VISIBILITY_LEVEL = 'visibility_level'; export const SORT_DIRECTION_ASC = 'asc'; export const SORT_DIRECTION_DESC = 'desc'; diff --git a/app/assets/javascripts/members/placeholders/components/placeholders_table.vue b/app/assets/javascripts/members/placeholders/components/placeholders_table.vue index 69a0fa6c6e6..bb02dba7446 100644 --- a/app/assets/javascripts/members/placeholders/components/placeholders_table.vue +++ b/app/assets/javascripts/members/placeholders/components/placeholders_table.vue @@ -2,7 +2,6 @@ import { GlAvatarLabeled, GlBadge, - GlEmptyState, GlIcon, GlKeysetPagination, GlLoadingIcon, @@ -18,6 +17,7 @@ import { fetchPolicies } from '~/lib/graphql'; import { DEFAULT_PAGE_SIZE } from '~/members/constants'; import { helpPagePath } from '~/helpers/help_page_helper'; import HelpPopover from '~/vue_shared/components/help_popover.vue'; +import EmptyResult from '~/vue_shared/components/empty_result.vue'; import { PLACEHOLDER_STATUS_KEPT_AS_PLACEHOLDER, PLACEHOLDER_STATUS_COMPLETED, @@ -34,7 +34,6 @@ export default { components: { GlAvatarLabeled, GlBadge, - GlEmptyState, GlIcon, GlKeysetPagination, GlLoadingIcon, @@ -43,6 +42,7 @@ export default { GlLink, PlaceholderActions, HelpPopover, + EmptyResult, }, directives: { GlTooltip: GlTooltipDirective, @@ -150,11 +150,6 @@ export default { isSearchQueryTooShort() { return this.querySearch && this.querySearch.trim().length < MINIMUM_QUERY_LENGTH; }, - emptyText() { - return this.isSearchQueryTooShort - ? __('Enter at least three characters to search.') - : __('Edit your search and try again'); - }, }, methods: { @@ -217,7 +212,9 @@ export default {