Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
3e764061b3
commit
3828d19ab2
|
|
@ -1396,7 +1396,6 @@ ee/lib/ee/api/entities/project.rb @gitlab-org/manage/manage-workspace/backend-ap
|
|||
/ee/config/events/202108302307_profiles_controller_search_audit_event.yml @gitlab-org/govern/compliance
|
||||
/ee/config/events/202108302307_projects__audit_events_controller_search_audit_event.yml @gitlab-org/govern/compliance
|
||||
/ee/config/events/202111041910_admin__audit_logs_controller_search_audit_event.yml @gitlab-org/govern/compliance
|
||||
/ee/config/feature_flags/development/audit_log_group_level.yml @gitlab-org/govern/compliance
|
||||
/ee/config/metrics/counts_28d/20210216183930_g_compliance_audit_events_monthly.yml @gitlab-org/govern/compliance
|
||||
/ee/config/metrics/counts_28d/20210216183934_i_compliance_audit_events_monthly.yml @gitlab-org/govern/compliance
|
||||
/ee/config/metrics/counts_28d/20210216183942_a_compliance_audit_events_api_monthly.yml @gitlab-org/govern/compliance
|
||||
|
|
|
|||
2
Gemfile
2
Gemfile
|
|
@ -485,7 +485,7 @@ gem 'gitlab-mail_room', '~> 0.0.9', require: 'mail_room'
|
|||
gem 'email_reply_trimmer', '~> 0.1'
|
||||
gem 'html2text'
|
||||
|
||||
gem 'stackprof', '~> 0.2.21', require: false
|
||||
gem 'stackprof', '~> 0.2.23', require: false
|
||||
gem 'rbtrace', '~> 0.4', require: false
|
||||
gem 'memory_profiler', '~> 1.0', require: false
|
||||
gem 'activerecord-explain-analyze', '~> 0.1', require: false
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@
|
|||
{"name":"sqlite3","version":"1.6.0","platform":"x86_64-linux","checksum":"a2488dcf0e72928bab2b15b934113ce8d7a3b4031277e362d66e40956d5c709e"},
|
||||
{"name":"ssh_data","version":"1.3.0","platform":"ruby","checksum":"ec7c1e95a3aebeee412147998f4c147b4b05da6ed0aafda6083f9449318eaac0"},
|
||||
{"name":"ssrf_filter","version":"1.0.8","platform":"ruby","checksum":"03f49f54837e407d43ee93ec733a8a94dc1bcf8185647ac61606e63aaedaa0db"},
|
||||
{"name":"stackprof","version":"0.2.21","platform":"ruby","checksum":"2b6406c55dc2e134b2789c4cc631d96e67da87821a166f4ae12f15bec5cff5ae"},
|
||||
{"name":"stackprof","version":"0.2.23","platform":"ruby","checksum":"5c930b229c27bc64a2a0eb5e7203d76756ba0567bad7bf5290921ee1ed50230b"},
|
||||
{"name":"state_machines","version":"0.5.0","platform":"ruby","checksum":"23e6249d374a920b528dccade403518b4abbd83841a3e2c9ef13e6f1a009b102"},
|
||||
{"name":"state_machines-activemodel","version":"0.8.0","platform":"ruby","checksum":"e932dab190d4be044fb5f9cab01a3ea0b092c5f113d4676c6c0a0d49bf738d2c"},
|
||||
{"name":"state_machines-activerecord","version":"0.8.0","platform":"ruby","checksum":"072fb701b8ab03de0608297f6c55dc34ed096e556fa8f77e556f3c461c71aab6"},
|
||||
|
|
|
|||
|
|
@ -1453,7 +1453,7 @@ GEM
|
|||
mini_portile2 (~> 2.8.0)
|
||||
ssh_data (1.3.0)
|
||||
ssrf_filter (1.0.8)
|
||||
stackprof (0.2.21)
|
||||
stackprof (0.2.23)
|
||||
state_machines (0.5.0)
|
||||
state_machines-activemodel (0.8.0)
|
||||
activemodel (>= 5.1)
|
||||
|
|
@ -1897,7 +1897,7 @@ DEPENDENCIES
|
|||
sprite-factory (~> 1.7)
|
||||
sprockets (~> 3.7.0)
|
||||
ssh_data (~> 1.3)
|
||||
stackprof (~> 0.2.21)
|
||||
stackprof (~> 0.2.23)
|
||||
state_machines-activerecord (~> 0.8.0)
|
||||
sys-filesystem (~> 1.4.3)
|
||||
tanuki_emoji (~> 0.6)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export default {
|
|||
},
|
||||
actionPrimary: {
|
||||
text: I18N_USER_ACTIONS.activate,
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
messageHtml,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default {
|
|||
},
|
||||
actionPrimary: {
|
||||
text: I18N_USER_ACTIONS.approve,
|
||||
attributes: [{ variant: 'confirm', 'data-qa-selector': 'approve_user_confirm_button' }],
|
||||
attributes: { variant: 'confirm', 'data-qa-selector': 'approve_user_confirm_button' },
|
||||
},
|
||||
messageHtml,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export default {
|
|||
},
|
||||
actionPrimary: {
|
||||
text: I18N_USER_ACTIONS.ban,
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
messageHtml,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default {
|
|||
},
|
||||
actionPrimary: {
|
||||
text: I18N_USER_ACTIONS.block,
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
messageHtml,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export default {
|
|||
},
|
||||
actionPrimary: {
|
||||
text: I18N_USER_ACTIONS.deactivate,
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
messageHtml,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export default {
|
|||
},
|
||||
actionPrimary: {
|
||||
text: I18N_USER_ACTIONS.reject,
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
},
|
||||
messageHtml,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export default {
|
|||
},
|
||||
actionPrimary: {
|
||||
text: I18N_USER_ACTIONS.unban,
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
messageHtml,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export default {
|
|||
},
|
||||
actionPrimary: {
|
||||
text: I18N_USER_ACTIONS.unblock,
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default {
|
|||
},
|
||||
actionPrimary: {
|
||||
text: I18N_USER_ACTIONS.unlock,
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: __('Delete badge'),
|
||||
attributes: [{ category: 'primary' }, { variant: 'danger' }],
|
||||
attributes: { category: 'primary', variant: 'danger' },
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -128,14 +128,12 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: this.buttonText,
|
||||
attributes: [
|
||||
{
|
||||
variant: this.buttonKind,
|
||||
disabled: this.submitDisabled,
|
||||
loading: this.isLoading,
|
||||
'data-qa-selector': 'save_changes_button',
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
variant: this.buttonKind,
|
||||
disabled: this.submitDisabled,
|
||||
loading: this.isLoading,
|
||||
'data-qa-selector': 'save_changes_button',
|
||||
},
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -136,11 +136,11 @@ export default {
|
|||
size="sm"
|
||||
:action-primary="/* eslint-disable @gitlab/vue-no-new-non-primitive-in-template */ {
|
||||
text: $options.i18n.modalAction,
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
} /* eslint-enable @gitlab/vue-no-new-non-primitive-in-template */"
|
||||
:action-secondary="/* eslint-disable @gitlab/vue-no-new-non-primitive-in-template */ {
|
||||
text: $options.i18n.modalCancel,
|
||||
attributes: [{ variant: 'default' }],
|
||||
attributes: { variant: 'default' },
|
||||
} /* eslint-enable @gitlab/vue-no-new-non-primitive-in-template */"
|
||||
@primary="handleModalPrimary"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ export default {
|
|||
),
|
||||
actionPrimary: {
|
||||
text: s__('PipelineSchedules|Delete pipeline schedule'),
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
},
|
||||
actionCancel: {
|
||||
text: __('Cancel'),
|
||||
attributes: [],
|
||||
attributes: {},
|
||||
},
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -27,12 +27,10 @@ export default {
|
|||
actionPrimary() {
|
||||
return {
|
||||
text: this.$options.i18n.takeOwnership,
|
||||
attributes: [
|
||||
{
|
||||
variant: 'confirm',
|
||||
category: 'primary',
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
variant: 'confirm',
|
||||
category: 'primary',
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -27,14 +27,12 @@ export default {
|
|||
actionPrimary() {
|
||||
return {
|
||||
text: this.$options.i18n.takeOwnership,
|
||||
attributes: [
|
||||
{
|
||||
variant: 'confirm',
|
||||
category: 'primary',
|
||||
href: this.ownershipUrl,
|
||||
'data-method': 'post',
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
variant: 'confirm',
|
||||
category: 'primary',
|
||||
href: this.ownershipUrl,
|
||||
'data-method': 'post',
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -73,13 +73,13 @@ export default {
|
|||
actionPrimary() {
|
||||
return {
|
||||
text: i18n.modalAction,
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
};
|
||||
},
|
||||
actionSecondary() {
|
||||
return {
|
||||
text: i18n.modalCancel,
|
||||
attributes: [{ variant: 'default' }],
|
||||
attributes: { variant: 'default' },
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -78,16 +78,17 @@ export default {
|
|||
primaryModalProps() {
|
||||
return {
|
||||
text: this.$options.i18n.revokeButton,
|
||||
attributes: [
|
||||
{ disabled: this.loading || this.disableModalSubmit, loading: this.loading },
|
||||
{ variant: 'danger' },
|
||||
],
|
||||
attributes: {
|
||||
disabled: this.loading || this.disableModalSubmit,
|
||||
loading: this.loading,
|
||||
variant: 'danger',
|
||||
},
|
||||
};
|
||||
},
|
||||
cancelModalProps() {
|
||||
return {
|
||||
text: this.$options.i18n.modalCancel,
|
||||
attributes: [],
|
||||
attributes: {},
|
||||
};
|
||||
},
|
||||
disableModalSubmit() {
|
||||
|
|
|
|||
|
|
@ -77,16 +77,17 @@ export default {
|
|||
primaryModalProps() {
|
||||
return {
|
||||
text: this.$options.i18n.modalAction,
|
||||
attributes: [
|
||||
{ disabled: this.loading || this.disableModalSubmit, loading: this.loading },
|
||||
{ variant: 'danger' },
|
||||
],
|
||||
attributes: {
|
||||
disabled: this.loading || this.disableModalSubmit,
|
||||
loading: this.loading,
|
||||
variant: 'danger',
|
||||
},
|
||||
};
|
||||
},
|
||||
cancelModalProps() {
|
||||
return {
|
||||
text: this.$options.i18n.modalCancel,
|
||||
attributes: [],
|
||||
attributes: {},
|
||||
};
|
||||
},
|
||||
disableModalSubmit() {
|
||||
|
|
|
|||
|
|
@ -48,15 +48,13 @@ export default {
|
|||
addDeployFreezeButton() {
|
||||
return {
|
||||
text: this.isEditing ? __('Save deploy freeze') : __('Add deploy freeze'),
|
||||
attributes: [
|
||||
{ variant: 'confirm' },
|
||||
{
|
||||
disabled:
|
||||
!isValidCron(this.freezeStartCron) ||
|
||||
!isValidCron(this.freezeEndCron) ||
|
||||
!this.selectedTimezone,
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
variant: 'confirm',
|
||||
disabled:
|
||||
!isValidCron(this.freezeStartCron) ||
|
||||
!isValidCron(this.freezeEndCron) ||
|
||||
!this.selectedTimezone,
|
||||
},
|
||||
};
|
||||
},
|
||||
invalidFreezeStartCron() {
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ export default {
|
|||
title: __('Do you want to remove this deploy key?'),
|
||||
actionPrimary: {
|
||||
text: __('Remove deploy key'),
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
},
|
||||
actionSecondary: {
|
||||
text: __('Cancel'),
|
||||
attributes: [{ category: 'tertiary' }],
|
||||
attributes: { category: 'tertiary' },
|
||||
},
|
||||
static: true,
|
||||
modalId: 'confirm-remove-deploy-key',
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default {
|
|||
modalId: CANARY_UPDATE_MODAL,
|
||||
actionPrimary: {
|
||||
text: s__('CanaryIngress|Change ratio'),
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
actionCancel: { text: __('Cancel') },
|
||||
static: true,
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ export default {
|
|||
csrf,
|
||||
cancelProps: {
|
||||
text: __('Cancel'),
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
},
|
||||
docsPath: helpPagePath('ci/environments/index.md', { anchor: 'retry-or-roll-back-a-deployment' }),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: s__('Environments|Delete environment'),
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: s__('Environments|Stop environment'),
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -84,11 +84,9 @@ export default {
|
|||
cancelActionProps() {
|
||||
return {
|
||||
text: this.$options.translations.cancelActionLabel,
|
||||
attributes: [
|
||||
{
|
||||
category: 'secondary',
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
category: 'secondary',
|
||||
},
|
||||
};
|
||||
},
|
||||
canRegenerateInstanceId() {
|
||||
|
|
@ -98,14 +96,12 @@ export default {
|
|||
return this.canUserRotateToken
|
||||
? {
|
||||
text: this.$options.translations.instanceIdRegenerateActionLabel,
|
||||
attributes: [
|
||||
{
|
||||
category: 'secondary',
|
||||
disabled: !this.canRegenerateInstanceId,
|
||||
loading: this.isRotating,
|
||||
variant: 'danger',
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
category: 'secondary',
|
||||
disabled: !this.canRegenerateInstanceId,
|
||||
loading: this.isRotating,
|
||||
variant: 'danger',
|
||||
},
|
||||
}
|
||||
: null;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: __('Leave group'),
|
||||
attributes: [{ variant: 'danger' }, { category: 'primary' }],
|
||||
attributes: { variant: 'danger', category: 'primary' },
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -50,13 +50,13 @@ export default {
|
|||
actionPrimary() {
|
||||
return {
|
||||
text: this.buttonLabel,
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
};
|
||||
},
|
||||
actionCancel() {
|
||||
return {
|
||||
text: i18n.cancelButtonText,
|
||||
attributes: [{ variant: 'default' }],
|
||||
attributes: { variant: 'default' },
|
||||
};
|
||||
},
|
||||
isCreatingNewFile() {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: __('Save'),
|
||||
attributes: [{ variant: 'confirm' }, { category: 'primary' }],
|
||||
attributes: { variant: 'confirm', category: 'primary' },
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default {
|
|||
},
|
||||
primaryProps: {
|
||||
text: __('Reset'),
|
||||
attributes: [{ variant: 'danger' }, { category: 'primary' }],
|
||||
attributes: { variant: 'danger', category: 'primary' },
|
||||
},
|
||||
cancelProps: {
|
||||
text: __('Cancel'),
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
<script>
|
||||
import { GlButton, GlLink, GlIcon, GlDropdownItem } from '@gitlab/ui';
|
||||
import { GlButton, GlLink, GlDropdownItem } from '@gitlab/ui';
|
||||
import { s__ } from '~/locale';
|
||||
import eventHub from '../event_hub';
|
||||
import {
|
||||
TRIGGER_ELEMENT_BUTTON,
|
||||
TRIGGER_ELEMENT_SIDE_NAV,
|
||||
TRIGGER_DEFAULT_QA_SELECTOR,
|
||||
TRIGGER_ELEMENT_WITH_EMOJI,
|
||||
TRIGGER_ELEMENT_DROPDOWN_WITH_EMOJI,
|
||||
} from '../constants';
|
||||
|
||||
export default {
|
||||
components: { GlButton, GlLink, GlIcon, GlDropdownItem },
|
||||
components: { GlButton, GlLink, GlDropdownItem },
|
||||
props: {
|
||||
displayText: {
|
||||
type: String,
|
||||
|
|
@ -66,7 +65,6 @@ export default {
|
|||
},
|
||||
},
|
||||
TRIGGER_ELEMENT_BUTTON,
|
||||
TRIGGER_ELEMENT_SIDE_NAV,
|
||||
TRIGGER_ELEMENT_WITH_EMOJI,
|
||||
TRIGGER_ELEMENT_DROPDOWN_WITH_EMOJI,
|
||||
};
|
||||
|
|
@ -82,17 +80,6 @@ export default {
|
|||
>
|
||||
{{ displayText }}
|
||||
</gl-button>
|
||||
<gl-link
|
||||
v-else-if="checkTrigger($options.TRIGGER_ELEMENT_SIDE_NAV)"
|
||||
v-bind="componentAttributes"
|
||||
data-is-link="true"
|
||||
@click="openModal"
|
||||
>
|
||||
<span class="nav-icon-container">
|
||||
<gl-icon :name="icon" />
|
||||
</span>
|
||||
<span class="nav-item-name"> {{ displayText }} </span>
|
||||
</gl-link>
|
||||
<gl-link
|
||||
v-else-if="checkTrigger($options.TRIGGER_ELEMENT_WITH_EMOJI)"
|
||||
v-bind="componentAttributes"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ export const GROUP_FILTERS = {
|
|||
export const USERS_FILTER_ALL = 'all';
|
||||
export const USERS_FILTER_SAML_PROVIDER_ID = 'saml_provider_id';
|
||||
export const TRIGGER_ELEMENT_BUTTON = 'button';
|
||||
export const TRIGGER_ELEMENT_SIDE_NAV = 'side-nav';
|
||||
export const TOP_NAV_INVITE_MEMBERS_COMPONENT = 'invite_members';
|
||||
export const TRIGGER_ELEMENT_WITH_EMOJI = 'text-emoji';
|
||||
export const TRIGGER_ELEMENT_DROPDOWN_WITH_EMOJI = 'dropdown-text-emoji';
|
||||
|
|
|
|||
|
|
@ -101,26 +101,22 @@ export default {
|
|||
:class="{
|
||||
'issuable-info-container': !canReorder,
|
||||
'card-body': canReorder,
|
||||
'gl-pr-2': canRemove,
|
||||
}"
|
||||
class="item-body d-flex align-items-center gl-py-3 gl-px-5"
|
||||
class="item-body gl-display-flex gl-align-items-center gl-gap-3 gl-px-3 gl-py-2 py-xl-0 gl-mx-n2"
|
||||
>
|
||||
<div
|
||||
class="item-contents gl-display-flex gl-align-items-center gl-flex-wrap gl-flex-grow-1 flex-xl-nowrap gl-min-h-7"
|
||||
class="item-contents gl-display-flex gl-align-items-center gl-flex-wrap gl-flex-grow-1 gl-gap-2 flex-xl-nowrap gl-min-h-7"
|
||||
>
|
||||
<!-- Title area: Status icon (XL) and title -->
|
||||
<div class="item-title d-flex align-items-xl-center mb-xl-0 gl-min-w-0">
|
||||
<div ref="iconElementXL">
|
||||
<gl-icon
|
||||
v-if="hasState"
|
||||
ref="iconElementXL"
|
||||
class="gl-mr-3"
|
||||
:class="iconClasses"
|
||||
:name="iconName"
|
||||
:title="stateTitle"
|
||||
:aria-label="state"
|
||||
/>
|
||||
</div>
|
||||
<div class="item-title gl-display-flex gl-gap-3 gl-min-w-0">
|
||||
<gl-icon
|
||||
v-if="hasState"
|
||||
ref="iconElementXL"
|
||||
:class="iconClasses"
|
||||
:name="iconName"
|
||||
:title="stateTitle"
|
||||
:aria-label="state"
|
||||
/>
|
||||
<gl-tooltip :target="() => $refs.iconElementXL">
|
||||
<span v-safe-html="stateTitle"></span>
|
||||
</gl-tooltip>
|
||||
|
|
@ -129,42 +125,46 @@ export default {
|
|||
v-gl-tooltip
|
||||
name="eye-slash"
|
||||
:title="__('Confidential')"
|
||||
class="confidential-icon gl-mr-2 align-self-baseline align-self-md-auto mt-xl-0"
|
||||
class="confidential-icon"
|
||||
:aria-label="__('Confidential')"
|
||||
/>
|
||||
<gl-link
|
||||
:href="computedPath"
|
||||
class="sortable-link gl-font-weight-normal"
|
||||
@click="handleTitleClick"
|
||||
>
|
||||
<gl-link :href="computedPath" class="sortable-link" @click="handleTitleClick">
|
||||
{{ title }}
|
||||
</gl-link>
|
||||
</div>
|
||||
|
||||
<!-- Info area: meta, path, and assignees -->
|
||||
<div class="item-info-area d-flex flex-xl-grow-1 flex-shrink-0">
|
||||
<div
|
||||
class="item-info-area gl-display-flex gl-flex-grow-1 gl-flex-shrink-0 gl-gap-3 gl-ml-6 ml-xl-0"
|
||||
>
|
||||
<!-- Meta area: path and attributes -->
|
||||
<!-- If there is no room beside the path, meta attributes are put ABOVE it (flex-wrap-reverse). -->
|
||||
<!-- See design: https://gitlab-org.gitlab.io/gitlab-design/hosted/pedro/%2383-issue-mr-rows-cards-spec-previews/#artboard16 -->
|
||||
<div
|
||||
class="item-meta d-flex flex-wrap-reverse justify-content-start justify-content-md-between"
|
||||
class="item-meta gl-display-flex gl-md-justify-content-space-between gl-gap-3 gl-flex-wrap-wrap-reverse"
|
||||
>
|
||||
<!-- Path area: status icon (<XL), path, issue # -->
|
||||
<div
|
||||
class="item-path-area item-path-id d-flex align-items-center mr-2 mt-2 mt-xl-0 ml-xl-2"
|
||||
class="item-path-area item-path-id gl-display-flex gl-align-items-center gl-flex-wrap gl-gap-3"
|
||||
>
|
||||
<gl-tooltip :target="() => $refs.iconElement">
|
||||
<span v-safe-html="stateTitle"></span>
|
||||
</gl-tooltip>
|
||||
<span v-gl-tooltip :title="itemPath" class="path-id-text d-inline-block">{{
|
||||
itemPath
|
||||
}}</span>
|
||||
<span
|
||||
v-if="itemPath"
|
||||
v-gl-tooltip
|
||||
:title="itemPath"
|
||||
class="path-id-text d-inline-block"
|
||||
>{{ itemPath }}</span
|
||||
>
|
||||
<span>{{ pathIdSeparator }}{{ itemId }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Attributes area: CI, epic count, weight, milestone -->
|
||||
<!-- They have a different order on large screen sizes -->
|
||||
<div class="item-attributes-area d-flex align-items-center mt-2 mt-xl-0">
|
||||
<div
|
||||
class="item-attributes-area gl-display-flex gl-align-items-center gl-flex-wrap gl-gap-3"
|
||||
>
|
||||
<span v-if="hasPipeline" class="mr-ci-status order-md-last">
|
||||
<a :href="pipelineStatus.details_path">
|
||||
<ci-icon v-gl-tooltip :status="pipelineStatus" :title="pipelineStatusTooltip" />
|
||||
|
|
@ -174,7 +174,7 @@ export default {
|
|||
<issue-milestone
|
||||
v-if="hasMilestone"
|
||||
:milestone="milestone"
|
||||
class="d-flex align-items-center item-milestone order-md-first ml-md-0"
|
||||
class="item-milestone gl-font-sm gl-display-flex gl-align-items-center order-md-first"
|
||||
/>
|
||||
|
||||
<!-- Flex order for slots is defined in the parent component: e.g. related_issues_block.vue -->
|
||||
|
|
@ -198,24 +198,17 @@ export default {
|
|||
<issue-assignees
|
||||
v-if="hasAssignees"
|
||||
:assignees="assignees"
|
||||
class="item-assignees align-items-center align-self-end flex-shrink-0 order-md-2 d-none d-md-flex"
|
||||
class="item-assignees gl-display-flex gl-align-items-center gl-align-self-end gl-flex-shrink-0 order-md-2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Assignees. On small layouts, these are put here, at the end of the card. -->
|
||||
<issue-assignees
|
||||
v-if="assignees.length !== 0"
|
||||
:assignees="assignees"
|
||||
class="item-assignees d-flex align-items-center align-self-end flex-shrink-0 d-md-none gl-ml-3"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span
|
||||
v-if="isLocked"
|
||||
v-gl-tooltip
|
||||
class="gl-px-3 gl-display-inline-block gl-cursor-not-allowed"
|
||||
class="gl-display-inline-block gl-cursor-not-allowed"
|
||||
:title="lockedMessage"
|
||||
data-testid="lockIcon"
|
||||
>
|
||||
|
|
@ -226,8 +219,9 @@ export default {
|
|||
v-gl-tooltip
|
||||
icon="close"
|
||||
category="tertiary"
|
||||
size="small"
|
||||
:disabled="removeDisabled"
|
||||
class="js-issue-item-remove-button gl-ml-3"
|
||||
class="js-issue-item-remove-button"
|
||||
data-qa-selector="remove_related_issue_button"
|
||||
:title="__('Remove')"
|
||||
:aria-label="__('Remove')"
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export default {
|
|||
|
||||
<template>
|
||||
<div v-if="isFetchingMergeRequests || (!isFetchingMergeRequests && totalCount)">
|
||||
<div class="card card-slim gl-mt-5 gl-mb-0">
|
||||
<div class="card card-slim gl-mt-5 gl-mb-0 gl-bg-gray-10">
|
||||
<div class="card-header gl-px-5 gl-py-4 gl-bg-white">
|
||||
<div
|
||||
class="card-title gl-relative gl-display-flex gl-align-items-center gl-line-height-20 gl-font-weight-bold gl-m-0"
|
||||
|
|
@ -88,10 +88,10 @@ export default {
|
|||
v-if="isFetchingMergeRequests"
|
||||
size="sm"
|
||||
label="Fetching related merge requests"
|
||||
class="gl-py-3"
|
||||
class="gl-py-4"
|
||||
/>
|
||||
<ul v-else class="content-list related-items-list gl-bg-gray-10">
|
||||
<li v-for="mr in mergeRequests" :key="mr.id" class="list-item gl-m-0! gl-p-0!">
|
||||
<ul v-else class="content-list related-items-list">
|
||||
<li v-for="mr in mergeRequests" :key="mr.id" class="list-item gl-m-0! gl-px-4! gl-py-3!">
|
||||
<related-issuable-item
|
||||
:id-key="mr.id"
|
||||
:display-reference="mr.reference"
|
||||
|
|
|
|||
|
|
@ -30,18 +30,16 @@ export default {
|
|||
return {
|
||||
primaryProps: {
|
||||
text: this.$options.i18n.primaryText,
|
||||
attributes: [
|
||||
{
|
||||
'data-method': 'post',
|
||||
'data-testid': 'retry-button-modal',
|
||||
href: this.href,
|
||||
variant: 'danger',
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
'data-method': 'post',
|
||||
'data-testid': 'retry-button-modal',
|
||||
href: this.href,
|
||||
variant: 'danger',
|
||||
},
|
||||
},
|
||||
cancelProps: {
|
||||
text: this.$options.i18n.cancel,
|
||||
attributes: [{ category: 'secondary', variant: 'default' }],
|
||||
attributes: { category: 'secondary', variant: 'default' },
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import eventHub from '../event_hub';
|
|||
export default {
|
||||
primaryProps: {
|
||||
text: s__('Labels|Promote Label'),
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
cancelProps: {
|
||||
text: __('Cancel'),
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ Once deleted, it cannot be undone or recovered.`),
|
|||
},
|
||||
primaryProps: {
|
||||
text: s__('Milestones|Delete milestone'),
|
||||
attributes: [{ variant: 'danger' }, { category: 'primary' }],
|
||||
attributes: { variant: 'danger', category: 'primary' },
|
||||
},
|
||||
cancelProps: {
|
||||
text: __('Cancel'),
|
||||
|
|
|
|||
|
|
@ -80,11 +80,11 @@ export default {
|
|||
},
|
||||
primaryAction: {
|
||||
text: s__('Milestones|Promote Milestone'),
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
cancelAction: {
|
||||
text: __('Cancel'),
|
||||
attributes: [],
|
||||
attributes: {},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ export default {
|
|||
size="sm"
|
||||
:action-primary="/* eslint-disable @gitlab/vue-no-new-non-primitive-in-template */ {
|
||||
text: __('Delete'),
|
||||
attributes: [{ variant: 'danger' }, { disabled: disablePrimaryButton }],
|
||||
attributes: { variant: 'danger', disabled: disablePrimaryButton },
|
||||
} /* eslint-enable @gitlab/vue-no-new-non-primitive-in-template */"
|
||||
:action-cancel="/* eslint-disable @gitlab/vue-no-new-non-primitive-in-template */ {
|
||||
text: __('Cancel'),
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export default {
|
|||
modalButtons: {
|
||||
primary: {
|
||||
text: s__('DependencyProxy|Clear cache'),
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
},
|
||||
secondary: {
|
||||
text: __('Cancel'),
|
||||
|
|
|
|||
|
|
@ -122,15 +122,15 @@ export default {
|
|||
modal: {
|
||||
packageDeletePrimaryAction: {
|
||||
text: __('Delete'),
|
||||
attributes: [
|
||||
{ variant: 'danger' },
|
||||
{ category: 'primary' },
|
||||
{ 'data-qa-selector': 'delete_modal_button' },
|
||||
],
|
||||
attributes: {
|
||||
variant: 'danger',
|
||||
category: 'primary',
|
||||
'data-qa-selector': 'delete_modal_button',
|
||||
},
|
||||
},
|
||||
fileDeletePrimaryAction: {
|
||||
text: __('Delete'),
|
||||
attributes: [{ variant: 'danger' }, { category: 'primary' }],
|
||||
attributes: { variant: 'danger', category: 'primary' },
|
||||
},
|
||||
cancelAction: {
|
||||
text: __('Cancel'),
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export default {
|
|||
modal: {
|
||||
packagesDeletePrimaryAction: {
|
||||
text: DELETE_PACKAGE_MODAL_PRIMARY_ACTION,
|
||||
attributes: [{ variant: 'danger' }, { category: 'primary' }],
|
||||
attributes: { variant: 'danger', category: 'primary' },
|
||||
},
|
||||
cancelAction: {
|
||||
text: __('Cancel'),
|
||||
|
|
|
|||
|
|
@ -314,19 +314,19 @@ export default {
|
|||
modal: {
|
||||
packageDeletePrimaryAction: {
|
||||
text: s__('PackageRegistry|Permanently delete'),
|
||||
attributes: [
|
||||
{ variant: 'danger' },
|
||||
{ category: 'primary' },
|
||||
{ 'data-qa-selector': 'delete_modal_button' },
|
||||
],
|
||||
attributes: {
|
||||
variant: 'danger',
|
||||
category: 'primary',
|
||||
'data-qa-selector': 'delete_modal_button',
|
||||
},
|
||||
},
|
||||
fileDeletePrimaryAction: {
|
||||
text: __('Delete'),
|
||||
attributes: [{ variant: 'danger' }, { category: 'primary' }],
|
||||
attributes: { variant: 'danger', category: 'primary' },
|
||||
},
|
||||
filesDeletePrimaryAction: {
|
||||
text: s__('PackageRegistry|Permanently delete assets'),
|
||||
attributes: [{ variant: 'danger' }, { category: 'primary' }],
|
||||
attributes: { variant: 'danger', category: 'primary' },
|
||||
},
|
||||
cancelAction: {
|
||||
text: __('Cancel'),
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default {
|
|||
},
|
||||
primaryAction: {
|
||||
text: PRIMARY_ACTION_TEXT,
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
},
|
||||
cancelAction: {
|
||||
text: CANCEL_TEXT,
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: __('Delete project'),
|
||||
attributes: [{ variant: 'danger' }, { category: 'primary' }, { disabled: !this.canSubmit }],
|
||||
attributes: { variant: 'danger', category: 'primary', disabled: !this.canSubmit },
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: I18N_PASSWORD_PROMPT_CONFIRM_BUTTON,
|
||||
attributes: [{ variant: 'danger' }, { category: 'primary' }, { disabled: !this.isValid }],
|
||||
attributes: { variant: 'danger', category: 'primary', disabled: !this.isValid },
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: s__('Pipeline|Stop pipeline'),
|
||||
attributes: [{ variant: 'danger' }],
|
||||
attributes: { variant: 'danger' },
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ export default {
|
|||
},
|
||||
modalCloseButton: {
|
||||
text: __('Close'),
|
||||
attributes: [{ variant: 'confirm' }],
|
||||
attributes: { variant: 'confirm' },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -38,11 +38,12 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: __('Delete account'),
|
||||
attributes: [
|
||||
{ variant: 'danger', 'data-qa-selector': 'confirm_delete_account_button' },
|
||||
{ category: 'primary' },
|
||||
{ disabled: !this.canSubmit },
|
||||
],
|
||||
attributes: {
|
||||
variant: 'danger',
|
||||
'data-qa-selector': 'confirm_delete_account_button',
|
||||
category: 'primary',
|
||||
disabled: !this.canSubmit,
|
||||
},
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -60,11 +60,7 @@ Please update your Git repository remotes as soon as possible.`),
|
|||
primaryProps() {
|
||||
return {
|
||||
text: __('Update username'),
|
||||
attributes: [
|
||||
{ variant: 'confirm' },
|
||||
{ category: 'primary' },
|
||||
{ disabled: this.isRequestPending },
|
||||
],
|
||||
attributes: { variant: 'confirm', category: 'primary', disabled: this.isRequestPending },
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -52,16 +52,16 @@ export default {
|
|||
checked: true,
|
||||
actionPrimary: {
|
||||
text: this.i18n.actionPrimaryText,
|
||||
attributes: [
|
||||
{ variant: 'confirm' },
|
||||
{ category: 'primary' },
|
||||
{ 'data-testid': 'submit-commit' },
|
||||
{ 'data-qa-selector': 'submit_commit_button' },
|
||||
],
|
||||
attributes: {
|
||||
variant: 'confirm',
|
||||
category: 'primary',
|
||||
'data-testid': 'submit-commit',
|
||||
'data-qa-selector': 'submit_commit_button',
|
||||
},
|
||||
},
|
||||
actionCancel: {
|
||||
text: this.i18n.actionCancelText,
|
||||
attributes: [{ 'data-testid': 'cancel-commit' }],
|
||||
attributes: { 'data-testid': 'cancel-commit' },
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -62,11 +62,11 @@ export default {
|
|||
return {
|
||||
primary: {
|
||||
text: __('Yes, delete project'),
|
||||
attributes: [
|
||||
{ variant: 'danger' },
|
||||
{ disabled: this.confirmDisabled },
|
||||
{ 'data-qa-selector': 'confirm_delete_button' },
|
||||
],
|
||||
attributes: {
|
||||
variant: 'danger',
|
||||
disabled: this.confirmDisabled,
|
||||
'data-qa-selector': 'confirm_delete_button',
|
||||
},
|
||||
},
|
||||
cancel: {
|
||||
text: __('Cancel, keep project'),
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ export default {
|
|||
:checked="linkedIssueType"
|
||||
/>
|
||||
</gl-form-group>
|
||||
<p class="bold">
|
||||
<p class="bold gl-mb-2">
|
||||
{{ issuableInputText }}
|
||||
</p>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { GlLink, GlIcon, GlButton, GlCard } from '@gitlab/ui';
|
||||
import { GlLink, GlIcon, GlLoadingIcon, GlButton, GlCard } from '@gitlab/ui';
|
||||
import { __, sprintf } from '~/locale';
|
||||
import {
|
||||
issuableIconMap,
|
||||
|
|
@ -17,6 +17,7 @@ export default {
|
|||
components: {
|
||||
GlLink,
|
||||
GlIcon,
|
||||
GlLoadingIcon,
|
||||
GlButton,
|
||||
GlCard,
|
||||
AddIssuableForm,
|
||||
|
|
@ -239,15 +240,12 @@ export default {
|
|||
</template>
|
||||
<div
|
||||
v-if="isOpen"
|
||||
class="linked-issues-card-body"
|
||||
:class="{
|
||||
'gl-p-5': isFormVisible || shouldShowTokenBody,
|
||||
}"
|
||||
class="linked-issues-card-body gl-py-3 gl-px-4 gl-bg-gray-10"
|
||||
data-testid="related-issues-body"
|
||||
>
|
||||
<div
|
||||
v-if="isFormVisible"
|
||||
class="js-add-related-issues-form-area card-body bordered-box bg-white"
|
||||
class="js-add-related-issues-form-area card-body bg-white gl-mt-2 gl-border-1 gl-border-solid gl-border-gray-100 gl-rounded-base"
|
||||
:class="{ 'gl-mb-5': shouldShowTokenBody, 'gl-show-field-errors': hasError }"
|
||||
>
|
||||
<add-issuable-form
|
||||
|
|
@ -270,6 +268,7 @@ export default {
|
|||
/>
|
||||
</div>
|
||||
<template v-if="shouldShowTokenBody">
|
||||
<gl-loading-icon v-if="isFetching" size="sm" class="gl-py-2" />
|
||||
<related-issues-list
|
||||
v-for="(category, index) in categorisedIssues"
|
||||
:key="category.linkType"
|
||||
|
|
@ -281,13 +280,16 @@ export default {
|
|||
:issuable-type="issuableType"
|
||||
:path-id-separator="pathIdSeparator"
|
||||
:related-issues="category.issues"
|
||||
:class="{ 'gl-mt-5': index > 0 }"
|
||||
:class="{
|
||||
'gl-pb-3 gl-mb-5 gl-border-b-1 gl-border-b-solid gl-border-b-gray-100':
|
||||
index !== categorisedIssues.length - 1,
|
||||
}"
|
||||
@relatedIssueRemoveRequest="$emit('relatedIssueRemoveRequest', $event)"
|
||||
@saveReorder="$emit('saveReorder', $event)"
|
||||
/>
|
||||
</template>
|
||||
<div v-if="!shouldShowTokenBody && !isFormVisible" data-testid="related-items-empty">
|
||||
<p class="gl-my-5 gl-px-5 gl-text-gray-500">
|
||||
<p class="gl-p-2 gl-mb-0 gl-text-gray-500">
|
||||
{{ emptyStateMessage }}
|
||||
<gl-link
|
||||
v-if="hasHelpPath"
|
||||
|
|
|
|||
|
|
@ -97,11 +97,13 @@ export default {
|
|||
|
||||
<template>
|
||||
<div :data-link-type="listLinkType">
|
||||
<h4 v-if="heading" class="gl-font-base mt-0">{{ heading }}</h4>
|
||||
<div
|
||||
class="related-issues-token-body bordered-box bg-white"
|
||||
:class="{ 'sortable-container': canReorder }"
|
||||
<h4
|
||||
v-if="heading"
|
||||
class="gl-font-sm gl-font-weight-semibold gl-text-gray-700 gl-mx-2 gl-mt-3 gl-mb-2"
|
||||
>
|
||||
{{ heading }}
|
||||
</h4>
|
||||
<div class="related-issues-token-body" :class="{ 'sortable-container': canReorder }">
|
||||
<div v-if="isFetching" class="gl-mb-2" data-qa-selector="related_issues_loading_placeholder">
|
||||
<gl-loading-icon
|
||||
ref="loadingIcon"
|
||||
|
|
@ -121,7 +123,7 @@ export default {
|
|||
}"
|
||||
:data-key="issue.id"
|
||||
:data-ordering-id="issuableOrderingId(issue)"
|
||||
class="js-related-issues-token-list-item list-item pt-0 pb-0"
|
||||
class="js-related-issues-token-list-item list-item pt-0 pb-0 gl-border-b-0!"
|
||||
>
|
||||
<related-issuable-item
|
||||
:id-key="issue.id"
|
||||
|
|
|
|||
|
|
@ -101,23 +101,19 @@ export default {
|
|||
primaryOptions() {
|
||||
return {
|
||||
text: this.$options.i18n.PRIMARY_OPTIONS_TEXT,
|
||||
attributes: [
|
||||
{
|
||||
variant: 'danger',
|
||||
loading: this.loading,
|
||||
disabled: this.loading || !this.form.state,
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
variant: 'danger',
|
||||
loading: this.loading,
|
||||
disabled: this.loading || !this.form.state,
|
||||
},
|
||||
};
|
||||
},
|
||||
cancelOptions() {
|
||||
return {
|
||||
text: this.$options.i18n.SECONDARY_OPTIONS_TEXT,
|
||||
attributes: [
|
||||
{
|
||||
disabled: this.loading,
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
disabled: this.loading,
|
||||
},
|
||||
};
|
||||
},
|
||||
showCreateNewMrToggle() {
|
||||
|
|
|
|||
|
|
@ -93,23 +93,19 @@ export default {
|
|||
primaryOptions() {
|
||||
return {
|
||||
text: this.primaryBtnText,
|
||||
attributes: [
|
||||
{
|
||||
variant: 'confirm',
|
||||
loading: this.loading,
|
||||
disabled: !this.formCompleted || this.loading,
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
variant: 'confirm',
|
||||
loading: this.loading,
|
||||
disabled: !this.formCompleted || this.loading,
|
||||
},
|
||||
};
|
||||
},
|
||||
cancelOptions() {
|
||||
return {
|
||||
text: SECONDARY_OPTIONS_TEXT,
|
||||
attributes: [
|
||||
{
|
||||
disabled: this.loading,
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
disabled: this.loading,
|
||||
},
|
||||
};
|
||||
},
|
||||
showCreateNewMrToggle() {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
<script>
|
||||
import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql';
|
||||
import { createAlert } from '~/alert';
|
||||
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
|
||||
import {
|
||||
TREE_PAGE_SIZE,
|
||||
TREE_INITIAL_FETCH_COUNT,
|
||||
TREE_PAGE_LIMIT,
|
||||
COMMIT_BATCH_SIZE,
|
||||
GITALY_UNAVAILABLE_CODE,
|
||||
|
|
@ -23,7 +21,7 @@ export default {
|
|||
FileTable,
|
||||
FilePreview,
|
||||
},
|
||||
mixins: [getRefMixin, glFeatureFlagMixin()],
|
||||
mixins: [getRefMixin],
|
||||
apollo: {
|
||||
projectPath: {
|
||||
query: projectPathQuery,
|
||||
|
|
@ -59,13 +57,6 @@ export default {
|
|||
};
|
||||
},
|
||||
computed: {
|
||||
pageSize() {
|
||||
// we want to exponentially increase the page size to reduce the load on the frontend
|
||||
const exponentialSize = (TREE_PAGE_SIZE / TREE_INITIAL_FETCH_COUNT) * (this.fetchCounter + 1);
|
||||
return exponentialSize < TREE_PAGE_SIZE && this.glFeatures.increasePageSizeExponentially
|
||||
? exponentialSize
|
||||
: TREE_PAGE_SIZE;
|
||||
},
|
||||
totalEntries() {
|
||||
return Object.values(this.entries).flat().length;
|
||||
},
|
||||
|
|
@ -110,7 +101,7 @@ export default {
|
|||
ref: this.ref,
|
||||
path: originalPath,
|
||||
nextPageCursor: this.nextPageCursor,
|
||||
pageSize: this.pageSize,
|
||||
pageSize: TREE_PAGE_SIZE,
|
||||
},
|
||||
})
|
||||
.then(({ data }) => {
|
||||
|
|
|
|||
|
|
@ -106,23 +106,19 @@ export default {
|
|||
primaryOptions() {
|
||||
return {
|
||||
text: this.primaryBtnText,
|
||||
attributes: [
|
||||
{
|
||||
variant: 'confirm',
|
||||
loading: this.loading,
|
||||
disabled: !this.formCompleted || this.loading,
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
variant: 'confirm',
|
||||
loading: this.loading,
|
||||
disabled: !this.formCompleted || this.loading,
|
||||
},
|
||||
};
|
||||
},
|
||||
cancelOptions() {
|
||||
return {
|
||||
text: SECONDARY_OPTIONS_TEXT,
|
||||
attributes: [
|
||||
{
|
||||
disabled: this.loading,
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
disabled: this.loading,
|
||||
},
|
||||
};
|
||||
},
|
||||
formattedFileSize() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { __ } from '~/locale';
|
|||
export const GITALY_UNAVAILABLE_CODE = 'unavailable';
|
||||
export const TREE_PAGE_LIMIT = 1000; // the maximum amount of items per page
|
||||
export const TREE_PAGE_SIZE = 100; // the amount of items to be fetched per (batch) request
|
||||
export const TREE_INITIAL_FETCH_COUNT = TREE_PAGE_LIMIT / TREE_PAGE_SIZE; // the amount of (batch) requests to make
|
||||
|
||||
export const COMMIT_BATCH_SIZE = 25; // we request commit data in batches of 25
|
||||
|
||||
|
|
|
|||
|
|
@ -56,13 +56,11 @@ export default {
|
|||
primaryProps() {
|
||||
return {
|
||||
text: s__('CreateTimelogForm|Save'),
|
||||
attributes: [
|
||||
{
|
||||
variant: 'confirm',
|
||||
disabled: this.submitDisabled,
|
||||
loading: this.isLoading,
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
variant: 'confirm',
|
||||
disabled: this.submitDisabled,
|
||||
loading: this.isLoading,
|
||||
},
|
||||
};
|
||||
},
|
||||
cancelProps() {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ export default {
|
|||
</div>
|
||||
<ul :aria-label="$options.i18n.switchTo" class="gl-p-0">
|
||||
<nav-item :item="$options.contextSwitcherItems.yourWork" />
|
||||
<nav-item :item="$options.contextSwitcherItems.explore" />
|
||||
</ul>
|
||||
</li>
|
||||
<frequent-projects-list :username="username" :view-all-link="projectsPath" />
|
||||
|
|
|
|||
|
|
@ -52,7 +52,15 @@ export default {
|
|||
<template>
|
||||
<div class="user-bar">
|
||||
<div class="gl-display-flex gl-align-items-center gl-px-3 gl-py-2 gl-gap-2">
|
||||
<a v-safe-html="$options.logo" :href="rootPath"></a>
|
||||
<a :href="rootPath">
|
||||
<img
|
||||
v-if="sidebarData.logo_url"
|
||||
data-testid="brand-header-custom-logo"
|
||||
:src="sidebarData.logo_url"
|
||||
class="gl-h-6"
|
||||
/>
|
||||
<span v-else v-safe-html="$options.logo"></span>
|
||||
</a>
|
||||
<gl-badge
|
||||
v-if="sidebarData.gitlab_com_and_canary"
|
||||
variant="success"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { s__ } from '~/locale';
|
|||
|
||||
export const contextSwitcherItems = {
|
||||
yourWork: { title: s__('Navigation|Your work'), link: '/', icon: 'work' },
|
||||
explore: { title: s__('Navigation|Explore'), link: '/explore', icon: 'compass' },
|
||||
recentProjects: [
|
||||
{
|
||||
// eslint-disable-next-line @gitlab/require-i18n-strings
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default {
|
|||
closeModalProps() {
|
||||
return {
|
||||
text: this.$options.i18n.closeText,
|
||||
attributes: [],
|
||||
attributes: {},
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export default {
|
|||
cancelModalProps() {
|
||||
return {
|
||||
text: this.$options.i18n.modalCancel,
|
||||
attributes: [],
|
||||
attributes: {},
|
||||
};
|
||||
},
|
||||
disableModalSubmit() {
|
||||
|
|
@ -81,7 +81,7 @@ export default {
|
|||
primaryModalProps() {
|
||||
return {
|
||||
text: this.$options.i18n.modalRemove,
|
||||
attributes: [{ disabled: this.disableModalSubmit }, { variant: 'danger' }],
|
||||
attributes: { disabled: this.disableModalSubmit, variant: 'danger' },
|
||||
};
|
||||
},
|
||||
commandModalId() {
|
||||
|
|
|
|||
|
|
@ -17,20 +17,12 @@ export const initToggle = (el) => {
|
|||
|
||||
return new Vue({
|
||||
el,
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: parseBoolean(disabled),
|
||||
},
|
||||
isLoading: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: parseBoolean(isLoading),
|
||||
},
|
||||
},
|
||||
name: 'ToggleFromHtml',
|
||||
|
||||
data() {
|
||||
return {
|
||||
disabled: parseBoolean(disabled),
|
||||
isLoading: parseBoolean(isLoading),
|
||||
value: parseBoolean(isChecked),
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ export default {
|
|||
modalOptions: {
|
||||
actionPrimary: {
|
||||
text: s__('UserLists|Add'),
|
||||
attributes: [{ 'data-testid': 'confirm-add-user-ids', variant: 'confirm' }],
|
||||
attributes: { 'data-testid': 'confirm-add-user-ids', variant: 'confirm' },
|
||||
},
|
||||
actionCancel: {
|
||||
text: s__('UserLists|Cancel'),
|
||||
attributes: [{ 'data-testid': 'cancel-add-user-ids' }],
|
||||
attributes: { 'data-testid': 'cancel-add-user-ids' },
|
||||
},
|
||||
modalId: ADD_USER_MODAL_ID,
|
||||
static: true,
|
||||
|
|
|
|||
|
|
@ -60,13 +60,11 @@ export default {
|
|||
actionPrimary() {
|
||||
return {
|
||||
text: this.confirmButtonText,
|
||||
attributes: [
|
||||
{
|
||||
variant: 'danger',
|
||||
disabled: !this.isValid,
|
||||
'data-qa-selector': 'confirm_danger_modal_button',
|
||||
},
|
||||
],
|
||||
attributes: {
|
||||
variant: 'danger',
|
||||
disabled: !this.isValid,
|
||||
'data-qa-selector': 'confirm_danger_modal_button',
|
||||
},
|
||||
};
|
||||
},
|
||||
actionCancel() {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ export default {
|
|||
<div
|
||||
v-if="isOpen"
|
||||
class="gl-bg-gray-10 gl-rounded-bottom-left-base gl-rounded-bottom-right-base"
|
||||
:class="{ 'gl-p-5 gl-pb-3': !error }"
|
||||
:class="{ 'gl-px-5 gl-py-4': !error }"
|
||||
data-testid="widget-body"
|
||||
>
|
||||
<slot name="body"></slot>
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ export default {
|
|||
|
||||
<template v-else>
|
||||
<div v-if="isChildrenEmpty && !isShownAddForm && !error" data-testid="links-empty">
|
||||
<p class="gl-mb-3 gl-text-gray-500">
|
||||
<p class="gl-mb-0 gl-text-gray-500">
|
||||
{{ $options.i18n.emptyStateMessage }}
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@ $item-remove-button-space: 42px;
|
|||
.item-body {
|
||||
position: relative;
|
||||
line-height: $gl-line-height;
|
||||
border: 1px solid transparent;
|
||||
border-radius: $gl-border-radius-base;
|
||||
|
||||
&:hover,
|
||||
&:focus-within {
|
||||
background-color: $white;
|
||||
border-color: $gray-50;
|
||||
}
|
||||
|
||||
.merge-request-status.closed {
|
||||
color: $red-500;
|
||||
|
|
@ -63,6 +71,7 @@ $item-remove-button-space: 42px;
|
|||
|
||||
.sortable-link {
|
||||
color: $gray-900;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -89,16 +98,6 @@ $item-remove-button-space: 42px;
|
|||
}
|
||||
}
|
||||
|
||||
.item-attributes-area {
|
||||
> * {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
margin-left: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-milestone,
|
||||
.item-weight {
|
||||
cursor: help;
|
||||
|
|
@ -149,7 +148,7 @@ $item-remove-button-space: 42px;
|
|||
}
|
||||
|
||||
.item-path-id {
|
||||
font-size: $gl-font-size-xs;
|
||||
font-size: $gl-font-size-small;
|
||||
white-space: nowrap;
|
||||
|
||||
.path-id-text {
|
||||
|
|
@ -158,30 +157,6 @@ $item-remove-button-space: 42px;
|
|||
}
|
||||
}
|
||||
|
||||
.btn-item-remove {
|
||||
position: absolute;
|
||||
top: $gl-padding-4 / 2;
|
||||
right: 0;
|
||||
padding: $gl-padding-4;
|
||||
margin-right: $gl-padding-4 / 2;
|
||||
line-height: 0;
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
color: $gl-text-color-secondary;
|
||||
|
||||
.related-items-tree & {
|
||||
position: relative;
|
||||
top: initial;
|
||||
padding: $btn-sm-side-margin;
|
||||
margin-right: initial;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $gl-text-color;
|
||||
border-color: $border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.mr-ci-status {
|
||||
line-height: 0;
|
||||
}
|
||||
|
|
@ -193,10 +168,6 @@ $item-remove-button-space: 42px;
|
|||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
.item-info-area {
|
||||
flex-basis: 100%;
|
||||
}
|
||||
|
||||
.sortable-link {
|
||||
max-width: 90%;
|
||||
}
|
||||
|
|
@ -267,18 +238,7 @@ $item-remove-button-space: 42px;
|
|||
}
|
||||
}
|
||||
|
||||
.btn-item-remove {
|
||||
position: relative;
|
||||
top: initial;
|
||||
padding: $btn-sm-side-margin;
|
||||
margin-right: $gl-padding-4 / 2;
|
||||
}
|
||||
|
||||
.sortable-link {
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.item-info-area {
|
||||
flex-basis: auto;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -299,3 +299,9 @@ to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1709
|
|||
.gl-focus:focus {
|
||||
@include gl-focus;
|
||||
}
|
||||
|
||||
.gl-md-justify-content-space-between {
|
||||
@include gl-media-breakpoint-up(md) {
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ class ProjectsController < Projects::ApplicationController
|
|||
before_action do
|
||||
push_frontend_feature_flag(:highlight_js, @project)
|
||||
push_frontend_feature_flag(:file_line_blame, @project)
|
||||
push_frontend_feature_flag(:increase_page_size_exponentially, @project)
|
||||
push_licensed_feature(:file_locks) if @project.present? && @project.licensed_feature_available?(:file_locks)
|
||||
push_licensed_feature(:security_orchestration_policies) if @project.present? && @project.licensed_feature_available?(:security_orchestration_policies)
|
||||
push_force_frontend_feature_flag(:work_items, @project&.work_items_feature_flag_enabled?)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class SnippetsController < Snippets::ApplicationController
|
|||
|
||||
skip_before_action :authenticate_user!, only: [:index, :show, :raw]
|
||||
|
||||
layout 'snippets'
|
||||
layout :determine_layout
|
||||
|
||||
def index
|
||||
if params[:username].present?
|
||||
|
|
@ -48,4 +48,12 @@ class SnippetsController < Snippets::ApplicationController
|
|||
def spammable_path
|
||||
snippet_path(@snippet)
|
||||
end
|
||||
|
||||
def determine_layout
|
||||
if action_name == 'show' && @snippet.author != current_user
|
||||
'explore'
|
||||
else
|
||||
'snippets'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class AbuseReportsFinder
|
|||
filter_by_user_id
|
||||
|
||||
filter_by_user
|
||||
filter_by_reporter
|
||||
filter_by_status
|
||||
filter_by_category
|
||||
end
|
||||
|
|
@ -48,12 +49,21 @@ class AbuseReportsFinder
|
|||
def filter_by_user
|
||||
return unless params[:user].present?
|
||||
|
||||
user_id = User.by_username(params[:user]).pick(:id)
|
||||
user_id = find_user_id(params[:user])
|
||||
return unless user_id
|
||||
|
||||
@reports = @reports.by_user_id(user_id)
|
||||
end
|
||||
|
||||
def filter_by_reporter
|
||||
return unless params[:reporter].present?
|
||||
|
||||
user_id = find_user_id(params[:reporter])
|
||||
return unless user_id
|
||||
|
||||
@reports = @reports.by_reporter_id(user_id)
|
||||
end
|
||||
|
||||
def filter_by_user_id
|
||||
return unless params[:user_id].present?
|
||||
|
||||
|
|
@ -71,4 +81,8 @@ class AbuseReportsFinder
|
|||
|
||||
@reports = @reports.order_by(sort_by)
|
||||
end
|
||||
|
||||
def find_user_id(username)
|
||||
User.by_username(username).pick(:id)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ module DashboardHelper
|
|||
private
|
||||
|
||||
def get_dashboard_nav_links
|
||||
links = [:projects, :groups, :snippets]
|
||||
links = [:projects, :groups, :snippets, :your_work, :explore]
|
||||
|
||||
if can?(current_user, :read_cross_project)
|
||||
links += [:activity, :milestones]
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ module ExploreHelper
|
|||
private
|
||||
|
||||
def get_explore_nav_links
|
||||
[:projects, :groups, :snippets]
|
||||
[:projects, :groups, :topics, :snippets]
|
||||
end
|
||||
|
||||
def request_path_with_options(options = {})
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ module Nav
|
|||
end
|
||||
|
||||
def build_anonymous_view_model(builder:)
|
||||
# These come from `app/views/layouts/nav/_explore.html.ham`
|
||||
if explore_nav_link?(:projects)
|
||||
builder.add_primary_menu_item_with_shortcut(
|
||||
header: top_nav_localized_headers[:explore],
|
||||
|
|
@ -83,6 +82,15 @@ module Nav
|
|||
)
|
||||
end
|
||||
|
||||
if explore_nav_link?(:topics)
|
||||
builder.add_primary_menu_item_with_shortcut(
|
||||
header: top_nav_localized_headers[:explore],
|
||||
active: active_nav_link?(page: topics_explore_projects_path, path: 'projects#topic'),
|
||||
href: topics_explore_projects_path,
|
||||
**topics_menu_item_attrs
|
||||
)
|
||||
end
|
||||
|
||||
if explore_nav_link?(:snippets)
|
||||
builder.add_primary_menu_item_with_shortcut(
|
||||
header: top_nav_localized_headers[:explore],
|
||||
|
|
@ -123,39 +131,54 @@ module Nav
|
|||
builder.add_view(GROUPS_VIEW, container_view_props(namespace: 'groups', current_item: current_item, submenu: groups_submenu))
|
||||
end
|
||||
|
||||
if dashboard_nav_link?(:your_work)
|
||||
builder.add_primary_menu_item(
|
||||
id: 'your-work',
|
||||
header: top_nav_localized_headers[:switch_to],
|
||||
title: _('Your work'),
|
||||
href: dashboard_projects_path,
|
||||
active: active_nav_link?(controller: []),
|
||||
icon: 'work',
|
||||
data: { **menu_data_tracking_attrs('your-work') }
|
||||
)
|
||||
end
|
||||
|
||||
if dashboard_nav_link?(:explore)
|
||||
builder.add_primary_menu_item(
|
||||
id: 'explore',
|
||||
header: top_nav_localized_headers[:switch_to],
|
||||
title: _('Explore'),
|
||||
href: explore_projects_path,
|
||||
active: active_nav_link?(controller: ["explore/groups", "explore/snippets"], page: ["/explore/projects", "/explore", "/explore/projects/topics"], path: ["projects#topic"]),
|
||||
icon: 'compass',
|
||||
data: { **menu_data_tracking_attrs('explore') }
|
||||
)
|
||||
end
|
||||
|
||||
if dashboard_nav_link?(:milestones)
|
||||
builder.add_primary_menu_item_with_shortcut(
|
||||
id: 'milestones',
|
||||
header: top_nav_localized_headers[:explore],
|
||||
builder.add_shortcut(
|
||||
id: 'milestones-shortcut',
|
||||
title: _('Milestones'),
|
||||
href: dashboard_milestones_path,
|
||||
active: active_nav_link?(controller: 'dashboard/milestones'),
|
||||
icon: 'clock',
|
||||
data: { **menu_data_tracking_attrs('milestones') },
|
||||
shortcut_class: 'dashboard-shortcuts-milestones'
|
||||
css_class: 'dashboard-shortcuts-milestones'
|
||||
)
|
||||
end
|
||||
|
||||
if dashboard_nav_link?(:snippets)
|
||||
builder.add_primary_menu_item_with_shortcut(
|
||||
header: top_nav_localized_headers[:explore],
|
||||
active: active_nav_link?(controller: 'dashboard/snippets'),
|
||||
data: { qa_selector: 'snippets_link', **menu_data_tracking_attrs('snippets') },
|
||||
builder.add_shortcut(
|
||||
id: 'snippets-shortcut',
|
||||
title: _('Snippets'),
|
||||
href: dashboard_snippets_path,
|
||||
**snippets_menu_item_attrs
|
||||
css_class: 'dashboard-shortcuts-snippets'
|
||||
)
|
||||
end
|
||||
|
||||
if dashboard_nav_link?(:activity)
|
||||
builder.add_primary_menu_item_with_shortcut(
|
||||
id: 'activity',
|
||||
header: top_nav_localized_headers[:explore],
|
||||
builder.add_shortcut(
|
||||
id: 'activity-shortcut',
|
||||
title: _('Activity'),
|
||||
href: activity_dashboard_path,
|
||||
active: active_nav_link?(path: 'dashboard#activity'),
|
||||
icon: 'history',
|
||||
data: { **menu_data_tracking_attrs('activity') },
|
||||
shortcut_class: 'dashboard-shortcuts-activity'
|
||||
css_class: 'dashboard-shortcuts-activity'
|
||||
)
|
||||
end
|
||||
|
||||
|
|
@ -220,6 +243,15 @@ module Nav
|
|||
}
|
||||
end
|
||||
|
||||
def topics_menu_item_attrs
|
||||
{
|
||||
id: 'topics',
|
||||
title: _('Topics'),
|
||||
icon: 'labels',
|
||||
shortcut_class: 'dashboard-shortcuts-topics'
|
||||
}
|
||||
end
|
||||
|
||||
def snippets_menu_item_attrs
|
||||
{
|
||||
id: 'snippets',
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ module NavHelper
|
|||
def super_sidebar_supported?
|
||||
return true if @nav.nil?
|
||||
|
||||
%w(your_work project group profile user_profile).include?(@nav)
|
||||
%w(your_work explore project group profile user_profile).include?(@nav)
|
||||
end
|
||||
|
||||
def get_header_links
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ module SidebarsHelper
|
|||
avatar_url: user.avatar_url,
|
||||
has_link_to_profile: current_user_menu?(:profile),
|
||||
link_to_profile: user_url(user),
|
||||
logo_url: current_appearance&.header_logo_path,
|
||||
status: {
|
||||
can_update: can?(current_user, :update_user_status, current_user),
|
||||
busy: user.status&.busy?,
|
||||
|
|
@ -107,6 +108,8 @@ module SidebarsHelper
|
|||
when 'user_profile'
|
||||
context = Sidebars::Context.new(current_user: user, container: viewed_user, **context_adds)
|
||||
Sidebars::UserProfile::Panel.new(context)
|
||||
when 'explore'
|
||||
Sidebars::Explore::Panel.new(Sidebars::Context.new(current_user: user, container: nil, **context_adds))
|
||||
else
|
||||
context = your_work_sidebar_context(user, **context_adds)
|
||||
Sidebars::YourWork::Panel.new(context)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class AbuseReport < ApplicationRecord
|
|||
validate :links_to_spam_contains_valid_urls
|
||||
|
||||
scope :by_user_id, ->(id) { where(user_id: id) }
|
||||
scope :by_reporter_id, ->(id) { where(reporter_id: id) }
|
||||
scope :by_category, ->(category) { where(category: category) }
|
||||
scope :with_users, -> { includes(:reporter, :user) }
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ module WorkItems
|
|||
link = WorkItems::ParentLink.find_or_initialize_by(work_item: work_item)
|
||||
link.work_item_parent = issuable
|
||||
|
||||
link.move_to_end
|
||||
|
||||
if link.changed? && link.save
|
||||
create_notes(work_item)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,7 +13,9 @@
|
|||
= _("If you get a lot of false alarms from repository checks, you can clear all repository check information from the database.")
|
||||
- clear_repository_checks_link = _('Clear all repository checks')
|
||||
- clear_repository_checks_message = _('This clears repository check states for all projects in the database and cannot be undone. Are you sure?')
|
||||
= link_to clear_repository_checks_link, clear_repository_check_states_admin_application_settings_path, data: { confirm: clear_repository_checks_message, confirm_btn_variant: 'danger' }, aria: { label: _('Clear repository checks') }, method: :put, class: "gl-button btn btn-sm btn-danger gl-mt-3"
|
||||
= render Pajamas::ButtonComponent.new(variant: :danger, href: clear_repository_check_states_admin_application_settings_path, method: :put, button_options: { class: 'btn-sm gl-mt-3', data: { confirm: clear_repository_checks_message, confirm_btn_variant: 'danger' }, aria: { label: _('Clear repository checks') } }) do
|
||||
= clear_repository_checks_link
|
||||
|
||||
|
||||
.sub-section
|
||||
%h4= _("Housekeeping")
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
.page-title-holder.d-flex.align-items-center
|
||||
%h1.page-title.gl-font-size-h-display= _('Groups')
|
||||
|
||||
- if current_user.can_create_group?
|
||||
.page-title-controls
|
||||
.page-title-controls.gl-display-flex.gl-align-items-center.gl-gap-5
|
||||
= link_to _("Explore groups"), explore_groups_path
|
||||
- if current_user.can_create_group?
|
||||
= render Pajamas::ButtonComponent.new(href: new_group_path, variant: :confirm, button_options: { data: { qa_selector: "new_group_button", testid: "new-group-button" } }) do
|
||||
= _("New group")
|
||||
.top-area
|
||||
= gl_tabs_nav({ class: 'gl-flex-grow-1 gl-border-0' }) do
|
||||
= gl_tab_link_to _("Your groups"), dashboard_groups_path
|
||||
= gl_tab_link_to _("Explore public groups"), explore_groups_path, data: { qa_selector: "public_groups_tab" }
|
||||
|
||||
.top-area.gl-p-3.gl-justify-content-end
|
||||
.nav-controls
|
||||
= render 'shared/groups/search_form'
|
||||
= render 'shared/groups/dropdown'
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@
|
|||
.page-title-holder.gl-display-flex.gl-align-items-center
|
||||
%h1.page-title.gl-font-size-h-display= _('Projects')
|
||||
|
||||
- if current_user.can_create_project?
|
||||
.page-title-controls
|
||||
.page-title-controls.gl-display-flex.gl-align-items-center.gl-gap-5
|
||||
= link_to _("Explore projects"), explore_projects_path
|
||||
- if current_user.can_create_project?
|
||||
= render Pajamas::ButtonComponent.new(href: new_project_path, variant: :confirm, button_options: { data: { qa_selector: 'new_project_button' } }) do
|
||||
= _("New project")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
- is_your_projects_path = current_page?(dashboard_projects_path) || current_page?(root_path)
|
||||
- is_explore_projects_path = current_page?(explore_root_path) || current_page?(trending_explore_projects_path) || current_page?(starred_explore_projects_path) || current_page?(explore_projects_path)
|
||||
|
||||
= gl_tabs_nav({ class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-w-full nav gl-tabs-nav' }) do
|
||||
= gl_tab_link_to dashboard_projects_path, { item_active: is_your_projects_path, class: 'shortcuts-activity', data: { placement: 'right' } } do
|
||||
|
|
@ -8,6 +7,4 @@
|
|||
= gl_tab_link_to starred_dashboard_projects_path, { data: { placement: 'right' } } do
|
||||
= s_("ProjectList|Starred")
|
||||
= gl_tab_counter_badge(limited_counter_with_delimiter(@total_starred_projects_count))
|
||||
= gl_tab_link_to s_("ProjectList|Explore"), explore_root_path, { item_active: is_explore_projects_path, data: { placement: 'right' } }
|
||||
= gl_tab_link_to s_("ProjectList|Topics"), topics_explore_projects_path, { data: { placement: 'right' } }
|
||||
= render_if_exists "dashboard/removed_projects_tab"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
.page-title-holder.d-flex.align-items-center
|
||||
%h1.page-title.gl-font-size-h-display= _('Snippets')
|
||||
|
||||
- if current_user && current_user.snippets.any? || @snippets.any?
|
||||
.page-title-controls
|
||||
- if can?(current_user, :create_snippet)
|
||||
= render Pajamas::ButtonComponent.new(href: new_snippet_path, variant: :confirm, button_options: { title: _("New snippet") }) do
|
||||
= _("New snippet")
|
||||
|
||||
.top-area
|
||||
= gl_tabs_nav({ class: 'gl-border-0' }) do
|
||||
= gl_tab_link_to _('Your snippets'), dashboard_snippets_path, { title: _('Your snippets') }
|
||||
= gl_tab_link_to _('Explore snippets'), explore_snippets_path, { title: _('Explore snippets') }
|
||||
.page-title-controls.gl-display-flex.gl-align-items-center.gl-gap-5
|
||||
= link_to _("Explore snippets"), explore_snippets_path
|
||||
- if can?(current_user, :create_snippet)
|
||||
= render Pajamas::ButtonComponent.new(href: new_snippet_path, variant: :confirm, button_options: { title: _("New snippet") }) do
|
||||
= _("New snippet")
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
= render 'dashboard/snippets_head'
|
||||
- if current_user.snippets.exists?
|
||||
= render partial: 'snippets/snippets_scope_menu', locals: { include_private: true, counts: @snippet_counts }
|
||||
.top-area= render partial: 'snippets/snippets_scope_menu', locals: { include_private: true, counts: @snippet_counts }
|
||||
= render partial: 'shared/snippets/list', locals: { link_project: true }
|
||||
- else
|
||||
= render 'shared/empty_states/snippets', button_path: button_path
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
.top-area
|
||||
= gl_tabs_nav({ class: 'gl-display-flex gl-flex-grow-1 gl-border-none'}) do
|
||||
= gl_tab_link_to _("Explore Groups"), explore_groups_path
|
||||
.top-area.gl-p-3.gl-justify-content-end
|
||||
.nav-controls
|
||||
= render 'shared/groups/search_form'
|
||||
= render 'shared/groups/dropdown'
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
- @hide_top_links = true
|
||||
- page_title _("Groups")
|
||||
- breadcrumb_title _("Groups")
|
||||
- page_title _("Explore groups")
|
||||
- header_title _("Groups"), dashboard_groups_path
|
||||
|
||||
= render_dashboard_ultimate_trial(current_user)
|
||||
|
||||
- if current_user
|
||||
= render 'dashboard/groups_head'
|
||||
- else
|
||||
= render 'explore/head'
|
||||
= render 'nav'
|
||||
.page-title-holder.gl-display-flex.gl-align-items-center
|
||||
%h1.page-title.gl-font-size-h-display= page_title
|
||||
.page-title-controls
|
||||
- if current_user&.can_create_group?
|
||||
= render Pajamas::ButtonComponent.new(href: new_group_path, variant: :confirm) do
|
||||
= _("New group")
|
||||
|
||||
= render 'nav'
|
||||
|
||||
- if cookies[:explore_groups_landing_dismissed] != 'true'
|
||||
.explore-groups.landing.content-block.js-explore-groups-landing.hide
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
.top-area
|
||||
= gl_tabs_nav({ class: 'gl-display-flex gl-flex-grow-1 gl-border-none'}) do
|
||||
= gl_tab_link_to _('All'), explore_projects_path, { item_active: current_page?(explore_projects_path) || current_page?(explore_root_path) }
|
||||
= gl_tab_link_to _('Most stars'), starred_explore_projects_path
|
||||
= gl_tab_link_to _('Most starred'), starred_explore_projects_path
|
||||
= gl_tab_link_to _('Trending'), trending_explore_projects_path
|
||||
|
||||
.nav-controls
|
||||
- unless current_user
|
||||
= render 'shared/projects/search_form'
|
||||
= render 'filter'
|
||||
= render 'shared/projects/search_form'
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
- @hide_top_links = true
|
||||
- page_title _("Projects")
|
||||
- header_title _("Projects"), dashboard_projects_path
|
||||
- breadcrumb_title _("Projects")
|
||||
- page_title _("Explore projects")
|
||||
- page_canonical_link explore_projects_url
|
||||
|
||||
= render_dashboard_ultimate_trial(current_user)
|
||||
|
||||
- if current_user
|
||||
= render 'dashboard/projects_head', project_tab_filter: :explore
|
||||
- else
|
||||
= render 'explore/head'
|
||||
.page-title-holder.gl-display-flex.gl-align-items-center
|
||||
%h1.page-title.gl-font-size-h-display= page_title
|
||||
.page-title-controls
|
||||
- if current_user&.can_create_project?
|
||||
= render Pajamas::ButtonComponent.new(href: new_project_path, variant: :confirm) do
|
||||
= _("New project")
|
||||
|
||||
= render 'explore/projects/nav'
|
||||
= render 'projects', projects: @projects
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
- @hide_top_links = true
|
||||
- page_title _("Projects")
|
||||
- page_title _("Explore projects")
|
||||
- header_title _("Projects"), dashboard_projects_path
|
||||
|
||||
= render_dashboard_ultimate_trial(current_user)
|
||||
|
||||
- if current_user
|
||||
= render 'dashboard/projects_head', project_tab_filter: :starred
|
||||
- else
|
||||
= render 'explore/head'
|
||||
.page-title-holder.gl-display-flex.gl-align-items-center
|
||||
%h1.page-title.gl-font-size-h-display= page_title
|
||||
.page-title-controls
|
||||
= render Pajamas::ButtonComponent.new(href: new_project_path, variant: :confirm) do
|
||||
= _("New project")
|
||||
|
||||
= render 'explore/projects/nav'
|
||||
= render 'projects', projects: @projects
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- @hide_top_links = false
|
||||
- @no_container = true
|
||||
- add_to_breadcrumbs _("Topics"), topics_explore_projects_path
|
||||
- breadcrumb_title @topic.title_or_name
|
||||
- page_title @topic.title_or_name, _("Topics")
|
||||
- max_topic_title_length = 50
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
- @hide_top_links = true
|
||||
- page_title _("Topics")
|
||||
- breadcrumb_title _("Topics")
|
||||
- page_title _("Explore topics")
|
||||
- header_title _("Topics"), topics_explore_projects_path
|
||||
|
||||
= render_dashboard_ultimate_trial(current_user)
|
||||
|
||||
- if current_user
|
||||
= render 'explore/topics/head'
|
||||
- else
|
||||
= render 'explore/head'
|
||||
= render 'explore/topics/head'
|
||||
|
||||
= render partial: 'shared/topics/list'
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
- @hide_top_links = true
|
||||
- page_title _("Projects")
|
||||
- page_title _("Explore projects")
|
||||
- header_title _("Projects"), dashboard_projects_path
|
||||
|
||||
= render_dashboard_ultimate_trial(current_user)
|
||||
|
||||
- if current_user
|
||||
= render 'dashboard/projects_head', project_tab_filter: :explore_trending
|
||||
- else
|
||||
= render 'explore/head'
|
||||
.page-title-holder.gl-display-flex.gl-align-items-center
|
||||
%h1.page-title.gl-font-size-h-display= page_title
|
||||
.page-title-controls
|
||||
- if current_user&.can_create_project?
|
||||
= render Pajamas::ButtonComponent.new(href: new_project_path, variant: :confirm) do
|
||||
= _("New project")
|
||||
|
||||
= render 'explore/projects/nav'
|
||||
= render 'projects', projects: @projects
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue