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-10-19 00:11:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 00:11:14 +0300
commit0fd6206b8f54a122743dc993d31db31bc2ddac5d (patch)
treef3f5d4570b95e76a48d34f59c65e8c20653a0367 /app
parent962b96e640834c04a729f7478afa48d3dedf9fca (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/ci/common/pipelines_table.vue3
-rw-r--r--app/assets/javascripts/diffs/components/app.vue45
-rw-r--r--app/assets/javascripts/diffs/components/graphql/get_mr_codequality_reports.query.graphql46
-rw-r--r--app/assets/javascripts/diffs/index.js5
-rw-r--r--app/assets/javascripts/diffs/utils/sort_findings_by_file.js17
-rw-r--r--app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue19
-rw-r--r--app/assets/javascripts/work_items/components/work_item_actions.vue6
-rw-r--r--app/assets/javascripts/work_items/components/work_item_assignees.vue6
-rw-r--r--app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue9
-rw-r--r--app/assets/javascripts/work_items/components/work_item_created_updated.vue6
-rw-r--r--app/assets/javascripts/work_items/components/work_item_description.vue6
-rw-r--r--app/assets/javascripts/work_items/components/work_item_detail.vue8
-rw-r--r--app/assets/javascripts/work_items/components/work_item_labels.vue6
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_children_wrapper.vue6
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue2
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue6
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue7
-rw-r--r--app/assets/javascripts/work_items/components/work_item_links/work_item_tree_children.vue1
-rw-r--r--app/assets/javascripts/work_items/components/work_item_milestone.vue5
-rw-r--r--app/assets/javascripts/work_items/components/work_item_notes.vue5
-rw-r--r--app/controllers/projects/merge_requests_controller.rb6
-rw-r--r--app/helpers/merge_requests_helper.rb3
-rw-r--r--app/serializers/ci/pipeline_entity.rb8
-rw-r--r--app/views/admin/health_check/show.html.haml11
-rw-r--r--app/views/projects/artifacts/file.html.haml2
-rw-r--r--app/views/projects/blob/_header.html.haml1
-rw-r--r--app/views/projects/blob/_viewer_switcher.html.haml12
27 files changed, 214 insertions, 43 deletions
diff --git a/app/assets/javascripts/ci/common/pipelines_table.vue b/app/assets/javascripts/ci/common/pipelines_table.vue
index 9aa12ae9764..13b5120654a 100644
--- a/app/assets/javascripts/ci/common/pipelines_table.vue
+++ b/app/assets/javascripts/ci/common/pipelines_table.vue
@@ -137,7 +137,8 @@ export default {
return cleanLeadingSeparator(item.project.full_path);
},
failedJobsCount(pipeline) {
- return pipeline?.failed_builds?.length || 0;
+ // Remove `pipeline?.failed_builds?.length` when we remove `ci_fix_performance_pipelines_json_endpoint`.
+ return pipeline?.failed_builds_count || pipeline?.failed_builds?.length || 0;
},
onRefreshPipelinesTable() {
this.$emit('refresh-pipelines-table');
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index 1a7fac02b95..924c515ee2d 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -3,6 +3,7 @@ import { GlLoadingIcon, GlPagination, GlSprintf, GlAlert } from '@gitlab/ui';
import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
// eslint-disable-next-line no-restricted-imports
import { mapState, mapGetters, mapActions } from 'vuex';
+import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { convertToGraphQLId } from '~/graphql_shared/utils';
import api from '~/api';
import {
@@ -22,6 +23,7 @@ import { __ } from '~/locale';
import notesEventHub from '~/notes/event_hub';
import { DynamicScroller, DynamicScrollerItem } from 'vendor/vue-virtual-scroller';
+import { sortFindingsByFile } from '../utils/sort_findings_by_file';
import {
MR_TREE_SHOW_KEY,
ALERT_OVERFLOW_HIDDEN,
@@ -53,6 +55,7 @@ import HiddenFilesWarning from './hidden_files_warning.vue';
import NoChanges from './no_changes.vue';
import VirtualScrollerScrollSync from './virtual_scroller_scroll_sync';
import DiffsFileTree from './diffs_file_tree.vue';
+import getMRCodequalityReports from './graphql/get_mr_codequality_reports.query.graphql';
export default {
name: 'DiffsApp',
@@ -75,6 +78,7 @@ export default {
GenerateTestFileDrawer: () =>
import('ee_component/ai/components/generate_test_file_drawer.vue'),
},
+ mixins: [glFeatureFlagsMixin()],
alerts: {
ALERT_OVERFLOW_HIDDEN,
ALERT_MERGE_CONFLICT,
@@ -86,6 +90,16 @@ export default {
required: false,
default: '',
},
+ projectPath: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ iid: {
+ type: String,
+ required: false,
+ default: '',
+ },
endpointSast: {
type: String,
required: false,
@@ -123,6 +137,32 @@ export default {
subscribedToVirtualScrollingEvents: false,
};
},
+ apollo: {
+ getMRCodequalityReports: {
+ query: getMRCodequalityReports,
+ variables() {
+ return { fullPath: this.projectPath, iid: this.iid };
+ },
+ skip() {
+ return !this.endpointCodequality || !this.sastReportsInInlineDiff;
+ },
+ update(data) {
+ if (data?.project?.mergeRequest?.codequalityReportsComparer?.report?.newErrors) {
+ this.$store.commit(
+ 'diffs/SET_CODEQUALITY_DATA',
+ sortFindingsByFile(
+ data.project.mergeRequest.codequalityReportsComparer.report.newErrors,
+ ),
+ );
+ }
+ },
+ error() {
+ createAlert({
+ message: __('Something went wrong fetching the CodeQuality Findings. Please try again!'),
+ });
+ },
+ },
+ },
computed: {
...mapState('diffs', {
numTotalFiles: 'realSize',
@@ -220,6 +260,9 @@ export default {
resourceId() {
return convertToGraphQLId('MergeRequest', this.getNoteableData.id);
},
+ sastReportsInInlineDiff() {
+ return this.glFeatures.sastReportsInInlineDiff;
+ },
},
watch: {
commit(newCommit, oldCommit) {
@@ -465,7 +508,7 @@ export default {
this.fetchCoverageFiles();
}
- if (this.endpointCodequality) {
+ if (this.endpointCodequality && !this.sastReportsInInlineDiff) {
this.fetchCodequality();
}
diff --git a/app/assets/javascripts/diffs/components/graphql/get_mr_codequality_reports.query.graphql b/app/assets/javascripts/diffs/components/graphql/get_mr_codequality_reports.query.graphql
new file mode 100644
index 00000000000..b6920d0f6ec
--- /dev/null
+++ b/app/assets/javascripts/diffs/components/graphql/get_mr_codequality_reports.query.graphql
@@ -0,0 +1,46 @@
+query getMRCodequalityReports($fullPath: ID!, $iid: String!) {
+ project(fullPath: $fullPath) {
+ id
+ mergeRequest(iid: $iid) {
+ id
+ title
+ codequalityReportsComparer {
+ report {
+ status
+ newErrors {
+ description
+ fingerprint
+ severity
+ filePath
+ line
+ webUrl
+ engineName
+ }
+ resolvedErrors {
+ description
+ fingerprint
+ severity
+ filePath
+ line
+ webUrl
+ engineName
+ }
+ existingErrors {
+ description
+ fingerprint
+ severity
+ filePath
+ line
+ webUrl
+ engineName
+ }
+ summary {
+ errored
+ resolved
+ total
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/app/assets/javascripts/diffs/index.js b/app/assets/javascripts/diffs/index.js
index 49f25416585..c0b6c8159dc 100644
--- a/app/assets/javascripts/diffs/index.js
+++ b/app/assets/javascripts/diffs/index.js
@@ -2,6 +2,7 @@ import Vue from 'vue';
import VueApollo from 'vue-apollo';
// eslint-disable-next-line no-restricted-imports
import { mapActions, mapState, mapGetters } from 'vuex';
+import { cleanLeadingSeparator } from '~/lib/utils/url_utility';
import { apolloProvider } from '~/graphql_shared/issuable_client';
import { getCookie, parseBoolean, removeCookie } from '~/lib/utils/common_utils';
import notesStore from '~/mr_notes/stores';
@@ -31,6 +32,8 @@ export default function initDiffsApp(store = notesStore) {
},
data() {
return {
+ projectPath: dataset.projectPath || '',
+ iid: dataset.iid || '',
endpointCoverage: dataset.endpointCoverage || '',
endpointCodequality: dataset.endpointCodequality || '',
endpointSast: dataset.endpointSast || '',
@@ -79,6 +82,8 @@ export default function initDiffsApp(store = notesStore) {
render(createElement) {
return createElement('diffs-app', {
props: {
+ projectPath: cleanLeadingSeparator(this.projectPath),
+ iid: this.iid,
endpointCoverage: this.endpointCoverage,
endpointCodequality: this.endpointCodequality,
endpointSast: this.endpointSast,
diff --git a/app/assets/javascripts/diffs/utils/sort_findings_by_file.js b/app/assets/javascripts/diffs/utils/sort_findings_by_file.js
new file mode 100644
index 00000000000..3a285e80ace
--- /dev/null
+++ b/app/assets/javascripts/diffs/utils/sort_findings_by_file.js
@@ -0,0 +1,17 @@
+export function sortFindingsByFile(newErrors = []) {
+ const files = {};
+ newErrors.forEach(({ filePath, line, description, severity }) => {
+ if (!files[filePath]) {
+ files[filePath] = [];
+ }
+ files[filePath].push({ line, description, severity: severity.toLowerCase() });
+ });
+
+ const sortedFiles = Object.keys(files)
+ .sort()
+ .reduce((acc, key) => {
+ acc[key] = files[key];
+ return acc;
+ }, {});
+ return { files: sortedFiles };
+}
diff --git a/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue b/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue
index e034607f79c..f2257adb79c 100644
--- a/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue
+++ b/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue
@@ -188,15 +188,14 @@ export default {
<template>
<div data-testid="sidebar-todo" :class="{ 'inline-block': !isMergeRequest }">
<todo-button
+ v-if="isNotificationsTodosButtons"
v-gl-tooltip.hover.top
- :title="isNotificationsTodosButtons ? tootltipTitle : undefined"
+ :title="tootltipTitle"
:issuable-type="issuableType"
:issuable-id="issuableId"
:is-todo="hasTodo"
- :loading="isLoading"
- :size="isMergeRequest || isNotificationsTodosButtons ? 'medium' : 'small'"
- :class="{ 'btn-icon': isNotificationsTodosButtons }"
- class="hide-collapsed"
+ :disabled="isLoading"
+ class="hide-collapsed btn-icon"
@click.stop.prevent="toggleTodo"
>
<gl-icon
@@ -205,6 +204,16 @@ export default {
:name="collapsedButtonIcon"
/>
</todo-button>
+ <todo-button
+ v-else
+ :issuable-type="issuableType"
+ :issuable-id="issuableId"
+ :is-todo="hasTodo"
+ :loading="isLoading"
+ :size="isMergeRequest ? 'medium' : 'small'"
+ class="hide-collapsed"
+ @click.stop.prevent="toggleTodo"
+ />
<gl-button
v-if="isClassicSidebar && !isMergeRequest"
v-gl-tooltip.left.viewport
diff --git a/app/assets/javascripts/work_items/components/work_item_actions.vue b/app/assets/javascripts/work_items/components/work_item_actions.vue
index b2f1bbb7c89..02d2ea24ca0 100644
--- a/app/assets/javascripts/work_items/components/work_item_actions.vue
+++ b/app/assets/javascripts/work_items/components/work_item_actions.vue
@@ -67,8 +67,12 @@ export default {
copyCreateNoteEmailTestId: TEST_ID_COPY_CREATE_NOTE_EMAIL_ACTION,
deleteActionTestId: TEST_ID_DELETE_ACTION,
promoteActionTestId: TEST_ID_PROMOTE_ACTION,
- inject: ['fullPath', 'isGroup'],
+ inject: ['isGroup'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemId: {
type: String,
required: false,
diff --git a/app/assets/javascripts/work_items/components/work_item_assignees.vue b/app/assets/javascripts/work_items/components/work_item_assignees.vue
index a29d5c7fc75..a9aafbb3d84 100644
--- a/app/assets/javascripts/work_items/components/work_item_assignees.vue
+++ b/app/assets/javascripts/work_items/components/work_item_assignees.vue
@@ -55,8 +55,12 @@ export default {
GlIntersectionObserver,
},
mixins: [Tracking.mixin()],
- inject: ['fullPath', 'isGroup'],
+ inject: ['isGroup'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemId: {
type: String,
required: true,
diff --git a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue
index 139f0f7919c..e8eb7331bd0 100644
--- a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue
+++ b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue
@@ -29,8 +29,11 @@ export default {
import('ee_component/work_items/components/work_item_health_status.vue'),
},
mixins: [glFeatureFlagMixin()],
- inject: ['fullPath'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItem: {
type: Object,
required: true,
@@ -98,6 +101,7 @@ export default {
<work-item-assignees
v-if="workItemAssignees"
:can-update="canUpdate"
+ :full-path="fullPath"
:work-item-id="workItem.id"
:assignees="workItemAssignees.assignees.nodes"
:allows-multiple-assignees="workItemAssignees.allowsMultipleAssignees"
@@ -108,6 +112,7 @@ export default {
<work-item-labels
v-if="workItemLabels"
:can-update="canUpdate"
+ :full-path="fullPath"
:work-item-id="workItem.id"
:work-item-iid="workItem.iid"
@error="$emit('error', $event)"
@@ -123,6 +128,7 @@ export default {
/>
<work-item-milestone
v-if="workItemMilestone"
+ :full-path="fullPath"
:work-item-id="workItem.id"
:work-item-milestone="workItemMilestone.milestone"
:work-item-type="workItemType"
@@ -151,6 +157,7 @@ export default {
<work-item-iteration
v-if="workItemIteration"
class="gl-mb-5"
+ :full-path="fullPath"
:iteration="workItemIteration.iteration"
:can-update="canUpdate"
:work-item-id="workItem.id"
diff --git a/app/assets/javascripts/work_items/components/work_item_created_updated.vue b/app/assets/javascripts/work_items/components/work_item_created_updated.vue
index ac1496cbc37..460b5d35187 100644
--- a/app/assets/javascripts/work_items/components/work_item_created_updated.vue
+++ b/app/assets/javascripts/work_items/components/work_item_created_updated.vue
@@ -19,8 +19,12 @@ export default {
ConfidentialityBadge,
GlLoadingIcon,
},
- inject: ['fullPath', 'isGroup'],
+ inject: ['isGroup'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemIid: {
type: String,
required: false,
diff --git a/app/assets/javascripts/work_items/components/work_item_description.vue b/app/assets/javascripts/work_items/components/work_item_description.vue
index b1596183f6c..b7f3ac93cdb 100644
--- a/app/assets/javascripts/work_items/components/work_item_description.vue
+++ b/app/assets/javascripts/work_items/components/work_item_description.vue
@@ -26,8 +26,12 @@ export default {
WorkItemDescriptionRendered,
},
mixins: [Tracking.mixin()],
- inject: ['fullPath', 'isGroup'],
+ inject: ['isGroup'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemId: {
type: String,
required: true,
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 fe3b8845be3..53929775684 100644
--- a/app/assets/javascripts/work_items/components/work_item_detail.vue
+++ b/app/assets/javascripts/work_items/components/work_item_detail.vue
@@ -468,6 +468,7 @@ export default {
@error="updateError = $event"
/>
<work-item-actions
+ :full-path="fullPath"
:work-item-id="workItem.id"
:subscribed-to-notifications="workItemNotificationsSubscribed"
:work-item-type="workItemType"
@@ -505,6 +506,7 @@ export default {
@error="updateError = $event"
/>
<work-item-created-updated
+ :full-path="fullPath"
:work-item-iid="workItemIid"
:update-in-progress="updateInProgress"
/>
@@ -542,6 +544,7 @@ export default {
@error="updateError = $event"
/>
<work-item-actions
+ :full-path="fullPath"
:work-item-id="workItem.id"
:subscribed-to-notifications="workItemNotificationsSubscribed"
:work-item-type="workItemType"
@@ -572,12 +575,14 @@ export default {
<work-item-attributes-wrapper
:class="{ 'gl-md-display-none!': workItemsMvc2Enabled }"
class="gl-border-b"
+ :full-path="fullPath"
:work-item="workItem"
:work-item-parent-id="workItemParentId"
@error="updateError = $event"
/>
<work-item-description
v-if="hasDescriptionWidget"
+ :full-path="fullPath"
:work-item-id="workItem.id"
:work-item-iid="workItem.iid"
class="gl-pt-5"
@@ -594,6 +599,7 @@ export default {
/>
<work-item-tree
v-if="workItemType === $options.WORK_ITEM_TYPE_VALUE_OBJECTIVE"
+ :full-path="fullPath"
:work-item-type="workItemType"
:parent-work-item-type="workItem.workItemType.name"
:work-item-id="workItem.id"
@@ -614,6 +620,7 @@ export default {
/>
<work-item-notes
v-if="workItemNotes"
+ :full-path="fullPath"
:work-item-id="workItem.id"
:work-item-iid="workItem.iid"
:work-item-type="workItemType"
@@ -642,6 +649,7 @@ export default {
:class="{ 'is-modal': isModal }"
>
<work-item-attributes-wrapper
+ :full-path="fullPath"
:work-item="workItem"
:work-item-parent-id="workItemParentId"
@error="updateError = $event"
diff --git a/app/assets/javascripts/work_items/components/work_item_labels.vue b/app/assets/javascripts/work_items/components/work_item_labels.vue
index c42186d1c27..3cdbf816421 100644
--- a/app/assets/javascripts/work_items/components/work_item_labels.vue
+++ b/app/assets/javascripts/work_items/components/work_item_labels.vue
@@ -38,8 +38,12 @@ export default {
LabelItem,
},
mixins: [Tracking.mixin()],
- inject: ['fullPath', 'isGroup'],
+ inject: ['isGroup'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemId: {
type: String,
required: true,
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 b74afbde44a..f4de7c1dddc 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
@@ -21,8 +21,12 @@ export default {
components: {
WorkItemLinkChild,
},
- inject: ['fullPath', 'isGroup'],
+ inject: ['isGroup'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemType: {
type: String,
required: false,
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 c7dd7c5023d..7fa6ac2c57f 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
@@ -265,6 +265,7 @@ export default {
v-if="isShownAddForm"
ref="wiLinksForm"
data-testid="add-links-form"
+ :full-path="fullPath"
:issuable-gid="issuableGid"
:work-item-iid="iid"
:children-ids="childrenIds"
@@ -278,6 +279,7 @@ export default {
<work-item-children-wrapper
:children="children"
:can-update="canUpdate"
+ :full-path="fullPath"
:work-item-id="issuableGid"
:work-item-iid="iid"
@error="error = $event"
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue
index 2e5ba42c2e1..f24b56cac36 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue
@@ -37,8 +37,12 @@ export default {
GlTooltip,
WorkItemTokenInput,
},
- inject: ['fullPath', 'hasIterationsFeature', 'isGroup'],
+ inject: ['hasIterationsFeature', 'isGroup'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
issuableGid: {
type: String,
required: false,
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 bc3f5201fb8..b61b3b2e0d3 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
@@ -22,8 +22,11 @@ export default {
WorkItemLinksForm,
WorkItemChildrenWrapper,
},
- inject: ['fullPath'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemType: {
type: String,
required: true,
@@ -139,6 +142,7 @@ export default {
v-if="isShownAddForm"
ref="wiLinksForm"
data-testid="add-tree-form"
+ :full-path="fullPath"
:issuable-gid="workItemId"
:work-item-iid="workItemIid"
:form-type="formType"
@@ -152,6 +156,7 @@ export default {
<work-item-children-wrapper
:children="children"
:can-update="canUpdate"
+ :full-path="fullPath"
:work-item-id="workItemId"
:work-item-iid="workItemIid"
:work-item-type="workItemType"
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_tree_children.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_tree_children.vue
index 2cabf489bc6..401223c3593 100644
--- a/app/assets/javascripts/work_items/components/work_item_links/work_item_tree_children.vue
+++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_tree_children.vue
@@ -3,7 +3,6 @@ export default {
components: {
WorkItemLinkChild: () => import('./work_item_link_child.vue'),
},
- inject: ['fullPath'],
props: {
workItemType: {
type: String,
diff --git a/app/assets/javascripts/work_items/components/work_item_milestone.vue b/app/assets/javascripts/work_items/components/work_item_milestone.vue
index 6cc61ed4756..a2cbb7f7598 100644
--- a/app/assets/javascripts/work_items/components/work_item_milestone.vue
+++ b/app/assets/javascripts/work_items/components/work_item_milestone.vue
@@ -46,8 +46,11 @@ export default {
GlDropdownText,
},
mixins: [Tracking.mixin()],
- inject: ['fullPath'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemId: {
type: String,
required: true,
diff --git a/app/assets/javascripts/work_items/components/work_item_notes.vue b/app/assets/javascripts/work_items/components/work_item_notes.vue
index 67d5b1b4d24..fe8aea99f53 100644
--- a/app/assets/javascripts/work_items/components/work_item_notes.vue
+++ b/app/assets/javascripts/work_items/components/work_item_notes.vue
@@ -46,8 +46,11 @@ export default {
WorkItemNotesActivityHeader,
WorkItemHistoryOnlyFilterNote,
},
- inject: ['fullPath'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemId: {
type: String,
required: true,
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index d57cb0a5926..ad7b7221e44 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -156,7 +156,11 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
pipelines: PipelineSerializer
.new(project: @project, current_user: @current_user)
.with_pagination(request, response)
- .represent(@pipelines, preload: true),
+ .represent(
+ @pipelines,
+ preload: true,
+ disable_failed_builds: ::Feature.enabled?(:ci_fix_performance_pipelines_json_endpoint, @project)
+ ),
count: {
all: @pipelines.count
}
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index bc1370d7e97..131cd7cd969 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -201,7 +201,8 @@ module MergeRequestsHelper
source_project_default_url: merge_request.source_project && default_url_to_repo(merge_request.source_project),
source_project_full_path: merge_request.source_project&.full_path,
is_forked: project.forked?.to_s,
- new_comment_template_path: profile_comment_templates_path
+ new_comment_template_path: profile_comment_templates_path,
+ iid: merge_request.iid
}
end
diff --git a/app/serializers/ci/pipeline_entity.rb b/app/serializers/ci/pipeline_entity.rb
index 5a124f099a7..832ca619edc 100644
--- a/app/serializers/ci/pipeline_entity.rb
+++ b/app/serializers/ci/pipeline_entity.rb
@@ -84,12 +84,18 @@ class Ci::PipelineEntity < Grape::Entity
project_pipeline_path(pipeline.project, pipeline)
end
- expose :failed_builds, if: -> (*) { can_retry? }, using: Ci::JobEntity do |pipeline|
+ expose :failed_builds,
+ if: -> (_, options) { !options[:disable_failed_builds] && can_retry? },
+ using: Ci::JobEntity do |pipeline|
pipeline.failed_builds.each do |build|
build.project = pipeline.project
end
end
+ expose :failed_builds_count do |pipeline|
+ pipeline.failed_builds.size
+ end
+
private
alias_method :pipeline, :object
diff --git a/app/views/admin/health_check/show.html.haml b/app/views/admin/health_check/show.html.haml
index 728c748d01a..90859b5c170 100644
--- a/app/views/admin/health_check/show.html.haml
+++ b/app/views/admin/health_check/show.html.haml
@@ -2,12 +2,11 @@
- no_errors = @errors.blank?
%h1.page-title.gl-font-size-h-display= page_title
-.bs-callout.clearfix
- .float-left
- %p
- #{ s_('HealthCheck|Access token is') }
- %code#health-check-token= Gitlab::CurrentSettings.health_check_access_token
- .gl-mt-3
+= render Pajamas::AlertComponent.new(variant: :tip, dismissible: false, alert_options: { class: 'gl-mb-5' }) do |c|
+ - c.with_body do
+ #{ s_('HealthCheck|Access token is') }
+ %code#health-check-token= Gitlab::CurrentSettings.health_check_access_token
+ - c.with_actions do
= render Pajamas::ButtonComponent.new(href: reset_health_check_token_admin_application_settings_path, method: :put, button_options: { data: { confirm: _('Are you sure you want to reset the health check token?') } }) do
= _("Reset health check access token")
%p.light
diff --git a/app/views/projects/artifacts/file.html.haml b/app/views/projects/artifacts/file.html.haml
index 5b9e5ad584f..d24df0d3472 100644
--- a/app/views/projects/artifacts/file.html.haml
+++ b/app/views/projects/artifacts/file.html.haml
@@ -12,8 +12,6 @@
= render 'projects/blob/header_content', blob: blob
.file-actions.d-none.d-sm-block
- = render 'projects/blob/viewer_switcher', blob: blob
-
.btn-group{ role: "group" }<
= copy_blob_source_button(blob)
= download_blob_button(blob)
diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml
index 9c07713b9f8..a1d3bef2914 100644
--- a/app/views/projects/blob/_header.html.haml
+++ b/app/views/projects/blob/_header.html.haml
@@ -4,7 +4,6 @@
= render 'projects/blob/header_content', blob: blob
.file-actions.gl-display-flex.gl-align-items-center.gl-flex-wrap.gl-md-justify-content-end<
- = render 'projects/blob/viewer_switcher', blob: blob unless blame
= render 'shared/web_ide_button', blob: blob
.btn-group.gl-ml-3{ role: "group" }
= copy_blob_source_button(blob) unless blame
diff --git a/app/views/projects/blob/_viewer_switcher.html.haml b/app/views/projects/blob/_viewer_switcher.html.haml
deleted file mode 100644
index 4eba82e6382..00000000000
--- a/app/views/projects/blob/_viewer_switcher.html.haml
+++ /dev/null
@@ -1,12 +0,0 @@
-- if blob.show_viewer_switcher?
- - simple_viewer = blob.simple_viewer
- - rich_viewer = blob.rich_viewer
-
- .btn-group.js-blob-viewer-switcher.gl-ml-3{ role: "group" }>
- - simple_label = format(_("Display %{viewer_type}"), viewer_type: simple_viewer.switcher_title)
- %button.btn.gl-button.btn-default.btn-icon.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => simple_label, title: simple_label, data: { viewer: 'simple', container: 'body' } }>
- = sprite_icon(simple_viewer.switcher_icon)
-
- - rich_label = format(_("Display %{viewer_type}"), viewer_type: rich_viewer.switcher_title)
- %button.btn.gl-button.btn-default.btn-icon.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => rich_label, title: rich_label, data: { viewer: 'rich', container: 'body' } }>
- = sprite_icon(rich_viewer.switcher_icon)