summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-05 06:12:41 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-05 06:12:41 +0000
commit7c0c3a7dc95668d20ec8f4bbc2d505f373b6032a (patch)
tree2034e645e8aada36db5d816d271d7f2d8728157d /app
parentd8abaef3c6859400b684427ba57aa247b6272cb1 (diff)
downloadgitlab-ce-7c0c3a7dc95668d20ec8f4bbc2d505f373b6032a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/api/projects_api.js8
-rw-r--r--app/assets/javascripts/invite_members/components/group_select.vue20
-rw-r--r--app/assets/javascripts/invite_members/components/invite_groups_modal.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/registry/registry_search.vue12
-rw-r--r--app/finders/concerns/finder_with_group_hierarchy.rb3
-rw-r--r--app/graphql/resolvers/group_labels_resolver.rb4
-rw-r--r--app/graphql/resolvers/labels_resolver.rb6
-rw-r--r--app/views/shared/_remote_mirror_update_button.html.haml2
8 files changed, 16 insertions, 41 deletions
diff --git a/app/assets/javascripts/api/projects_api.js b/app/assets/javascripts/api/projects_api.js
index f69bb8ad7cb..c72a913aacd 100644
--- a/app/assets/javascripts/api/projects_api.js
+++ b/app/assets/javascripts/api/projects_api.js
@@ -8,7 +8,6 @@ const PROJECT_ALL_MEMBERS_PATH = '/api/:version/projects/:id/members/all';
const PROJECT_IMPORT_MEMBERS_PATH = '/api/:version/projects/:id/import_project_members/:project_id';
const PROJECT_REPOSITORY_SIZE_PATH = '/api/:version/projects/:id/repository_size';
const PROJECT_TRANSFER_LOCATIONS_PATH = 'api/:version/projects/:id/transfer_locations';
-const PROJECT_SHARE_LOCATIONS = 'api/:version/projects/:id/share_locations';
export function getProjects(query, options, callback = () => {}) {
const url = buildApiUrl(PROJECTS_PATH);
@@ -71,10 +70,3 @@ export const getProjectMembers = (projectId, inherited = false) => {
return axios.get(url);
};
-
-export const getProjectShareLocations = (projectId, params = {}) => {
- const url = buildApiUrl(PROJECT_SHARE_LOCATIONS).replace(':id', projectId);
- const defaultParams = { per_page: DEFAULT_PER_PAGE };
-
- return axios.get(url, { params: { ...defaultParams, ...params } });
-};
diff --git a/app/assets/javascripts/invite_members/components/group_select.vue b/app/assets/javascripts/invite_members/components/group_select.vue
index 13902b1f156..0e9781d77fe 100644
--- a/app/assets/javascripts/invite_members/components/group_select.vue
+++ b/app/assets/javascripts/invite_members/components/group_select.vue
@@ -8,7 +8,7 @@ import {
} from '@gitlab/ui';
import { debounce } from 'lodash';
import { s__ } from '~/locale';
-import { getGroups, getDescendentGroups, getProjectShareLocations } from '~/rest_api';
+import { getGroups, getDescendentGroups } from '~/rest_api';
import { SEARCH_DELAY, GROUP_FILTERS } from '../constants';
export default {
@@ -29,10 +29,6 @@ export default {
required: false,
default: GROUP_FILTERS.ALL,
},
- sourceId: {
- type: String,
- required: true,
- },
parentGroupId: {
type: Number,
required: false,
@@ -42,10 +38,6 @@ export default {
type: Array,
required: true,
},
- isProject: {
- type: Boolean,
- required: true,
- },
},
data() {
return {
@@ -87,7 +79,7 @@ export default {
const rawGroups = response.map((group) => ({
id: group.id,
name: group.full_name,
- path: group.full_path,
+ path: group.path,
avatarUrl: group.avatar_url,
}));
@@ -102,14 +94,6 @@ export default {
this.$emit('input', this.selectedGroup);
},
fetchGroups() {
- if (this.isProject) {
- return getProjectShareLocations(this.sourceId, { search: this.searchTerm })
- .then(({ data }) => data)
- .catch((error) => {
- throw error;
- });
- }
-
switch (this.groupsFilter) {
case GROUP_FILTERS.DESCENDANT_GROUPS:
return getDescendentGroups(
diff --git a/app/assets/javascripts/invite_members/components/invite_groups_modal.vue b/app/assets/javascripts/invite_members/components/invite_groups_modal.vue
index 03513f74aa6..51355baef99 100644
--- a/app/assets/javascripts/invite_members/components/invite_groups_modal.vue
+++ b/app/assets/javascripts/invite_members/components/invite_groups_modal.vue
@@ -203,10 +203,8 @@ export default {
<group-select
v-model="groupToBeSharedWith"
:groups-filter="groupSelectFilter"
- :source-id="id"
:parent-group-id="groupSelectParentId"
:invalid-groups="invalidGroups"
- :is-project="isProject"
@input="clearValidation"
/>
</template>
diff --git a/app/assets/javascripts/vue_shared/components/registry/registry_search.vue b/app/assets/javascripts/vue_shared/components/registry/registry_search.vue
index c990baaa2f3..730e9e1c6cc 100644
--- a/app/assets/javascripts/vue_shared/components/registry/registry_search.vue
+++ b/app/assets/javascripts/vue_shared/components/registry/registry_search.vue
@@ -110,10 +110,14 @@ export default {
</script>
<template>
- <div class="gl-display-flex gl-p-5 gl-bg-gray-10 gl-border-solid gl-border-1 gl-border-gray-100">
+ <div
+ class="gl-md-display-flex gl-p-5 gl-bg-gray-10 gl-border-solid gl-border-1 gl-border-gray-100"
+ >
+ <!-- `gl-w-full gl-md-w-15` forces fixed width needed to prevent
+ filtered component to grow beyond available width -->
<gl-filtered-search
v-model="internalFilter"
- class="gl-mr-4 gl-flex-grow-1"
+ class="gl-w-full gl-md-w-15 gl-mr-4 gl-flex-grow-1"
:placeholder="__('Filter results')"
:available-tokens="tokens"
@submit="submitSearch"
@@ -121,6 +125,10 @@ export default {
/>
<gl-sorting
data-testid="registry-sort-dropdown"
+ class="gl-mt-3 gl-md-mt-0 gl-w-full gl-md-w-auto"
+ dropdown-class="gl-w-full"
+ dropdown-toggle-class="gl-inset-border-1-gray-400!"
+ sort-direction-toggle-class="gl-inset-border-1-gray-400!"
:text="sortText"
:is-ascending="isSortAscending"
:sort-direction-tool-tip="sortDirectionData.tooltip"
diff --git a/app/finders/concerns/finder_with_group_hierarchy.rb b/app/finders/concerns/finder_with_group_hierarchy.rb
index 70c38f00f72..99b58fa6954 100644
--- a/app/finders/concerns/finder_with_group_hierarchy.rb
+++ b/app/finders/concerns/finder_with_group_hierarchy.rb
@@ -27,8 +27,7 @@ module FinderWithGroupHierarchy
# we can preset root group for all of them to optimize permission checks
Group.preset_root_ancestor_for(groups)
- preload_associations(groups) if !skip_authorization && current_user && Feature.enabled?(
- :preload_max_access_levels_for_labels_finder, group)
+ preload_associations(groups) if !skip_authorization && current_user
groups_user_can_read_items(groups).map(&:id)
end
diff --git a/app/graphql/resolvers/group_labels_resolver.rb b/app/graphql/resolvers/group_labels_resolver.rb
index 932834de895..b88f62b984a 100644
--- a/app/graphql/resolvers/group_labels_resolver.rb
+++ b/app/graphql/resolvers/group_labels_resolver.rb
@@ -15,9 +15,7 @@ module Resolvers
default_value: false
before_connection_authorization do |nodes, current_user|
- if Feature.enabled?(:preload_max_access_levels_for_labels_finder)
- Preloaders::LabelsPreloader.new(nodes, current_user).preload_all
- end
+ Preloaders::LabelsPreloader.new(nodes, current_user).preload_all
end
end
end
diff --git a/app/graphql/resolvers/labels_resolver.rb b/app/graphql/resolvers/labels_resolver.rb
index a6b00030121..10f5917d84b 100644
--- a/app/graphql/resolvers/labels_resolver.rb
+++ b/app/graphql/resolvers/labels_resolver.rb
@@ -18,9 +18,7 @@ module Resolvers
default_value: false
before_connection_authorization do |nodes, current_user|
- if Feature.enabled?(:preload_max_access_levels_for_labels_finder)
- Preloaders::LabelsPreloader.new(nodes, current_user).preload_all
- end
+ Preloaders::LabelsPreloader.new(nodes, current_user).preload_all
end
def resolve(**args)
@@ -35,8 +33,6 @@ module Resolvers
# Rely on the LabelsPreloader rather than the default parent record preloading in the
# finder because LabelsPreloader preloads more associations which are required for the
# permission check.
- args[:preload_parent_association] = false if Feature.disabled?(:preload_max_access_levels_for_labels_finder)
-
LabelsFinder.new(current_user, parent_param.merge(args)).execute
end
diff --git a/app/views/shared/_remote_mirror_update_button.html.haml b/app/views/shared/_remote_mirror_update_button.html.haml
index 770d335a88b..bc80ebe3950 100644
--- a/app/views/shared/_remote_mirror_update_button.html.haml
+++ b/app/views/shared/_remote_mirror_update_button.html.haml
@@ -1,6 +1,6 @@
- if remote_mirror.update_in_progress?
= render Pajamas::ButtonComponent.new(icon: 'retry',
- button_options: { class: 'disabled', title: _('Updating'), data: { toggle: 'tooltip', container: 'body', qa_selector: 'updating_button' } },
+ button_options: { class: 'disabled', title: _('Updating'), data: { toggle: 'tooltip', container: 'body' } },
icon_classes: 'spin')
- elsif remote_mirror.enabled?
= link_to update_now_project_mirror_path(@project, sync_remote: true), method: :post, class: "btn btn-icon gl-button rspec-update-now-button", data: { toggle: 'tooltip', container: 'body', qa_selector: 'update_now_button' }, title: _('Update now') do