Skip to content
代码片段 群组 项目
提交 57da6321 编辑于 作者: Lukas Eipert's avatar Lukas Eipert
浏览文件

Run prettier on 30 files: 7 of 8

Mandatory not to break master. Automatically created with prettier.
上级 1e3190b0
No related branches found
No related tags found
无相关合并请求
显示
93 个添加80 个删除
......@@ -117,7 +117,7 @@ export default {
<div v-else class="text-secondary">{{ anyUserText }}</div>
</div>
<div class="selectbox" style="display: none;">
<div class="selectbox" style="display: none">
<div class="dropdown">
<button
ref="dropdown"
......
import BoardsListSelector from './boards_list_selector/index';
export default function() {
export default function () {
const $addListEl = document.querySelector('#js-add-list');
return new BoardsListSelector({
propsData: {
......
......@@ -143,9 +143,7 @@ export default {
{{ epic.title }}
</h4>
<gl-popover :target="() => $refs.epicTitle" triggers="hover" placement="top">
<template #title
>{{ epic.title }} &middot; {{ epic.reference }}</template
>
<template #title>{{ epic.title }} &middot; {{ epic.reference }}</template>
<div>{{ epicTimeAgoString }}</div>
<div class="gl-mb-2">{{ epicDateString }}</div>
<gl-link :href="epic.webUrl" class="gl-font-sm">{{ __('Go to epic') }}</gl-link>
......
import BoardsListSelector from './boards_list_selector';
export default function() {
export default function () {
const $addListEl = document.querySelector('#js-add-list');
return new BoardsListSelector({
propsData: {
......
......@@ -84,7 +84,7 @@ export default {
</button>
</div>
<div :class="milestoneTitleClass" class="value">{{ milestoneTitle }}</div>
<div class="selectbox" style="display: none;">
<div class="selectbox" style="display: none">
<input :value="milestoneId" name="milestone_id" type="hidden" />
<div class="dropdown">
<button
......
......@@ -113,9 +113,7 @@ export default {
</template>
<!-- column: Job -->
<template #cell(lastDeployment)="data">
{{ __('deploy') }} #{{ data.value.id }}
</template>
<template #cell(lastDeployment)="data"> {{ __('deploy') }} #{{ data.value.id }} </template>
<!-- column: Pods in use -->
<template #head(rolloutStatus)="data">
......
......@@ -45,7 +45,7 @@ export default {
</div>
<gl-table :items="agents" :fields="fields" stacked="md" data-testid="cluster-agent-list-table">
<template #cell(configuration)=" { item }">
<template #cell(configuration)="{ item }">
<!-- eslint-disable @gitlab/vue-require-i18n-strings -->
<gl-link v-if="item.configFolder" :href="item.configFolder.webPath">
.gitlab/agents/{{ item.name }}
......
......@@ -76,9 +76,17 @@ export default {
},
},
})
.then(({ data: { environmentsCanaryIngressUpdate: { errors: [error] } } }) => {
this.error = error;
})
.then(
({
data: {
environmentsCanaryIngressUpdate: {
errors: [error],
},
},
}) => {
this.error = error;
},
)
.catch(() => {
this.error = __('Something went wrong. Please try again later');
});
......
......@@ -6,10 +6,10 @@ import { __ } from '~/locale';
import { loadCSSFile } from '~/lib/utils/css_utils';
export default function initLDAPGroupsSelect() {
const ldapGroupResult = function(group) {
const ldapGroupResult = function (group) {
return group.cn;
};
const groupFormatSelection = function(group) {
const groupFormatSelection = function (group) {
return group.cn;
};
import(/* webpackChunkName: 'select2' */ 'select2/select2')
......
......@@ -9,13 +9,9 @@ export default class MembersEE extends Members {
super.addListeners();
// eslint-disable-next-line @gitlab/no-global-event-off
$('.js-ldap-permissions')
.off('click')
.on('click', this.showLDAPPermissionsWarning.bind(this));
$('.js-ldap-permissions').off('click').on('click', this.showLDAPPermissionsWarning.bind(this));
// eslint-disable-next-line @gitlab/no-global-event-off
$('.js-ldap-override')
.off('click')
.on('click', this.toggleMemberAccessToggle.bind(this));
$('.js-ldap-override').off('click').on('click', this.toggleMemberAccessToggle.bind(this));
}
dropdownClicked(options) {
......
......@@ -187,14 +187,20 @@ export default {
},
},
})
.then(({ data: { dastOnDemandScanCreate: { pipelineUrl, errors } } }) => {
if (errors?.length) {
this.showErrors(ERROR_RUN_SCAN, errors);
this.loading = false;
} else {
redirectTo(pipelineUrl);
}
})
.then(
({
data: {
dastOnDemandScanCreate: { pipelineUrl, errors },
},
}) => {
if (errors?.length) {
this.showErrors(ERROR_RUN_SCAN, errors);
this.loading = false;
} else {
redirectTo(pipelineUrl);
}
},
)
.catch(e => {
Sentry.captureException(e);
this.showErrors(ERROR_RUN_SCAN);
......
......@@ -75,9 +75,7 @@ export default {
filteredTimezones() {
const lowerCaseTzSearchTerm = this.tzSearchTerm.toLowerCase();
return this.timezones.filter(tz =>
this.getFormattedTimezone(tz)
.toLowerCase()
.includes(lowerCaseTzSearchTerm),
this.getFormattedTimezone(tz).toLowerCase().includes(lowerCaseTzSearchTerm),
);
},
noResults() {
......
......@@ -107,24 +107,27 @@ export default {
timezone: this.form.timezone.identifier,
},
},
update(
store,
{
data: { oncallScheduleCreate },
},
) {
update(store, { data: { oncallScheduleCreate } }) {
updateStoreOnScheduleCreate(store, getOncallSchedulesQuery, oncallScheduleCreate, {
projectPath,
});
},
})
.then(({ data: { oncallScheduleCreate: { errors: [error] } } }) => {
if (error) {
throw error;
}
this.$refs.addUpdateScheduleModal.hide();
this.$emit('scheduleCreated');
})
.then(
({
data: {
oncallScheduleCreate: {
errors: [error],
},
},
}) => {
if (error) {
throw error;
}
this.$refs.addUpdateScheduleModal.hide();
this.$emit('scheduleCreated');
},
)
.catch(error => {
this.error = error;
})
......@@ -144,12 +147,20 @@ export default {
updateStoreAfterScheduleEdit(store, getOncallSchedulesQuery, data, { projectPath });
},
})
.then(({ data: { oncallScheduleUpdate: { errors: [error] } } }) => {
if (error) {
throw error;
}
this.$refs.addUpdateScheduleModal.hide();
})
.then(
({
data: {
oncallScheduleUpdate: {
errors: [error],
},
},
}) => {
if (error) {
throw error;
}
this.$refs.addUpdateScheduleModal.hide();
},
)
.catch(error => {
this.error = error;
})
......
......@@ -140,12 +140,20 @@ export default {
},
},
})
.then(({ data: { oncallScheduleRotationCreate: { errors: [error] } } }) => {
if (error) {
throw error;
}
this.$refs.createScheduleModal.hide();
})
.then(
({
data: {
oncallScheduleRotationCreate: {
errors: [error],
},
},
}) => {
if (error) {
throw error;
}
this.$refs.createScheduleModal.hide();
},
)
.catch(error => {
this.error = error;
})
......
......@@ -95,9 +95,7 @@ export default {
this.clearSearchResults();
},
onOk() {
this.addProjectsToDashboard()
.then(this.clearSearchResults)
.catch(this.clearSearchResults);
this.addProjectsToDashboard().then(this.clearSearchResults).catch(this.clearSearchResults);
},
searched(query) {
this.setSearchQuery(query);
......
......@@ -19,9 +19,7 @@ if (selectElement?.dataset) {
selectElement.appendChild(option);
});
$(selectElement)
.val(selectedOption)
.trigger('change.select2');
$(selectElement).val(selectedOption).trigger('change.select2');
})
.catch(() => new Flash(__('Error loading countries data.')));
}
......@@ -29,18 +29,13 @@ const bindEvents = () => {
function hideNonRootParentPathOptions() {
const rootParent = `/${
$namespaceSelect
.find('option:selected')
.data('show-path')
.split('/')[1]
$namespaceSelect.find('option:selected').data('show-path').split('/')[1]
}`;
$namespaceSelect
.find('option')
.filter(function doesNotMatchParent() {
return !$(this)
.data('show-path')
.includes(rootParent);
return !$(this).data('show-path').includes(rootParent);
})
.addClass('hidden');
}
......@@ -100,10 +95,7 @@ const bindEvents = () => {
),
);
$projectFieldsForm
.find('.js-select-namespace')
.first()
.val(groupId);
$projectFieldsForm.find('.js-select-namespace').first().val(groupId);
}
$useCustomTemplateBtn.on('change', chooseTemplate);
......
import $ from 'jquery';
import Tracking from '~/tracking';
export default function(assigneeDropdown) {
export default function (assigneeDropdown) {
const trackEvent = 'show_invite_members';
const trackLabel = 'edit_assignee';
......
......@@ -274,8 +274,8 @@ export default {
<gl-button
:disabled="
requirementRequestActive ||
issuableMeta.issuableTitle.length > $options.maxTitleLength ||
!issuableMeta.issuableTitle.length
issuableMeta.issuableTitle.length > $options.maxTitleLength ||
!issuableMeta.issuableTitle.length
"
:loading="requirementRequestActive"
data-testid="requirement-save"
......
......@@ -123,8 +123,10 @@ export default {
getEmptyRowContainerStyles() {
if (this.$refs.epicItems && this.$refs.epicItems.length) {
return {
height: `${this.$el.clientHeight -
this.displayedEpics.length * this.$refs.epicItems[0].$el.clientHeight}px`,
height: `${
this.$el.clientHeight -
this.displayedEpics.length * this.$refs.epicItems[0].$el.clientHeight
}px`,
};
}
return {};
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册