Skip to content

Commit 3fbd6ba

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent d41edc2 commit 3fbd6ba

File tree

139 files changed

+1972
-1298
lines changed

Some content is hidden

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

139 files changed

+1972
-1298
lines changed

.gitlab/issue_templates/Broken Master - Flaky.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ learn more about how to reproduce them.
2525

2626
Please refer to the [Resolution guidance](https://about.gitlab.com/handbook/engineering/workflow/#resolution-of-broken-master) to learn more about resolution of broken master.
2727

28+
Once the flaky failure has been fixed on the default branch, open merge requests to cherry-pick the fix to the active stable branches.
29+
2830
/label ~"type::maintenance" ~"failure::flaky-test" ~"priority::3" ~"severity::3"

app/assets/javascripts/admin/background_migrations/components/database_listbox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default {
3535
</script>
3636

3737
<template>
38-
<div class="gl-display-flex gl-align-items-center" data-testid="database-listbox">
38+
<div class="gl-display-flex gl-align-items-center">
3939
<label id="label" class="gl-font-weight-bold gl-mr-4 gl-mb-0">{{
4040
$options.i18n.database
4141
}}</label>

app/assets/javascripts/ci/pipeline_new/components/refs_dropdown.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export default {
7272
<template>
7373
<gl-collapsible-listbox
7474
class="gl-w-full gl-font-monospace"
75-
data-testid="ref-select"
7675
:items="listBoxItems"
7776
:searchable="true"
7877
:searching="isLoading"

app/assets/javascripts/flash.js

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { escape } from 'lodash';
32
import Vue from 'vue';
43
import { GlAlert } from '@gitlab/ui';
54
import { __ } from '~/locale';
6-
import { spriteIcon } from './lib/utils/common_utils';
75

86
const FLASH_TYPES = {
97
ALERT: 'alert',
@@ -18,13 +16,6 @@ const VARIANT_DANGER = 'danger';
1816
const VARIANT_INFO = 'info';
1917
const VARIANT_TIP = 'tip';
2018

21-
const TYPE_TO_VARIANT = {
22-
[FLASH_TYPES.ALERT]: VARIANT_DANGER,
23-
[FLASH_TYPES.NOTICE]: VARIANT_INFO,
24-
[FLASH_TYPES.SUCCESS]: VARIANT_SUCCESS,
25-
[FLASH_TYPES.WARNING]: VARIANT_WARNING,
26-
};
27-
2819
const FLASH_CLOSED_EVENT = 'flashClosed';
2920

3021
const getCloseEl = (flashEl) => {
@@ -57,27 +48,6 @@ const hideFlash = (flashEl, fadeTransition = true) => {
5748
if (!fadeTransition) flashEl.dispatchEvent(new Event('transitionend'));
5849
};
5950

60-
const createAction = (config) => `
61-
<a
62-
href="${config.href || '#'}"
63-
class="flash-action"
64-
${config.href ? '' : 'role="button"'}
65-
>
66-
${escape(config.title)}
67-
</a>
68-
`;
69-
70-
const createFlashEl = (message, type) => `
71-
<div class="flash-${type}" data-testid="alert-${TYPE_TO_VARIANT[type]}">
72-
<div class="flash-text">
73-
${escape(message)}
74-
<div class="close-icon-wrapper js-close-icon">
75-
${spriteIcon('close', 'close-icon')}
76-
</div>
77-
</div>
78-
</div>
79-
`;
80-
8151
const addDismissFlashClickListener = (flashEl, fadeTransition) => {
8252
// There are some flash elements which do not have a closeEl.
8353
// https://gitlab.com/gitlab-org/gitlab/blob/763426ef344488972eb63ea5be8744e0f8459e6b/ee/app/views/layouts/header/_read_only_banner.html.haml
@@ -211,73 +181,7 @@ const createAlert = function createAlert({
211181
});
212182
};
213183

214-
/**
215-
* @deprecated use `createAlert` instead
216-
*
217-
* Flash banner supports different types of Flash configurations
218-
* along with ability to provide actionConfig which can be used to show
219-
* additional action or link on banner next to message
220-
*
221-
* @param {object} options - Options to control the flash message
222-
* @param {string} options.message - Flash message text
223-
* @param {'alert'|'notice'|'success'|'warning'} [options.type] - Type of Flash; it defaults to 'alert'
224-
* @param {Element|Document} [options.parent] - Reference to parent element under which Flash needs to appear
225-
* @param {object} [options.actionConfig] - Map of config to show action on banner
226-
* @param {string} [options.actionConfig.href] - URL to which action config should point to (default: '#')
227-
* @param {string} [options.actionConfig.title] - Title of action
228-
* @param {Function} [options.actionConfig.clickHandler] - Method to call when action is clicked on
229-
* @param {boolean} [options.fadeTransition] - Boolean to determine whether to fade the alert out
230-
* @param {boolean} [options.addBodyClass] - Adds `flash-shown` class to the `body` element
231-
* @param {boolean} [options.captureError] - Boolean to determine whether to send error to Sentry
232-
* @param {object} [options.error] - Error to be captured in Sentry
233-
*/
234-
const createFlash = function createFlash({
235-
message,
236-
type = FLASH_TYPES.ALERT,
237-
parent = document,
238-
actionConfig = null,
239-
fadeTransition = true,
240-
addBodyClass = false,
241-
captureError = false,
242-
error = null,
243-
}) {
244-
const flashContainer = parent.querySelector('.flash-container');
245-
246-
if (!flashContainer) return null;
247-
248-
// eslint-disable-next-line no-unsanitized/property
249-
flashContainer.innerHTML = createFlashEl(message, type);
250-
251-
const flashEl = flashContainer.querySelector(`.flash-${type}`);
252-
253-
if (actionConfig) {
254-
// eslint-disable-next-line no-unsanitized/method
255-
flashEl.insertAdjacentHTML('beforeend', createAction(actionConfig));
256-
257-
if (actionConfig.clickHandler) {
258-
flashEl
259-
.querySelector('.flash-action')
260-
.addEventListener('click', (e) => actionConfig.clickHandler(e));
261-
}
262-
}
263-
264-
addDismissFlashClickListener(flashEl, fadeTransition);
265-
266-
flashContainer.classList.add('gl-display-block');
267-
268-
if (addBodyClass) document.body.classList.add('flash-shown');
269-
270-
if (captureError && error) Sentry.captureException(error);
271-
272-
flashContainer.close = () => {
273-
getCloseEl(flashEl).click();
274-
};
275-
276-
return flashContainer;
277-
};
278-
279184
export {
280-
createFlash as default,
281185
hideFlash,
282186
addDismissFlashClickListener,
283187
FLASH_TYPES,

app/assets/javascripts/import_entities/import_projects/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ const apolloProvider = new VueApollo({
5757
defaultClient,
5858
});
5959

60-
export default function mountImportProjectsTable(mountElement) {
60+
export default function mountImportProjectsTable({
61+
mountElement,
62+
Component = ImportProjectsTable,
63+
extraProps = () => ({}),
64+
}) {
6165
if (!mountElement) return undefined;
6266

6367
const store = initStoreFromElement(mountElement);
@@ -68,7 +72,7 @@ export default function mountImportProjectsTable(mountElement) {
6872
store,
6973
apolloProvider,
7074
render(createElement) {
71-
return createElement(ImportProjectsTable, { props });
75+
return createElement(Component, { props: { ...props, ...extraProps(mountElement.dataset) } });
7276
},
7377
});
7478
}

app/assets/javascripts/integrations/edit/components/integration_form.vue

Lines changed: 12 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
2-
import { GlAlert, GlBadge, GlButton, GlForm } from '@gitlab/ui';
2+
import { GlAlert, GlForm } from '@gitlab/ui';
33
import axios from 'axios';
44
import * as Sentry from '@sentry/browser';
55
import { mapState, mapActions, mapGetters } from 'vuex';
@@ -10,8 +10,6 @@ import {
1010
I18N_DEFAULT_ERROR_MESSAGE,
1111
I18N_SUCCESSFUL_CONNECTION_MESSAGE,
1212
INTEGRATION_FORM_TYPE_SLACK,
13-
integrationFormSectionComponents,
14-
billingPlanNames,
1513
} from '~/integrations/constants';
1614
import { refreshCurrentPage } from '~/lib/utils/url_utility';
1715
import csrf from '~/lib/utils/csrf';
@@ -21,6 +19,7 @@ import ActiveCheckbox from './active_checkbox.vue';
2119
import DynamicField from './dynamic_field.vue';
2220
import OverrideDropdown from './override_dropdown.vue';
2321
import TriggerFields from './trigger_fields.vue';
22+
import IntegrationFormSection from './integration_forms/section.vue';
2423
import IntegrationFormActions from './integration_form_actions.vue';
2524
2625
export default {
@@ -31,29 +30,8 @@ export default {
3130
TriggerFields,
3231
DynamicField,
3332
IntegrationFormActions,
34-
IntegrationSectionConfiguration: () =>
35-
import(
36-
/* webpackChunkName: 'integrationSectionConfiguration' */ '~/integrations/edit/components/sections/configuration.vue'
37-
),
38-
IntegrationSectionConnection: () =>
39-
import(
40-
/* webpackChunkName: 'integrationSectionConnection' */ '~/integrations/edit/components/sections/connection.vue'
41-
),
42-
IntegrationSectionJiraIssues: () =>
43-
import(
44-
/* webpackChunkName: 'integrationSectionJiraIssues' */ '~/integrations/edit/components/sections/jira_issues.vue'
45-
),
46-
IntegrationSectionJiraTrigger: () =>
47-
import(
48-
/* webpackChunkName: 'integrationSectionJiraTrigger' */ '~/integrations/edit/components/sections/jira_trigger.vue'
49-
),
50-
IntegrationSectionTrigger: () =>
51-
import(
52-
/* webpackChunkName: 'integrationSectionTrigger' */ '~/integrations/edit/components/sections/trigger.vue'
53-
),
33+
IntegrationFormSection,
5434
GlAlert,
55-
GlBadge,
56-
GlButton,
5735
GlForm,
5836
},
5937
directives: {
@@ -120,9 +98,6 @@ export default {
12098
},
12199
methods: {
122100
...mapActions(['setOverride', 'requestJiraIssueTypes']),
123-
fieldsForSection(section) {
124-
return this.propsSource.fields.filter((field) => field.section === section.type);
125-
},
126101
form() {
127102
return this.$refs.integrationForm.$el;
128103
},
@@ -189,23 +164,21 @@ export default {
189164
this.isResetting = false;
190165
});
191166
},
192-
onRequestJiraIssueTypes() {
193-
this.requestJiraIssueTypes(this.getFormData());
194-
},
195167
getFormData() {
196168
return new FormData(this.form());
197169
},
198170
onToggleIntegrationState(integrationActive) {
199171
this.integrationActive = integrationActive;
200172
},
173+
onRequestJiraIssueTypes() {
174+
this.requestJiraIssueTypes(this.getFormData());
175+
},
201176
},
202177
helpHtmlConfig: {
203178
ADD_TAGS: ['use'], // to support icon SVGs
204179
FORBID_ATTR: [], // This is trusted input so we can override the default config to allow data-* attributes
205180
},
206181
csrf,
207-
integrationFormSectionComponents,
208-
billingPlanNames,
209182
slackUpgradeInfo: {
210183
title: s__(
211184
`SlackIntegration|Update to the latest version of GitLab for Slack to get notifications`,
@@ -280,42 +253,15 @@ export default {
280253
</div>
281254

282255
<template v-if="hasSections">
283-
<div
256+
<integration-form-section
284257
v-for="(section, index) in customState.sections"
285258
:key="section.type"
259+
:section="section"
260+
:is-validated="isValidated"
286261
:class="{ 'gl-border-b gl-pb-3 gl-mb-6': index !== customState.sections.length - 1 }"
287-
data-testid="integration-section"
288-
>
289-
<section class="gl-lg-display-flex">
290-
<div class="gl-flex-basis-third gl-mr-4">
291-
<h4 class="gl-mt-0">
292-
{{ section.title
293-
}}<gl-badge
294-
v-if="section.plan"
295-
:href="propsSource.aboutPricingUrl"
296-
target="_blank"
297-
rel="noopener noreferrer"
298-
variant="tier"
299-
icon="license"
300-
class="gl-ml-3"
301-
>
302-
{{ $options.billingPlanNames[section.plan] }}
303-
</gl-badge>
304-
</h4>
305-
<p v-safe-html="section.description"></p>
306-
</div>
307-
308-
<div class="gl-flex-basis-two-thirds">
309-
<component
310-
:is="$options.integrationFormSectionComponents[section.type]"
311-
:fields="fieldsForSection(section)"
312-
:is-validated="isValidated"
313-
@toggle-integration-active="onToggleIntegrationState"
314-
@request-jira-issue-types="onRequestJiraIssueTypes"
315-
/>
316-
</div>
317-
</section>
318-
</div>
262+
@toggle-integration-active="onToggleIntegrationState"
263+
@request-jira-issue-types="onRequestJiraIssueTypes"
264+
/>
319265
</template>
320266

321267
<section v-if="hasFieldsWithoutSection" class="gl-lg-display-flex gl-justify-content-end">

0 commit comments

Comments
 (0)