Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-31 18:07:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-31 18:07:20 +0300
commitfab00cd7efb84b369dfb45cabb797f7feace4b66 (patch)
treefd3eb7509bf3947ddd818214350a06d16822c78a /app
parent07f6ded1cb698550284e5f348de8f1b884e715ae (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/analytics/cycle_analytics/components/value_stream_filters.vue1
-rw-r--r--app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue11
-rw-r--r--app/assets/javascripts/ci/artifacts/components/job_artifacts_table.vue10
-rw-r--r--app/assets/javascripts/ci/artifacts/constants.js1
-rw-r--r--app/assets/javascripts/ci/artifacts/utils.js5
-rw-r--r--app/assets/javascripts/jira_connect/subscriptions/constants.js5
-rw-r--r--app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue2
-rw-r--r--app/assets/javascripts/whats_new/components/app.vue5
-rw-r--r--app/assets/javascripts/whats_new/utils/notification.js2
-rw-r--r--app/assets/javascripts/work_items/components/work_item_detail.vue40
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue64
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue36
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue10
-rw-r--r--app/helpers/search_helper.rb9
-rw-r--r--app/models/release_highlight.rb16
-rw-r--r--app/services/concerns/search/filter.rb2
-rw-r--r--app/services/jira_connect_installations/update_service.rb2
-rw-r--r--app/services/search/global_service.rb2
-rw-r--r--app/views/admin/application_settings/_signin.html.haml2
-rw-r--r--app/views/admin/sessions/two_factor.html.haml2
-rw-r--r--app/views/devise/sessions/two_factor.html.haml2
21 files changed, 133 insertions, 96 deletions
diff --git a/app/assets/javascripts/analytics/cycle_analytics/components/value_stream_filters.vue b/app/assets/javascripts/analytics/cycle_analytics/components/value_stream_filters.vue
index b9d1c4b0fe0..0de62013a63 100644
--- a/app/assets/javascripts/analytics/cycle_analytics/components/value_stream_filters.vue
+++ b/app/assets/javascripts/analytics/cycle_analytics/components/value_stream_filters.vue
@@ -82,6 +82,7 @@ export default {
<div>
<projects-dropdown-filter
v-if="hasProjectFilter"
+ toggle-classes="gl-max-w-26"
class="js-projects-dropdown-filter project-select gl-mb-2 gl-lg-mb-0"
:group-namespace="groupPath"
:query-params="projectsQueryParams"
diff --git a/app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue b/app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue
index fc37e413961..f881c924ae5 100644
--- a/app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue
+++ b/app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue
@@ -50,6 +50,11 @@ export default {
required: false,
default: false,
},
+ toggleClasses: {
+ type: String,
+ required: false,
+ default: '',
+ },
},
data() {
return {
@@ -222,7 +227,6 @@ export default {
<template>
<gl-collapsible-listbox
ref="projectsDropdown"
- toggle-class="gl-shadow-none gl-mb-0"
:header-text="__('Projects')"
:items="listBoxItems"
:reset-button-label="__('Clear All')"
@@ -238,7 +242,10 @@ export default {
@select="onSelected"
>
<template #toggle>
- <gl-button class="dropdown-projects">
+ <gl-button
+ button-text-classes="gl-w-full gl-justify-content-space-between gl-display-flex gl-shadow-none gl-mb-0"
+ :class="['dropdown-projects', toggleClasses]"
+ >
<gl-avatar
v-if="isOnlyOneProjectSelected"
:src="selectedProjects[0].avatarUrl"
diff --git a/app/assets/javascripts/ci/artifacts/components/job_artifacts_table.vue b/app/assets/javascripts/ci/artifacts/components/job_artifacts_table.vue
index 035e26d09e6..81739db9be2 100644
--- a/app/assets/javascripts/ci/artifacts/components/job_artifacts_table.vue
+++ b/app/assets/javascripts/ci/artifacts/components/job_artifacts_table.vue
@@ -313,7 +313,13 @@ export default {
return !job.archive?.downloadPath;
},
browseButtonDisabled(job) {
- return !job.browseArtifactsPath;
+ return !job.browseArtifactsPath || !job.hasMetadata;
+ },
+ browseButtonHref(job) {
+ // make href blank when button is disabled so `cursor: not-allowed` is applied
+ if (this.browseButtonDisabled(job)) return '';
+
+ return job.browseArtifactsPath;
},
deleteButtonDisabled(job) {
return !job.hasArtifacts || !this.canBulkDestroyArtifacts;
@@ -500,7 +506,7 @@ export default {
<gl-button
icon="folder-open"
:disabled="browseButtonDisabled(item)"
- :href="item.browseArtifactsPath"
+ :href="browseButtonHref(item)"
:title="$options.i18n.browse"
:aria-label="$options.i18n.browse"
data-testid="job-artifacts-browse-button"
diff --git a/app/assets/javascripts/ci/artifacts/constants.js b/app/assets/javascripts/ci/artifacts/constants.js
index 7ba65e0f98f..4fb4b45fd7f 100644
--- a/app/assets/javascripts/ci/artifacts/constants.js
+++ b/app/assets/javascripts/ci/artifacts/constants.js
@@ -104,6 +104,7 @@ export const JOBS_PER_PAGE = 20;
export const INITIAL_LAST_PAGE_SIZE = null;
export const ARCHIVE_FILE_TYPE = 'ARCHIVE';
+export const METADATA_FILE_TYPE = 'METADATA';
export const ARTIFACT_ROW_HEIGHT = 56;
export const ARTIFACTS_SHOWN_WITHOUT_SCROLLING = 4;
diff --git a/app/assets/javascripts/ci/artifacts/utils.js b/app/assets/javascripts/ci/artifacts/utils.js
index ebcf0af8d2a..2ed78261ade 100644
--- a/app/assets/javascripts/ci/artifacts/utils.js
+++ b/app/assets/javascripts/ci/artifacts/utils.js
@@ -1,5 +1,5 @@
import { numberToHumanSize } from '~/lib/utils/number_utils';
-import { ARCHIVE_FILE_TYPE, JOB_STATUS_GROUP_SUCCESS } from './constants';
+import { ARCHIVE_FILE_TYPE, METADATA_FILE_TYPE, JOB_STATUS_GROUP_SUCCESS } from './constants';
export const totalArtifactsSizeForJob = (job) =>
numberToHumanSize(
@@ -21,6 +21,9 @@ export const mapBooleansToJobNodes = (jobNode) => {
return {
succeeded: jobNode.detailedStatus.group === JOB_STATUS_GROUP_SUCCESS,
hasArtifacts: jobNode.artifacts.nodes.length > 0,
+ hasMetadata: jobNode.artifacts.nodes.some(
+ (artifact) => artifact.fileType === METADATA_FILE_TYPE,
+ ),
...jobNode,
};
};
diff --git a/app/assets/javascripts/jira_connect/subscriptions/constants.js b/app/assets/javascripts/jira_connect/subscriptions/constants.js
index 321d10205e6..05c315e7b8a 100644
--- a/app/assets/javascripts/jira_connect/subscriptions/constants.js
+++ b/app/assets/javascripts/jira_connect/subscriptions/constants.js
@@ -24,7 +24,7 @@ export const I18N_ADD_SUBSCRIPTIONS_ERROR_MESSAGE = s__(
'Integrations|Failed to link namespace. Please try again.',
);
export const I18N_UPDATE_INSTALLATION_ERROR_MESSAGE = s__(
- 'Integrations|Failed to update GitLab version. Please try again.',
+ 'Integrations|Failed to update the GitLab instance. See the %{linkStart}troubleshooting documentation%{linkEnd}.',
);
export const I18N_OAUTH_APPLICATION_ID_ERROR_MESSAGE = s__(
'Integrations|Failed to load Jira Connect Application ID. Please try again.',
@@ -40,6 +40,9 @@ export const INTEGRATIONS_DOC_LINK = helpPagePath('integration/jira/development_
export const OAUTH_SELF_MANAGED_DOC_LINK = helpPagePath('integration/jira/connect-app', {
anchor: 'connect-the-gitlab-for-jira-cloud-app-for-self-managed-instances',
});
+export const FAILED_TO_UPDATE_DOC_LINK = helpPagePath('integration/jira/connect-app', {
+ anchor: 'failed-to-update-the-gitlab-instance-for-self-managed-instances',
+});
export const GITLAB_COM_BASE_PATH = 'https://gitlab.com';
diff --git a/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue
index 8cc107930d1..d9ce272563b 100644
--- a/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue
+++ b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue
@@ -8,6 +8,7 @@ import { updateInstallation, setApiBaseURL } from '~/jira_connect/subscriptions/
import {
GITLAB_COM_BASE_PATH,
I18N_UPDATE_INSTALLATION_ERROR_MESSAGE,
+ FAILED_TO_UPDATE_DOC_LINK,
} from '~/jira_connect/subscriptions/constants';
import { SET_ALERT } from '~/jira_connect/subscriptions/store/mutation_types';
@@ -56,6 +57,7 @@ export default {
.catch(() => {
this.setAlert({
message: I18N_UPDATE_INSTALLATION_ERROR_MESSAGE,
+ linkUrl: FAILED_TO_UPDATE_DOC_LINK,
variant: 'danger',
});
this.loadingVersionSelect = false;
diff --git a/app/assets/javascripts/whats_new/components/app.vue b/app/assets/javascripts/whats_new/components/app.vue
index 472bc1dfacc..a439675d467 100644
--- a/app/assets/javascripts/whats_new/components/app.vue
+++ b/app/assets/javascripts/whats_new/components/app.vue
@@ -22,7 +22,8 @@ export default {
props: {
versionDigest: {
type: String,
- required: true,
+ required: false,
+ default: undefined,
},
},
computed: {
@@ -75,7 +76,7 @@ export default {
<template #title>
<h4 class="page-title gl-my-2">{{ __("What's new") }}</h4>
</template>
- <template v-if="features.length">
+ <template v-if="features.length || !fetching">
<gl-infinite-scroll
:fetched-items="features.length"
:max-list-height="drawerBodyHeight"
diff --git a/app/assets/javascripts/whats_new/utils/notification.js b/app/assets/javascripts/whats_new/utils/notification.js
index f9b725ed429..1621c4d5f27 100644
--- a/app/assets/javascripts/whats_new/utils/notification.js
+++ b/app/assets/javascripts/whats_new/utils/notification.js
@@ -9,7 +9,7 @@ export const setNotification = (appEl) => {
let notificationCountEl = notificationEl.querySelector('.js-whats-new-notification-count');
- if (localStorage.getItem(STORAGE_KEY) === versionDigest) {
+ if (localStorage.getItem(STORAGE_KEY) === versionDigest || versionDigest === undefined) {
notificationEl.classList.remove('with-notifications');
if (notificationCountEl) {
notificationCountEl.parentElement.removeChild(notificationCountEl);
diff --git a/app/assets/javascripts/work_items/components/work_item_detail.vue b/app/assets/javascripts/work_items/components/work_item_detail.vue
index d25416d0397..0b7d9edd765 100644
--- a/app/assets/javascripts/work_items/components/work_item_detail.vue
+++ b/app/assets/javascripts/work_items/components/work_item_detail.vue
@@ -12,7 +12,6 @@ import {
GlEmptyState,
} from '@gitlab/ui';
import noAccessSvg from '@gitlab/svgs/dist/illustrations/analytics/no-access.svg?raw';
-import * as Sentry from '@sentry/browser';
import { s__ } from '~/locale';
import { getParameterByName, updateHistory, setUrlParams } from '~/lib/utils/url_utility';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
@@ -426,44 +425,6 @@ export default {
store.writeQuery({ ...query, data: newData });
},
- async updateWorkItem(workItem, childId, parentId) {
- return this.$apollo.mutate({
- mutation: updateWorkItemMutation,
- variables: { input: { id: childId, hierarchyWidget: { parentId } } },
- update: (store) => this.toggleChildFromCache(workItem, childId, store),
- });
- },
- async undoChildRemoval(workItem, childId) {
- try {
- const { data } = await this.updateWorkItem(workItem, childId, this.workItem.id);
-
- if (data.workItemUpdate.errors.length === 0) {
- this.activeToast?.hide();
- }
- } catch (error) {
- this.updateError = s__('WorkItem|Something went wrong while undoing child removal.');
- Sentry.captureException(error);
- } finally {
- this.activeToast?.hide();
- }
- },
- async removeChild({ id }) {
- try {
- const { data } = await this.updateWorkItem(null, id, null);
-
- if (data.workItemUpdate.errors.length === 0) {
- this.activeToast = this.$toast.show(s__('WorkItem|Child removed'), {
- action: {
- text: s__('WorkItem|Undo'),
- onClick: this.undoChildRemoval.bind(this, data.workItemUpdate.workItem, id),
- },
- });
- }
- } catch (error) {
- this.updateError = s__('WorkItem|Something went wrong while removing child.');
- Sentry.captureException(error);
- }
- },
updateHasNotes() {
this.$emit('has-notes');
},
@@ -716,7 +677,6 @@ export default {
:can-update="canUpdate"
:confidential="workItem.confidential"
@addWorkItemChild="addChild"
- @removeChild="removeChild"
@show-modal="openInModal"
/>
<work-item-notes
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue
index bca74bad3df..a18dfd4d9e3 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue
@@ -1,15 +1,20 @@
<script>
+import * as Sentry from '@sentry/browser';
import produce from 'immer';
import Draggable from 'vuedraggable';
import { isLoggedIn } from '~/lib/utils/common_utils';
import { DEFAULT_DEBOUNCE_AND_THROTTLE_MS } from '~/lib/utils/constants';
+import { s__ } from '~/locale';
import { defaultSortableOptions } from '~/sortable/constants';
import { WORK_ITEM_TYPE_VALUE_OBJECTIVE } from '../../constants';
import { findHierarchyWidgets } from '../../utils';
-import workItemByIidQuery from '../../graphql/work_item_by_iid.query.graphql';
+import addHierarchyChildMutation from '../../graphql/add_hierarchy_child.mutation.graphql';
+import removeHierarchyChildMutation from '../../graphql/remove_hierarchy_child.mutation.graphql';
import reorderWorkItem from '../../graphql/reorder_work_item.mutation.graphql';
+import updateWorkItemMutation from '../../graphql/update_work_item.mutation.graphql';
+import workItemByIidQuery from '../../graphql/work_item_by_iid.query.graphql';
import WorkItemLinkChild from './work_item_link_child.vue';
export default {
@@ -74,6 +79,58 @@ export default {
},
},
methods: {
+ async removeChild(child) {
+ try {
+ const { data } = await this.$apollo.mutate({
+ mutation: updateWorkItemMutation,
+ variables: { input: { id: child.id, hierarchyWidget: { parentId: null } } },
+ });
+
+ if (data.workItemUpdate.errors.length) {
+ throw new Error(data.workItemUpdate.errors);
+ }
+
+ await this.$apollo.mutate({
+ mutation: removeHierarchyChildMutation,
+ variables: { fullPath: this.fullPath, iid: this.workItemIid, workItem: child },
+ });
+
+ this.$toast.show(s__('WorkItem|Child removed'), {
+ action: {
+ text: s__('WorkItem|Undo'),
+ onClick: (_, toast) => {
+ this.undoChildRemoval(child);
+ toast.hide();
+ },
+ },
+ });
+ } catch (error) {
+ this.$emit('error', s__('WorkItem|Something went wrong while removing child.'));
+ Sentry.captureException(error);
+ }
+ },
+ async undoChildRemoval(child) {
+ try {
+ const { data } = await this.$apollo.mutate({
+ mutation: updateWorkItemMutation,
+ variables: { input: { id: child.id, hierarchyWidget: { parentId: this.workItemId } } },
+ });
+
+ if (data.workItemUpdate.errors.length) {
+ throw new Error(data.workItemUpdate.errors);
+ }
+
+ await this.$apollo.mutate({
+ mutation: addHierarchyChildMutation,
+ variables: { fullPath: this.fullPath, iid: this.workItemIid, workItem: child },
+ });
+
+ this.$toast.show(s__('WorkItem|Child removal reverted'));
+ } catch (error) {
+ this.$emit('error', s__('WorkItem|Something went wrong while undoing child removal.'));
+ Sentry.captureException(error);
+ }
+ },
addWorkItemQuery({ iid }) {
this.$apollo.addSmartQuery('prefetchedWorkItem', {
query: workItemByIidQuery,
@@ -188,7 +245,8 @@ export default {
},
)
.catch((error) => {
- this.updateError = error.message;
+ this.$emit('error', error.message);
+ Sentry.captureException(error);
});
},
},
@@ -213,7 +271,7 @@ export default {
:has-indirect-children="hasIndirectChildren"
@mouseover="prefetchWorkItem(child)"
@mouseout="clearPrefetching"
- @removeChild="$emit('removeChild', $event)"
+ @removeChild="removeChild"
@click="$emit('show-modal', { event: $event, child: $event.childItem || child })"
/>
</component>
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue
index 338fe55cb40..efcbe8062e0 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue
@@ -13,7 +13,6 @@ import { FORM_TYPES, WIDGET_ICONS, WORK_ITEM_STATUS_TEXT } from '../../constants
import { findHierarchyWidgetChildren } from '../../utils';
import addHierarchyChildMutation from '../../graphql/add_hierarchy_child.mutation.graphql';
import removeHierarchyChildMutation from '../../graphql/remove_hierarchy_child.mutation.graphql';
-import updateWorkItemMutation from '../../graphql/update_work_item.mutation.graphql';
import workItemByIidQuery from '../../graphql/work_item_by_iid.query.graphql';
import WidgetWrapper from '../widget_wrapper.vue';
import WorkItemDetailModal from '../work_item_detail_modal.vue';
@@ -92,7 +91,6 @@ export default {
return {
isShownAddForm: false,
activeChild: {},
- activeToast: null,
error: undefined,
parentIssue: null,
formType: null,
@@ -168,7 +166,7 @@ export default {
},
handleWorkItemDeleted(child) {
this.removeHierarchyChild(child);
- this.activeToast = this.$toast.show(s__('WorkItem|Task deleted'));
+ this.$toast.show(s__('WorkItem|Task deleted'));
},
updateWorkItemIdUrlQuery({ iid } = {}) {
updateHistory({ url: setUrlParams({ work_item_iid: iid }), replace: true });
@@ -185,36 +183,6 @@ export default {
variables: { fullPath: this.fullPath, iid: this.iid, workItem },
});
},
- async undoChildRemoval(workItem, childId) {
- const { data } = await this.$apollo.mutate({
- mutation: updateWorkItemMutation,
- variables: { input: { id: childId, hierarchyWidget: { parentId: this.issuableGid } } },
- });
-
- await this.addHierarchyChild(workItem);
-
- if (data.workItemUpdate.errors.length === 0) {
- this.activeToast?.hide();
- }
- },
- async removeChild(workItem) {
- const childId = workItem.id;
- const { data } = await this.$apollo.mutate({
- mutation: updateWorkItemMutation,
- variables: { input: { id: childId, hierarchyWidget: { parentId: null } } },
- });
-
- await this.removeHierarchyChild(workItem);
-
- if (data.workItemUpdate.errors.length === 0) {
- this.activeToast = this.$toast.show(s__('WorkItem|Child removed'), {
- action: {
- text: s__('WorkItem|Undo'),
- onClick: this.undoChildRemoval.bind(this, data.workItemUpdate.workItem, childId),
- },
- });
- }
- },
toggleReportAbuseDrawer(isOpen, reply = {}) {
this.isReportDrawerOpen = isOpen;
this.reportedUrl = reply.url;
@@ -307,7 +275,7 @@ export default {
:can-update="canUpdate"
:work-item-id="issuableGid"
:work-item-iid="iid"
- @removeChild="removeChild"
+ @error="error = $event"
@show-modal="openChild"
/>
<work-item-detail-modal
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue
index 93c570e9bd0..4e80e0071ae 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue
@@ -60,6 +60,7 @@ export default {
},
data() {
return {
+ error: undefined,
isShownAddForm: false,
formType: null,
childType: null,
@@ -98,7 +99,12 @@ export default {
</script>
<template>
- <widget-wrapper ref="wrapper" data-testid="work-item-tree">
+ <widget-wrapper
+ ref="wrapper"
+ :error="error"
+ data-testid="work-item-tree"
+ @dismissAlert="error = undefined"
+ >
<template #header>
{{ $options.WORK_ITEMS_TREE_TEXT_MAP[workItemType].title }}
</template>
@@ -144,7 +150,7 @@ export default {
:work-item-id="workItemId"
:work-item-iid="workItemIid"
:work-item-type="workItemType"
- @removeChild="$emit('removeChild', $event)"
+ @error="error = $event"
@show-modal="showModal"
/>
</template>
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index b4c2d80d8e7..a1ce4221b19 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -612,7 +612,14 @@ module SearchHelper
def sanitized_search_params
sanitized_params = params.dup
- sanitized_params[:confidential] = Gitlab::Utils.to_boolean(sanitized_params[:confidential]) if sanitized_params.key?(:confidential)
+
+ if sanitized_params.key?(:confidential)
+ sanitized_params[:confidential] = Gitlab::Utils.to_boolean(sanitized_params[:confidential])
+ end
+
+ if sanitized_params.key?(:include_archived)
+ sanitized_params[:include_archived] = Gitlab::Utils.to_boolean(sanitized_params[:include_archived])
+ end
sanitized_params
end
diff --git a/app/models/release_highlight.rb b/app/models/release_highlight.rb
index 7cead8a42cd..5a6f708f689 100644
--- a/app/models/release_highlight.rb
+++ b/app/models/release_highlight.rb
@@ -8,6 +8,12 @@ class ReleaseHighlight
ULTIMATE_PACKAGE = 'Ultimate'
def self.paginated(page: 1)
+ result = self.paginated_query(page: page)
+ result = self.paginated_query(page: result.next_page) while next_page?(result)
+ result
+ end
+
+ def self.paginated_query(page:)
key = self.cache_key("items:page-#{page}")
Rails.cache.fetch(key, expires_in: CACHE_DURATION) do
@@ -44,7 +50,7 @@ class ReleaseHighlight
rescue Psych::Exception => e
Gitlab::ErrorTracking.track_exception(e, file_path: file_path)
- nil
+ []
end
def self.whats_new_path
@@ -121,6 +127,14 @@ class ReleaseHighlight
item['available_in']&.include?(current_package)
end
+
+ def self.next_page?(result)
+ return false unless result
+
+ # if all items for the current page doesn't belong to the current tier
+ # or failed to parse current YAML, loading next page
+ result.items == [] && result.next_page.present?
+ end
end
ReleaseHighlight.prepend_mod
diff --git a/app/services/concerns/search/filter.rb b/app/services/concerns/search/filter.rb
index c358f49eef1..e234edcfce4 100644
--- a/app/services/concerns/search/filter.rb
+++ b/app/services/concerns/search/filter.rb
@@ -5,7 +5,7 @@ module Search
private
def filters
- { state: params[:state], confidential: params[:confidential] }
+ { state: params[:state], confidential: params[:confidential], include_archived: params[:include_archived] }
end
end
end
diff --git a/app/services/jira_connect_installations/update_service.rb b/app/services/jira_connect_installations/update_service.rb
index ff5b9671e2b..d0cf614a068 100644
--- a/app/services/jira_connect_installations/update_service.rb
+++ b/app/services/jira_connect_installations/update_service.rb
@@ -51,7 +51,7 @@ module JiraConnectInstallations
'Could not be installed on the instance. Network error'
end
- ServiceResponse.error(message: { instance_url: [message] })
+ ServiceResponse.error(message: message)
end
def update_error
diff --git a/app/services/search/global_service.rb b/app/services/search/global_service.rb
index 2d4952dacfd..85ca0b850f5 100644
--- a/app/services/search/global_service.rb
+++ b/app/services/search/global_service.rb
@@ -25,7 +25,7 @@ module Search
# rubocop: disable CodeReuse/ActiveRecord
def projects
- @projects ||= ProjectsFinder.new(params: { non_archived: true }, current_user: current_user).execute.preload(:topics, :project_topics)
+ @projects ||= ProjectsFinder.new(current_user: current_user).execute.preload(:topics, :project_topics)
end
def allowed_scopes
diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml
index 50b5e797559..85841059c5e 100644
--- a/app/views/admin/application_settings/_signin.html.haml
+++ b/app/views/admin/application_settings/_signin.html.haml
@@ -29,7 +29,7 @@
.form-text.text-muted
= _('Maximum time that users are allowed to skip the setup of two-factor authentication (in hours). Set to 0 (zero) to enforce at next sign in.')
.form-group
- = f.label :admin_mode, _('Admin Mode'), class: 'label-bold'
+ = f.label :admin_mode, _('Admin mode'), class: 'label-bold'
= sprite_icon('lock', css_class: 'gl-icon')
- help_text = _('Require additional authentication for administrative tasks.')
- help_link = link_to _('Learn more.'), help_page_path('user/admin_area/settings/sign_in_restrictions', anchor: 'admin-mode'), target: '_blank', rel: 'noopener noreferrer'
diff --git a/app/views/admin/sessions/two_factor.html.haml b/app/views/admin/sessions/two_factor.html.haml
index 3bbf768d7be..69f8a8a3a97 100644
--- a/app/views/admin/sessions/two_factor.html.haml
+++ b/app/views/admin/sessions/two_factor.html.haml
@@ -1,4 +1,4 @@
-- page_title _('Enter 2FA for Admin Mode')
+- page_title _('Two-factor authentication for admin mode')
- add_page_specific_style 'page_bundles/login'
.row.justify-content-center
diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml
index 06152e3dac5..3d77ac35b01 100644
--- a/app/views/devise/sessions/two_factor.html.haml
+++ b/app/views/devise/sessions/two_factor.html.haml
@@ -1,5 +1,5 @@
%div
- = render 'devise/shared/tab_single', tab_title: _('Two-Factor Authentication') if Feature.disabled?(:restyle_login_page, @project)
+ = render 'devise/shared/tab_single', tab_title: _('Two-factor authentication') if Feature.disabled?(:restyle_login_page, @project)
.login-box.gl-p-5
.login-body
- if @user.two_factor_enabled?