Skip to content

Commit c948b51

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent d276c6e commit c948b51

File tree

94 files changed

+1551
-490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1551
-490
lines changed

.rubocop_todo/style/inline_disable_annotation.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,6 @@ Style/InlineDisableAnnotation:
11751175
- 'ee/app/graphql/types/work_items/widgets/iteration_type.rb'
11761176
- 'ee/app/graphql/types/work_items/widgets/progress_type.rb'
11771177
- 'ee/app/graphql/types/work_items/widgets/requirement_legacy_type.rb'
1178-
- 'ee/app/graphql/types/work_items/widgets/status_type.rb'
11791178
- 'ee/app/graphql/types/work_items/widgets/test_reports_type.rb'
11801179
- 'ee/app/graphql/types/work_items/widgets/weight_type.rb'
11811180
- 'ee/app/helpers/admin/application_settings_helper.rb'

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c43b568a0605af0c71f60a98069a0e902ca04024
1+
4d333b2bb343d59410a80873e6185b8f8a2061a3

app/assets/javascripts/ci/job_details/components/sidebar/sidebar_header.vue

+24-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { GlButton, GlTooltipDirective } from '@gitlab/ui';
33
// eslint-disable-next-line no-restricted-imports
44
import { mapActions } from 'vuex';
5+
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
56
import { createAlert } from '~/alert';
67
import { TYPENAME_COMMIT_STATUS } from '~/graphql_shared/constants';
78
import { convertToGraphQLId } from '~/graphql_shared/utils';
@@ -20,6 +21,11 @@ export default {
2021
newIssue: __('New issue'),
2122
retryJobLabel: s__('Job|Retry'),
2223
runAgainJobButtonLabel: s__('Job|Run again'),
24+
forceCancelJobButtonLabel: s__('Job|Force cancel'),
25+
forceCancelJobButtonTooltip: s__('Job|Force cancel a job stuck in `canceling` state'),
26+
forceCancelJobConfirmText: s__(
27+
'Job|Are you sure you want to force cancel this job? This will immediately mark the job as canceled, even if the runner is unresponsive.',
28+
),
2329
},
2430
forwardDeploymentFailureModalId,
2531
directives: {
@@ -29,6 +35,7 @@ export default {
2935
GlButton,
3036
JobSidebarRetryButton,
3137
},
38+
mixins: [glFeatureFlagsMixin()],
3239
inject: ['projectPath'],
3340
apollo: {
3441
job: {
@@ -91,7 +98,8 @@ export default {
9198
this.restJob.new_issue_path ||
9299
this.restJob.terminal_path ||
93100
this.restJob.retry_path ||
94-
this.restJob.cancel_path,
101+
this.restJob.cancel_path ||
102+
this.restJob.force_cancel_path,
95103
);
96104
},
97105
},
@@ -165,6 +173,21 @@ export default {
165173
data-testid="cancel-button"
166174
rel="nofollow"
167175
/>
176+
<gl-button
177+
v-if="restJob.force_cancel_path && glFeatures.forceCancelBuild"
178+
v-gl-tooltip.bottom
179+
:title="$options.i18n.forceCancelJobButtonTooltip"
180+
:aria-label="$options.i18n.forceCancelJobButtonTooltip"
181+
:href="restJob.force_cancel_path"
182+
:data-confirm="$options.i18n.forceCancelJobConfirmText"
183+
data-confirm-btn-variant="danger"
184+
variant="danger"
185+
data-method="post"
186+
data-testid="force-cancel-button"
187+
rel="nofollow"
188+
>
189+
{{ $options.i18n.forceCancelJobButtonLabel }}
190+
</gl-button>
168191
</template>
169192
</div>
170193
<gl-button

app/assets/javascripts/graphql_shared/possible_types.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@
295295
"WorkItemWidgetProgress",
296296
"WorkItemWidgetRequirementLegacy",
297297
"WorkItemWidgetStartAndDueDate",
298-
"WorkItemWidgetStatus",
299298
"WorkItemWidgetTestReports",
300299
"WorkItemWidgetTimeTracking",
300+
"WorkItemWidgetVerificationStatus",
301301
"WorkItemWidgetWeight"
302302
],
303303
"WorkItemWidgetDefinition": [

app/assets/javascripts/sidebar/components/assignees/assignees.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@ export default {
5656
{{ __('None') }}
5757
<template v-if="editable">
5858
-
59-
<gl-button variant="link" data-testid="assign-yourself" @click="assignSelf">
60-
<span class="gl-text-subtle hover:gl-text-blue-800">{{ __('assign yourself') }}</span>
59+
<gl-button
60+
class="!gl-text-inherit hover:!gl-text-link"
61+
variant="link"
62+
data-testid="assign-yourself"
63+
@click="assignSelf"
64+
>
65+
{{ __('assign yourself') }}
6166
</gl-button>
6267
</template>
6368
</span>

app/assets/javascripts/sidebar/components/assignees/issuable_assignees.vue

+2-3
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,11 @@ export default {
5252
<span class="gl-ml-2">-</span>
5353
<gl-button
5454
data-testid="assign-yourself"
55-
category="tertiary"
55+
class="gl-ml-2 !gl-text-inherit hover:!gl-text-link"
5656
variant="link"
57-
class="gl-ml-2"
5857
@click="$emit('assign-self')"
5958
>
60-
<span class="gl-text-subtle hover:gl-text-blue-800">{{ __('assign yourself') }}</span>
59+
{{ __('assign yourself') }}
6160
</gl-button>
6261
</template>
6362
</div>

app/assets/javascripts/sidebar/components/assignees/sidebar_invite_members.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ export default {
2626
trigger-element="anchor"
2727
:display-text="$options.displayText"
2828
:trigger-source="triggerSource"
29-
classes="gl-block gl-pl-0 hover:gl-no-underline hover:!gl-text-blue-800"
29+
classes="gl-block gl-pl-0 hover:gl-no-underline hover:!gl-text-link"
3030
/>
3131
</template>

app/assets/javascripts/sidebar/components/reviewers/reviewer_avatar_link.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default {
5353
:data-username="user.username"
5454
:data-cannot-merge="cannotMerge"
5555
data-placement="left"
56-
class="js-user-link gl-inline-block !gl-text-inherit hover:!gl-text-blue-800"
56+
class="js-user-link gl-inline-block !gl-text-inherit hover:!gl-text-link"
5757
>
5858
<!-- use gl-flex so that slot can be appropriately styled -->
5959
<span class="gl-flex">

app/assets/javascripts/sidebar/components/reviewers/reviewers.vue

+2-3
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,12 @@ export default {
7070
<template v-if="editable">
7171
-
7272
<gl-button
73-
category="tertiary"
73+
class="gl-ml-2 !gl-text-inherit hover:!gl-text-link"
7474
variant="link"
75-
class="gl-ml-2"
7675
data-testid="assign-yourself"
7776
@click="assignSelf"
7877
>
79-
<span class="gl-text-subtle hover:gl-text-blue-800">{{ __('assign yourself') }}</span>
78+
{{ __('assign yourself') }}
8079
</gl-button>
8180
</template>
8281
</span>

app/assets/javascripts/work_items/components/work_item_assignees.vue

+7-4
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,14 @@ export default {
362362
<span>{{ __('None') }}</span>
363363
<template v-if="currentUser && canUpdate">
364364
<span>-</span>
365-
<gl-button variant="link" data-testid="assign-self" @click.stop="assignToCurrentUser"
366-
><span class="gl-text-subtle hover:gl-text-blue-800">{{
367-
__('assign yourself')
368-
}}</span></gl-button
365+
<gl-button
366+
class="!gl-text-inherit hover:!gl-text-link"
367+
variant="link"
368+
data-testid="assign-self"
369+
@click.stop="assignToCurrentUser"
369370
>
371+
{{ __('assign yourself') }}
372+
</gl-button>
370373
</template>
371374
</div>
372375
</template>

app/assets/javascripts/work_items/components/work_item_detail.vue

+50-30
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,39 @@ export default {
516516
isModalOrDrawer() {
517517
return this.isModal || this.isDrawer;
518518
},
519+
workItemActionProps() {
520+
return {
521+
fullPath: this.workItemFullPath,
522+
workItemId: this.workItem.id,
523+
hideSubscribe: this.newTodoAndNotificationsEnabled,
524+
subscribedToNotifications: this.workItemNotificationsSubscribed,
525+
workItemType: this.workItemType,
526+
workItemIid: this.iid,
527+
projectId: this.workItemProjectId,
528+
canDelete: this.canDelete,
529+
canReportSpam: this.canReportSpam,
530+
canUpdate: this.canUpdate,
531+
canUpdateMetadata: this.canUpdateMetadata,
532+
canMove: this.canMove,
533+
isConfidential: this.workItem.confidential,
534+
isDiscussionLocked: this.isDiscussionLocked,
535+
isParentConfidential: this.parentWorkItemConfidentiality,
536+
workItemReference: this.workItem.reference,
537+
workItemWebUrl: this.workItem.webUrl,
538+
workItemCreateNoteEmail: this.workItem.createNoteEmail,
539+
isModal: this.isModalOrDrawer,
540+
workItemState: this.workItem.state,
541+
hasChildren: this.hasChildren,
542+
hasParent: this.shouldShowAncestors,
543+
parentId: this.parentWorkItemId,
544+
workItemAuthorId: this.workItemAuthorId,
545+
canCreateRelatedItem: this.workItemLinkedItems !== undefined,
546+
isGroup: this.isGroupWorkItem,
547+
widgets: this.widgets,
548+
allowedChildTypes: this.allowedChildTypes,
549+
namespaceFullName: this.namespaceFullName,
550+
};
551+
},
519552
},
520553
mounted() {
521554
addShortcutsExtension(ShortcutsWorkItems);
@@ -825,7 +858,22 @@ export default {
825858
@workItemStateUpdated="$emit('workItemStateUpdated')"
826859
@toggleReportAbuseModal="toggleReportAbuseModal"
827860
@todosUpdated="updateWorkItemCurrentTodosWidgetCache"
828-
/>
861+
>
862+
<template #actions>
863+
<work-item-actions
864+
v-if="workItemPresent"
865+
v-bind="workItemActionProps"
866+
@deleteWorkItem="$emit('deleteWorkItem', { workItemType, workItemId: workItem.id })"
867+
@toggleWorkItemConfidentiality="toggleConfidentiality"
868+
@error="updateError = $event"
869+
@promotedToObjective="$emit('promotedToObjective', iid)"
870+
@workItemStateUpdated="$emit('workItemStateUpdated')"
871+
@workItemTypeChanged="workItemTypeChanged"
872+
@toggleReportAbuseModal="toggleReportAbuseModal"
873+
@workItemCreated="handleWorkItemCreated"
874+
/>
875+
</template>
876+
</work-item-sticky-header>
829877
<section class="work-item-view">
830878
<component :is="isModalOrDrawer ? 'h2' : 'h1'" v-if="editMode" class="gl-sr-only">{{
831879
s__('WorkItem|Edit work item')
@@ -906,35 +954,7 @@ export default {
906954
/>
907955
<work-item-actions
908956
v-if="workItemPresent"
909-
:full-path="workItemFullPath"
910-
:work-item-id="workItem.id"
911-
:hide-subscribe="newTodoAndNotificationsEnabled"
912-
:subscribed-to-notifications="workItemNotificationsSubscribed"
913-
:work-item-type="workItemType"
914-
:work-item-iid="iid"
915-
:project-id="workItemProjectId"
916-
:can-delete="canDelete"
917-
:can-report-spam="canReportSpam"
918-
:can-update="canUpdate"
919-
:can-update-metadata="canUpdateMetadata"
920-
:can-move="canMove"
921-
:is-confidential="workItem.confidential"
922-
:is-discussion-locked="isDiscussionLocked"
923-
:is-parent-confidential="parentWorkItemConfidentiality"
924-
:work-item-reference="workItem.reference"
925-
:work-item-web-url="workItem.webUrl"
926-
:work-item-create-note-email="workItem.createNoteEmail"
927-
:is-modal="isModalOrDrawer"
928-
:work-item-state="workItem.state"
929-
:has-children="hasChildren"
930-
:has-parent="shouldShowAncestors"
931-
:parent-id="parentWorkItemId"
932-
:work-item-author-id="workItemAuthorId"
933-
:can-create-related-item="workItemLinkedItems !== undefined"
934-
:is-group="isGroupWorkItem"
935-
:widgets="widgets"
936-
:allowed-child-types="allowedChildTypes"
937-
:namespace-full-name="namespaceFullName"
957+
v-bind="workItemActionProps"
938958
@deleteWorkItem="$emit('deleteWorkItem', { workItemType, workItemId: workItem.id })"
939959
@toggleWorkItemConfidentiality="toggleConfidentiality"
940960
@error="updateError = $event"

app/assets/javascripts/work_items/components/work_item_sticky_header.vue

+1-53
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { WORKSPACE_PROJECT } from '~/issues/constants';
55
import ConfidentialityBadge from '~/vue_shared/components/confidentiality_badge.vue';
66
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
77
import { findNotesWidget } from '../utils';
8-
import WorkItemActions from './work_item_actions.vue';
98
import TodosToggle from './shared/todos_toggle.vue';
109
import WorkItemStateBadge from './work_item_state_badge.vue';
1110
import WorkItemNotificationsWidget from './work_item_notifications_widget.vue';
@@ -15,7 +14,6 @@ export default {
1514
LockedBadge,
1615
GlIntersectionObserver,
1716
GlLoadingIcon,
18-
WorkItemActions,
1917
TodosToggle,
2018
ConfidentialityBadge,
2119
WorkItemStateBadge,
@@ -100,33 +98,18 @@ export default {
10098
canUpdate() {
10199
return this.workItem.userPermissions?.updateWorkItem;
102100
},
103-
canUpdateMetadata() {
104-
return this.workItem.userPermissions?.setWorkItemMetadata;
105-
},
106-
canDelete() {
107-
return this.workItem.userPermissions?.deleteWorkItem;
108-
},
109-
canReportSpam() {
110-
return this.workItem.userPermissions?.reportSpam;
111-
},
112101
isDiscussionLocked() {
113102
return findNotesWidget(this.workItem)?.discussionLocked;
114103
},
115104
workItemType() {
116105
return this.workItem.workItemType?.name;
117106
},
118-
projectFullPath() {
119-
return this.workItem.namespace?.fullPath;
120-
},
121107
workItemState() {
122108
return this.workItem.state;
123109
},
124110
newTodoAndNotificationsEnabled() {
125111
return this.glFeatures.notificationsTodosButtons;
126112
},
127-
widgets() {
128-
return this.workItem.widgets;
129-
},
130113
},
131114
WORKSPACE_PROJECT,
132115
};
@@ -193,42 +176,7 @@ export default {
193176
:can-update="canUpdate"
194177
@error="$emit('error')"
195178
/>
196-
<work-item-actions
197-
:full-path="fullPath"
198-
:work-item-id="workItem.id"
199-
:work-item-iid="workItem.iid"
200-
:hide-subscribe="newTodoAndNotificationsEnabled"
201-
:subscribed-to-notifications="workItemNotificationsSubscribed"
202-
:work-item-type="workItemType"
203-
:can-delete="canDelete"
204-
:can-report-spam="canReportSpam"
205-
:can-update="canUpdate"
206-
:can-update-metadata="canUpdateMetadata"
207-
:is-confidential="workItem.confidential"
208-
:is-discussion-locked="isDiscussionLocked"
209-
:is-parent-confidential="parentWorkItemConfidentiality"
210-
:work-item-reference="workItem.reference"
211-
:work-item-create-note-email="workItem.createNoteEmail"
212-
:work-item-state="workItem.state"
213-
:work-item-web-url="workItem.webUrl"
214-
:is-modal="isModal"
215-
:work-item-author-id="workItemAuthorId"
216-
:is-group="isGroup"
217-
:widgets="widgets"
218-
:allowed-child-types="allowedChildTypes"
219-
:parent-id="parentId"
220-
:namespace-full-name="namespaceFullName"
221-
:has-children="hasChildren"
222-
@deleteWorkItem="$emit('deleteWorkItem')"
223-
@toggleWorkItemConfidentiality="
224-
$emit('toggleWorkItemConfidentiality', !workItem.confidential)
225-
"
226-
@error="$emit('error')"
227-
@promotedToObjective="$emit('promotedToObjective')"
228-
@workItemTypeChanged="$emit('workItemTypeChanged')"
229-
@workItemStateUpdated="$emit('workItemStateUpdated')"
230-
@toggleReportAbuseModal="$emit('toggleReportAbuseModal', true)"
231-
/>
179+
<slot name="actions"></slot>
232180
</div>
233181
</div>
234182
</transition>

app/assets/javascripts/work_items/graphql/list/get_work_item_state_counts.query.graphql

+12
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ query getWorkItemStateCounts(
1818
$in: [IssuableSearchableField!]
1919
$not: NegatedWorkItemFilterInput
2020
$or: UnionedWorkItemFilterInput
21+
$createdAfter: Time
22+
$createdBefore: Time
23+
$closedAfter: Time
24+
$closedBefore: Time
2125
) {
2226
group(fullPath: $fullPath) @include(if: $isGroup) {
2327
id
@@ -39,6 +43,10 @@ query getWorkItemStateCounts(
3943
in: $in
4044
not: $not
4145
or: $or
46+
createdAfter: $createdAfter
47+
createdBefore: $createdBefore
48+
closedAfter: $closedAfter
49+
closedBefore: $closedBefore
4250
) {
4351
all
4452
closed
@@ -63,6 +71,10 @@ query getWorkItemStateCounts(
6371
in: $in
6472
not: $not
6573
or: $or
74+
createdAfter: $createdAfter
75+
createdBefore: $createdBefore
76+
closedAfter: $closedAfter
77+
closedBefore: $closedBefore
6678
) {
6779
all
6880
closed

0 commit comments

Comments
 (0)