From 5cd8380e46d88d2afc314b11d8e3b3dee0335948 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 9 Nov 2022 00:09:20 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/api/groups_api.js | 8 + .../groups/components/transfer_group_form.vue | 52 ++-- .../groups/init_transfer_group_form.js | 22 +- .../components/transfer_locations.vue | 57 ++++- .../namespace_select_deprecated.vue | 212 ---------------- app/assets/stylesheets/pages/projects.scss | 197 ++++++--------- app/helpers/groups_helper.rb | 10 - app/helpers/projects_helper.rb | 4 + app/models/concerns/enums/sbom.rb | 15 ++ app/views/admin/users/_projects.html.haml | 4 +- app/views/groups/settings/_transfer.html.haml | 2 +- app/views/shared/projects/_list.html.haml | 2 +- app/views/shared/projects/_project.html.haml | 146 +++++------ ...201815_add_purl_type_to_sbom_components.rb | 7 + ..._index_on_sbom_components_type_and_name.rb | 15 ++ ...sbom_components_type_name_and_purl_type.rb | 15 ++ db/schema_migrations/20221010201815 | 1 + db/schema_migrations/20221010202339 | 1 + db/schema_migrations/20221010202408 | 1 + db/structure.sql | 3 +- doc/api/commits.md | 6 +- doc/api/repositories.md | 2 +- .../documentation/restful_api_styleguide.md | 2 +- .../documentation/styleguide/index.md | 1 + lib/api/commit_statuses.rb | 2 +- lib/api/entities/commit_status.rb | 2 +- lib/gitlab/ci/parsers/sbom/cyclonedx.rb | 16 +- lib/gitlab/ci/reports/sbom/component.rb | 25 +- lib/gitlab/ci/reports/sbom/report.rb | 4 + lib/sbom/package_url.rb | 4 +- lib/sbom/package_url/decoder.rb | 4 +- locale/gitlab.pot | 3 - qa/qa/page/component/namespace_select.rb | 2 +- scripts/rubocop-parse | 44 +++- spec/factories/ci/reports/sbom/components.rb | 14 ++ spec/factories/ci/reports/sbom/reports.rb | 6 + spec/features/dashboard/projects_spec.rb | 4 +- spec/features/groups/group_settings_spec.rb | 27 +- spec/frontend/api/groups_api_spec.js | 27 +- spec/frontend/fixtures/namespaces.rb | 20 ++ .../components/transfer_group_form_spec.js | 56 +++-- .../components/transfer_locations_spec.js | 102 +++++++- .../components/namespace_select/mock_data.js | 6 - .../namespace_select_deprecated_spec.js | 236 ------------------ spec/helpers/groups_helper_spec.rb | 33 --- .../gitlab/ci/parsers/sbom/cyclonedx_spec.rb | 41 ++- .../gitlab/ci/reports/sbom/component_spec.rb | 74 ++++-- .../lib/gitlab/ci/reports/sbom/report_spec.rb | 15 ++ spec/lib/sbom/package_url/decoder_spec.rb | 8 +- 49 files changed, 729 insertions(+), 831 deletions(-) delete mode 100644 app/assets/javascripts/vue_shared/components/namespace_select/namespace_select_deprecated.vue create mode 100644 db/migrate/20221010201815_add_purl_type_to_sbom_components.rb create mode 100644 db/migrate/20221010202339_remove_unique_index_on_sbom_components_type_and_name.rb create mode 100644 db/migrate/20221010202408_add_unique_index_on_sbom_components_type_name_and_purl_type.rb create mode 100644 db/schema_migrations/20221010201815 create mode 100644 db/schema_migrations/20221010202339 create mode 100644 db/schema_migrations/20221010202408 delete mode 100644 spec/frontend/vue_shared/components/namespace_select/mock_data.js delete mode 100644 spec/frontend/vue_shared/components/namespace_select/namespace_select_deprecated_spec.js diff --git a/app/assets/javascripts/api/groups_api.js b/app/assets/javascripts/api/groups_api.js index 48cf346d0e6..e859160c2e7 100644 --- a/app/assets/javascripts/api/groups_api.js +++ b/app/assets/javascripts/api/groups_api.js @@ -5,6 +5,7 @@ import { buildApiUrl } from './api_utils'; const GROUP_PATH = '/api/:version/groups/:id'; const GROUPS_PATH = '/api/:version/groups.json'; const DESCENDANT_GROUPS_PATH = '/api/:version/groups/:id/descendant_groups'; +const GROUP_TRANSFER_LOCATIONS_PATH = 'api/:version/groups/:id/transfer_locations'; const axiosGet = (url, query, options, callback) => { return axios @@ -37,3 +38,10 @@ export function updateGroup(groupId, data = {}) { return axios.put(url, data); } + +export const getGroupTransferLocations = (groupId, params = {}) => { + const url = buildApiUrl(GROUP_TRANSFER_LOCATIONS_PATH).replace(':id', groupId); + const defaultParams = { per_page: DEFAULT_PER_PAGE }; + + return axios.get(url, { params: { ...defaultParams, ...params } }); +}; diff --git a/app/assets/javascripts/groups/components/transfer_group_form.vue b/app/assets/javascripts/groups/components/transfer_group_form.vue index e28459811d7..15a193f7cb8 100644 --- a/app/assets/javascripts/groups/components/transfer_group_form.vue +++ b/app/assets/javascripts/groups/components/transfer_group_form.vue @@ -1,29 +1,24 @@