Skip to content

Commit 41b9792

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 7507b30 commit 41b9792

File tree

74 files changed

+1699
-708
lines changed

Some content is hidden

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

74 files changed

+1699
-708
lines changed

.gitlab/ci/cng/main.gitlab-ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ include:
1919
stage: prepare
2020
needs:
2121
# We need this job because we need its `cached-assets-hash.txt` artifact, so that we can pass the assets image tag to the downstream CNG pipeline.
22+
# TODO: refactor to pass assets hash as environment variable to not download all of the actual assets needlessly
2223
- pipeline: $PARENT_PIPELINE_ID
2324
job: compile-production-assets
2425
variables:

.gitlab/ci/test-on-cng/main.gitlab-ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,16 @@ workflow:
9292
build-cng-env:
9393
stage: .pre
9494
extends: .build-cng-env
95+
needs:
96+
- pipeline: $PARENT_PIPELINE_ID
97+
job: clone-gitlab-repo
98+
- pipeline: $PARENT_PIPELINE_ID
99+
job: compile-production-assets
95100
variables:
96101
CNG_COMMIT_SHA: $GITLAB_CNG_MIRROR_REF
97102
CNG_ACCESS_TOKEN: $CNG_MIRROR_ACCESS_TOKEN
98103
CNG_SKIP_REDUNDANT_JOBS: "false"
104+
GIT_STRATEGY: none
99105

100106
build-cng:
101107
stage: .pre

app/assets/javascripts/admin/users/components/user_type/user_type_selector.vue

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script>
2-
import { GlFormRadioGroup, GlFormRadio } from '@gitlab/ui';
2+
import { GlFormRadioGroup, GlFormRadio, GlCard } from '@gitlab/ui';
3+
import AdminRoleDropdown from 'ee_component/admin/users/components/user_type/admin_role_dropdown.vue';
34
import { s__ } from '~/locale';
45
56
export const USER_TYPE_REGULAR = {
@@ -17,10 +18,10 @@ export const USER_TYPE_AUDITOR = {
1718
// description is set dynamically based on isCurrentUser prop.
1819
export const USER_TYPE_ADMIN = { value: 'admin', text: s__('AdminUsers|Administrator') };
1920
20-
// This component is rendered inside a HTML form, so it doesn't submit any data directly. It only sets up the input
21+
// This component is rendered inside an HTML form, so it doesn't submit any data directly. It only sets up the input
2122
// values so that when the form is submitted, the values selected in this component are submitted as well.
2223
export default {
23-
components: { GlFormRadioGroup, GlFormRadio },
24+
components: { GlFormRadioGroup, GlFormRadio, GlCard, AdminRoleDropdown },
2425
props: {
2526
userType: {
2627
type: String,
@@ -34,6 +35,11 @@ export default {
3435
type: Boolean,
3536
required: true,
3637
},
38+
adminRoleId: {
39+
type: Number,
40+
required: false,
41+
default: undefined,
42+
},
3743
},
3844
data() {
3945
return {
@@ -81,5 +87,9 @@ export default {
8187
<template #help>{{ item.description }}</template>
8288
</gl-form-radio>
8389
</gl-form-radio-group>
90+
91+
<gl-card class="gl-mb-7 gl-bg-transparent">
92+
<admin-role-dropdown :role-id="adminRoleId" />
93+
</gl-card>
8494
</div>
8595
</template>

app/assets/javascripts/admin/users/user_type_selector.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@ export const initUserTypeSelector = () => {
1414
const el = document.getElementById('js-user-type');
1515
if (!el) return null;
1616

17-
const { userType, isCurrentUser, licenseAllowsAuditorUser } = el.dataset;
17+
const { userType, isCurrentUser, licenseAllowsAuditorUser, adminRoleId, manageRolesPath } =
18+
el.dataset;
1819

1920
return new Vue({
2021
el,
2122
name: 'UserTypeSelectorRoot',
2223
apolloProvider,
24+
provide: { manageRolesPath },
2325
render(createElement) {
2426
return createElement(UserTypeSelector, {
2527
props: {
2628
userType,
2729
isCurrentUser: parseBoolean(isCurrentUser),
2830
licenseAllowsAuditorUser: parseBoolean(licenseAllowsAuditorUser),
31+
adminRoleId: Number(adminRoleId) || undefined,
2932
},
3033
});
3134
},

app/assets/javascripts/ci/runner/components/runner_bulk_delete.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default {
176176
</template>
177177
</gl-sprintf>
178178
</div>
179-
<div class="gl-ml-auto">
179+
<div class="gl-ml-auto gl-flex gl-gap-3">
180180
<gl-button data-testid="clear-selection" variant="default" @click="onClearChecked">{{
181181
s__('Runners|Clear selection')
182182
}}</gl-button>

app/assets/javascripts/projects/default_project_templates.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ export default {
3333
text: s__('ProjectTemplates|Go Micro'),
3434
icon: '.template-option .icon-gomicro',
3535
},
36+
astro: {
37+
text: s__('ProjectTemplates|Pages/Astro'),
38+
icon: '.template-option .icon-astro',
39+
},
3640
gatsby: {
3741
text: s__('ProjectTemplates|Pages/Gatsby'),
3842
icon: '.template-option .icon-gatsby',
@@ -125,10 +129,6 @@ export default {
125129
text: s__('ProjectTemplates|Laravel Framework'),
126130
icon: '.template-option .icon-laravel',
127131
},
128-
astro_tailwind: {
129-
text: s__('ProjectTemplates|Astro Tailwind'),
130-
icon: '.template-option .icon-gitlab_logo',
131-
},
132132
nist_80053r5: {
133133
text: s__('ProjectTemplates|NIST 800-53r5'),
134134
icon: '.template-option .icon-gitlab_logo',

app/assets/javascripts/sidebar/components/labels/labels_select_widget/graphql/group_labels.query.graphql

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
query groupLabels($fullPath: ID!, $searchTerm: String) {
44
workspace: group(fullPath: $fullPath) {
55
id
6-
labels(searchTerm: $searchTerm, onlyGroupLabels: true, includeAncestorGroups: true) {
6+
labels(
7+
searchIn: TITLE
8+
searchTerm: $searchTerm
9+
onlyGroupLabels: true
10+
includeAncestorGroups: true
11+
) {
712
nodes {
813
...Label
914
}

app/assets/javascripts/sidebar/components/labels/labels_select_widget/graphql/project_labels.query.graphql

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
query projectLabels($fullPath: ID!, $searchTerm: String) {
44
workspace: project(fullPath: $fullPath) {
55
id
6-
labels(searchTerm: $searchTerm, includeAncestorGroups: true) {
6+
labels(searchIn: TITLE, searchTerm: $searchTerm, includeAncestorGroups: true) {
77
nodes {
88
...Label
99
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import FileRow from './file_row.vue';
2+
3+
export default {
4+
component: FileRow,
5+
title: 'vue_shared/file_row',
6+
};
7+
8+
const defaultFile = {
9+
name: 'environment.log',
10+
type: 'blob',
11+
};
12+
13+
const defaultArgs = {
14+
file: {
15+
...defaultFile,
16+
},
17+
fileUrl: 'https://project.com/files/file.log',
18+
level: 1,
19+
};
20+
21+
const Template = (args, { argTypes }) => ({
22+
components: { FileRow },
23+
props: Object.keys(argTypes),
24+
template: `<file-row v-bind="$props" />`,
25+
});
26+
27+
export const Blob = Template.bind({});
28+
Blob.args = {
29+
...defaultArgs,
30+
};
31+
32+
export const Loading = Template.bind({});
33+
Loading.args = {
34+
...defaultArgs,
35+
file: {
36+
...defaultFile,
37+
loading: true,
38+
},
39+
};
40+
41+
export const Tree = Template.bind({});
42+
Tree.args = {
43+
...defaultArgs,
44+
file: {
45+
name: 'files',
46+
type: 'tree',
47+
},
48+
};
49+
50+
export const OpenFolder = Template.bind({});
51+
OpenFolder.args = {
52+
...defaultArgs,
53+
file: {
54+
name: 'files',
55+
type: 'tree',
56+
opened: true,
57+
active: true,
58+
},
59+
};

app/assets/javascripts/vue_shared/components/input_copy_toggle_visibility/input_copy_toggle_visibility.vue

+20-15
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
GlFormInputGroup,
44
GlFormInput,
55
GlFormGroup,
6+
GlButtonGroup,
67
GlButton,
78
GlTooltipDirective,
89
} from '@gitlab/ui';
@@ -21,6 +22,7 @@ export default {
2122
GlFormInputGroup,
2223
GlFormInput,
2324
GlFormGroup,
25+
GlButtonGroup,
2426
GlButton,
2527
ClipboardButton,
2628
},
@@ -171,6 +173,7 @@ export default {
171173
:class="formInputClass"
172174
v-bind="formInputGroupProps"
173175
:value="value"
176+
class="!gl-border !gl-border-r-section"
174177
@input="handleInput"
175178
@click="handleClick"
176179
/>
@@ -180,21 +183,23 @@ export default {
180183
See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88059#note_969812649
181184
-->
182185
<template v-if="showToggleVisibilityButton || showCopyButton" #append>
183-
<gl-button
184-
v-if="showToggleVisibilityButton"
185-
v-gl-tooltip.hover="toggleVisibilityLabel"
186-
:aria-label="toggleVisibilityLabel"
187-
:icon="toggleVisibilityIcon"
188-
data-testid="toggle-visibility-button"
189-
@click.stop="handleToggleVisibilityButtonClick"
190-
/>
191-
<clipboard-button
192-
v-if="showCopyButton"
193-
:text="value"
194-
:title="copyButtonTitle"
195-
data-testid="clipboard-button"
196-
@click="handleCopyButtonClick"
197-
/>
186+
<gl-button-group>
187+
<gl-button
188+
v-if="showToggleVisibilityButton"
189+
v-gl-tooltip.hover="toggleVisibilityLabel"
190+
:aria-label="toggleVisibilityLabel"
191+
:icon="toggleVisibilityIcon"
192+
data-testid="toggle-visibility-button"
193+
@click.stop="handleToggleVisibilityButtonClick"
194+
/>
195+
<clipboard-button
196+
v-if="showCopyButton"
197+
:text="value"
198+
:title="copyButtonTitle"
199+
data-testid="clipboard-button"
200+
@click="handleCopyButtonClick"
201+
/>
202+
</gl-button-group>
198203
</template>
199204
</gl-form-input-group>
200205
<!-- eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots -->

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

+7-13
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ import {
5454
WIDGET_TYPE_HIERARCHY,
5555
WORK_ITEM_TYPE_NAME_LOWERCASE_MAP,
5656
WORK_ITEM_TYPE_NAME_MAP,
57-
NAME_TO_ENUM_MAP,
5857
WORK_ITEM_TYPE_NAME_INCIDENT,
5958
WORK_ITEM_TYPE_NAME_EPIC,
6059
WIDGET_TYPE_CUSTOM_FIELDS,
@@ -159,7 +158,7 @@ export default {
159158
required: false,
160159
default: '',
161160
},
162-
workItemTypeName: {
161+
preselectedWorkItemType: {
163162
type: String,
164163
required: false,
165164
default: null,
@@ -288,7 +287,7 @@ export default {
288287
}
289288
290289
const selectedWorkItemType = this.workItemTypes?.find(
291-
(workItemType) => NAME_TO_ENUM_MAP[workItemType.name] === this.workItemTypeName,
290+
(workItemType) => workItemType.name === this.preselectedWorkItemType,
292291
);
293292
294293
if (selectedWorkItemType) {
@@ -395,12 +394,9 @@ export default {
395394
selectedWorkItemTypeIconName() {
396395
return this.selectedWorkItemType?.iconName;
397396
},
398-
selectedWorkItemTypeEnum() {
399-
return NAME_TO_ENUM_MAP[this.selectedWorkItemTypeName];
400-
},
401397
formOptions() {
402398
const options = [...this.workItemTypesForSelect];
403-
if (!this.workItemTypeName) {
399+
if (!this.preselectedWorkItemType) {
404400
options.unshift({ value: null, text: s__('WorkItem|Select type') });
405401
}
406402
return options;
@@ -625,7 +621,7 @@ export default {
625621
variables: {
626622
input: {
627623
fullPath: this.fullPath,
628-
workItemType: this.selectedWorkItemTypeName || this.workItemTypeName,
624+
workItemType: this.selectedWorkItemTypeName,
629625
[type]: value,
630626
},
631627
},
@@ -809,8 +805,7 @@ export default {
809805
numberOfDiscussionsResolved: this.numberOfDiscussionsResolved,
810806
});
811807
812-
const workItemTypeName = this.selectedWorkItemTypeName || this.workItemTypeName;
813-
const autosaveKey = getNewWorkItemAutoSaveKey(this.fullPath, workItemTypeName);
808+
const autosaveKey = getNewWorkItemAutoSaveKey(this.fullPath, this.selectedWorkItemTypeName);
814809
clearDraft(autosaveKey);
815810
} catch {
816811
this.error = this.createErrorText;
@@ -830,8 +825,7 @@ export default {
830825
}
831826
},
832827
handleDiscardDraft() {
833-
const workItemTypeName = this.selectedWorkItemTypeName || this.workItemTypeName;
834-
const autosaveKey = getNewWorkItemAutoSaveKey(this.fullPath, workItemTypeName);
828+
const autosaveKey = getNewWorkItemAutoSaveKey(this.fullPath, this.selectedWorkItemTypeName);
835829
clearDraft(autosaveKey);
836830
837831
const selectedWorkItemWidgets = this.selectedWorkItemType?.widgetDefinitions || [];
@@ -884,7 +878,7 @@ export default {
884878
v-model="selectedWorkItemTypeId"
885879
data-testid="work-item-types-select"
886880
:options="formOptions"
887-
@change="$emit('changeType', selectedWorkItemTypeEnum)"
881+
@change="$emit('changeType', selectedWorkItemTypeName)"
888882
/>
889883
</gl-form-group>
890884
</div>

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

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script>
22
import { GlButton, GlModal } from '@gitlab/ui';
33
import { s__, sprintf } from '~/locale';
4+
import { WORK_ITEM_TYPE_NAME_LOWERCASE_MAP } from '../constants';
45
56
export default {
67
components: {
@@ -11,21 +12,17 @@ export default {
1112
isVisible: {
1213
type: Boolean,
1314
required: true,
14-
default: false,
1515
},
16-
workItemTypeName: {
16+
workItemType: {
1717
type: String,
1818
required: true,
19-
default: s__('Work Item|Epic'),
2019
},
2120
},
2221
computed: {
2322
cancelConfirmationText() {
2423
return sprintf(
2524
s__('WorkItem|Are you sure you want to cancel creating this %{workItemType}?'),
26-
{
27-
workItemType: this.workItemTypeName?.toLocaleLowerCase(),
28-
},
25+
{ workItemType: WORK_ITEM_TYPE_NAME_LOWERCASE_MAP[this.workItemType] },
2926
);
3027
},
3128
},

0 commit comments

Comments
 (0)