diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-04 15:11:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-04 15:11:58 +0300 |
commit | 0327ce54a7e315b3aa6f80cc4e540fbb6792f2e3 (patch) | |
tree | f27611f4cc36d1aa9215e5bd0ff4787e60e77bd0 /app | |
parent | 266aad4e70f3c642583ab60894b27b2622095cd8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
45 files changed, 63 insertions, 818 deletions
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/success_message.vue b/app/assets/javascripts/ide/components/commit_sidebar/success_message.vue index 5a7d7917f8a..5272c4310d8 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/success_message.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/success_message.vue @@ -1,7 +1,11 @@ <script> +import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; import { mapState } from 'vuex'; export default { + directives: { + SafeHtml, + }, computed: { ...mapState(['lastCommitMsg', 'committedStateSvgPath']), }, @@ -16,7 +20,7 @@ export default { <div class="gl-mr-3 gl-ml-3"> <div class="text-content text-center"> <h4>{{ __('All changes are committed') }}</h4> - <p v-html="lastCommitMsg /* eslint-disable-line vue/no-v-html */"></p> + <p v-safe-html="lastCommitMsg"></p> </div> </div> </div> diff --git a/app/assets/javascripts/notes/components/note_actions.vue b/app/assets/javascripts/notes/components/note_actions.vue index 44d0c741d5a..e2a2edd7344 100644 --- a/app/assets/javascripts/notes/components/note_actions.vue +++ b/app/assets/javascripts/notes/components/note_actions.vue @@ -257,7 +257,7 @@ export default { <user-access-role-badge v-if="isAuthor" v-gl-tooltip - class="gl-mx-3 d-none d-md-inline-block" + class="gl-mr-3 d-none d-md-inline-block" :title="displayAuthorBadgeText" > {{ __('Author') }} @@ -265,7 +265,7 @@ export default { <user-access-role-badge v-if="accessLevel" v-gl-tooltip - class="gl-mx-3" + class="gl-mr-3" :title="displayMemberBadgeText" > {{ accessLevel }} @@ -273,7 +273,7 @@ export default { <user-access-role-badge v-else-if="isContributor" v-gl-tooltip - class="gl-mx-3" + class="gl-mr-3" :title="displayContributorBadgeText" > {{ __('Contributor') }} diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue index 59a3c9185b9..3aded60e5c8 100644 --- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue +++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue @@ -151,9 +151,9 @@ export default { return this.mr.hasCI || this.hasPipelineMustSucceedConflict; }, shouldSuggestPipelines() { - return ( - !this.mr.hasCI && this.mr.mergeRequestAddCiConfigPath && !this.mr.isDismissedSuggestPipeline - ); + const { hasCI, mergeRequestAddCiConfigPath, isDismissedSuggestPipeline } = this.mr; + + return !hasCI && mergeRequestAddCiConfigPath && !isDismissedSuggestPipeline; }, shouldRenderCodeQuality() { return this.mr?.codequalityReportsPath; diff --git a/app/assets/stylesheets/components/batch_comments/review_bar.scss b/app/assets/stylesheets/components/batch_comments/review_bar.scss index bcd06974813..6f5c5c5a080 100644 --- a/app/assets/stylesheets/components/batch_comments/review_bar.scss +++ b/app/assets/stylesheets/components/batch_comments/review_bar.scss @@ -38,59 +38,6 @@ margin: 0 auto; } -.review-preview-dropdown { - .review-preview-item.menu-item { - display: flex; - flex-wrap: wrap; - padding: 8px 16px; - cursor: pointer; - - &:not(.is-last) { - border-bottom: 1px solid $list-border; - } - } - - .dropdown-menu { - top: auto; - bottom: 36px; - - &.show { - max-height: 400px; - - @include media-breakpoint-down(xs) { - width: calc(100vw - 32px); - } - } - } - - .dropdown-content { - max-height: 300px; - } - - .dropdown-title { - padding: $grid-size 25px $gl-padding; - margin-bottom: 0; - } - - .dropdown-footer { - margin-top: 0; - } - - .dropdown-menu-close { - top: 6px; - } -} - -.review-preview-dropdown-toggle { - svg.s16 { - width: 15px; - height: 15px; - margin-top: -1px; - top: 3px; - margin-left: 4px; - } -} - .review-preview-item-header { display: flex; align-items: center; diff --git a/app/assets/stylesheets/components/design_management/design.scss b/app/assets/stylesheets/components/design_management/design.scss index 579a86a94a4..a3cbdb9ae86 100644 --- a/app/assets/stylesheets/components/design_management/design.scss +++ b/app/assets/stylesheets/components/design_management/design.scss @@ -70,11 +70,6 @@ $t-gray-a-16-design-pin: rgba($black, 0.16); } } -.design-presentation-wrapper { - top: 0; - left: 0; -} - .design-scaler-wrapper { bottom: 0; left: 50%; diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index 4b84dae5355..549289450a4 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -1,9 +1,3 @@ -.centered-light-block { - text-align: center; - color: $gl-text-color; - margin: 20px; -} - .nothing-here-block { text-align: center; padding: 16px; @@ -83,22 +77,6 @@ > p:last-child { margin-bottom: 0; } - - .block-controls { - display: flex; - justify-content: flex-end; - flex: 1; - - .control { - float: left; - margin-left: 10px; - } - } - - &.build-content { - background-color: $white; - border-top: 0; - } } .sub-header-block { @@ -169,31 +147,6 @@ } } - &.groups-cover-block { - background: $white; - border-bottom: 1px solid $border-color; - text-align: left; - padding: 24px 0; - - .group-info { - .cover-title { - margin-top: 9px; - } - - p { - margin-bottom: 0; - } - } - - @include media-breakpoint-down(xs) { - text-align: center; - - .avatar { - float: none; - } - } - } - &.user-cover-block { padding: 24px 0 0; @@ -214,19 +167,6 @@ margin-right: auto; } } - - .group-info { - h1 { - display: inline; - font-weight: $gl-font-weight-normal; - font-size: 24px; - color: $gl-text-color; - } - } -} - -.block-connector { - margin-top: -1px; } .content-block { @@ -332,10 +272,6 @@ } } -.flex-right { - margin-left: auto; -} - .code-block { white-space: pre; overflow-x: auto; diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index ceccec8c5cb..e458dfd5316 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -247,13 +247,6 @@ } } -.btn-terminal { - svg { - height: 14px; - width: $default-icon-size; - } -} - .btn-lg { padding: 12px 20px; } @@ -281,12 +274,6 @@ } } -.btn-align-content { - display: flex; - justify-content: center; - align-items: center; -} - .btn-group { &.btn-grouped { @include btn-with-margin; @@ -347,16 +334,6 @@ } } -.btn-static { - background-color: $gray-light !important; - border: 1px solid $border-gray-normal; - cursor: default; - - &:active { - box-shadow: inset 0 0 0 $white; - } -} - .btn-inverted { &-secondary { @include btn-outline($white, $blue-500, $blue-500, $blue-100, $blue-700, $blue-500, $blue-200, $blue-600, $blue-800); diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index a7ce19ffc69..354d2737894 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -175,10 +175,6 @@ p.time { text-shadow: none; } -.thin-area { - height: 150px; -} - // Fix issue with notes & lists creating a bunch of bottom borders. li.note { img { max-width: 100%; } @@ -298,10 +294,6 @@ img.emoji { margin: 0; } -.space-right { - margin-right: 10px; -} - .alert { margin-bottom: $gl-padding; } @@ -363,14 +355,6 @@ img.emoji { } } -.outline-0 { - outline: 0; - - &:focus { - outline: 0; - } -} - /** COMMON CLASSES **/ /** 🚨 Do not use these classes — they are deprecated and being removed. 🚨 diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss index 8c2d43eeaef..7f960e3da51 100644 --- a/app/assets/stylesheets/framework/dropdowns.scss +++ b/app/assets/stylesheets/framework/dropdowns.scss @@ -425,21 +425,10 @@ } } -.dropdown-menu-drop-up { - top: auto; - bottom: 100%; -} - .dropdown-menu-large { width: 340px; } -.dropdown-menu-no-wrap { - a { - white-space: normal; - } -} - .dropdown-menu-full-width { width: 100%; } @@ -662,13 +651,6 @@ padding-right: 10px; } -.dropdown-due-date-footer { - padding-top: 0; - margin-left: 10px; - margin-right: 10px; - border-top: 0; -} - .dropdown-footer-list { font-size: 14px; @@ -742,24 +724,6 @@ } } -.dropdown-menu-due-date { - .dropdown-content { - max-height: 230px; - } - - .pika-single { - position: relative !important; - top: 0 !important; - border: 0; - box-shadow: none; - } - - .pika-lendar { - margin-top: -5px; - margin-bottom: 0; - } -} - .dropdown-menu-inner-title { display: block; color: $gl-text-color; diff --git a/app/assets/stylesheets/framework/job_log.scss b/app/assets/stylesheets/framework/job_log.scss index d48a5116677..0a493b3a977 100644 --- a/app/assets/stylesheets/framework/job_log.scss +++ b/app/assets/stylesheets/framework/job_log.scss @@ -42,10 +42,6 @@ } } -.log-duration-badge { - background: $gray-300; -} - .loader-animation { @include build-loader-animation; } diff --git a/app/assets/stylesheets/framework/media_object.scss b/app/assets/stylesheets/framework/media_object.scss index 89c561479cc..b573052c14a 100644 --- a/app/assets/stylesheets/framework/media_object.scss +++ b/app/assets/stylesheets/framework/media_object.scss @@ -6,7 +6,3 @@ .media-body { flex: 1; } - -.media-body-wrap { - flex-grow: 1; -} diff --git a/app/assets/stylesheets/framework/modal.scss b/app/assets/stylesheets/framework/modal.scss index 48a18e0d145..c9b17f5d5c4 100644 --- a/app/assets/stylesheets/framework/modal.scss +++ b/app/assets/stylesheets/framework/modal.scss @@ -1,13 +1,3 @@ -.modal-xl { - max-width: 98%; -} - -.modal-1040 { - @include media-breakpoint-up(xl) { - max-width: 1040px; - } -} - .modal-header { background-color: $modal-body-bg; @@ -111,30 +101,3 @@ body.modal-open { } } } - -.recaptcha-modal .recaptcha-form { - display: inline-block; - - .recaptcha { - margin: 0; - } -} - -.issues-import-modal, -.issuable-export-modal { - .modal-body { - padding: 0; - - .modal-subheader { - justify-content: flex-start; - align-items: center; - border-bottom: 1px solid $modal-border-color; - padding: 14px; - } - - .modal-text { - padding: $gl-padding-24 $gl-padding; - min-height: $modal-body-height; - } - } -} diff --git a/app/assets/stylesheets/framework/panels.scss b/app/assets/stylesheets/framework/panels.scss index d9c93fed1c4..e5b2b853363 100644 --- a/app/assets/stylesheets/framework/panels.scss +++ b/app/assets/stylesheets/framework/panels.scss @@ -39,10 +39,6 @@ } } -.card-empty-heading { - border-bottom: 0; -} - .card-body { padding: $gl-padding; diff --git a/app/assets/stylesheets/framework/selects.scss b/app/assets/stylesheets/framework/selects.scss index d8ce6826fc1..900cf9fa4db 100644 --- a/app/assets/stylesheets/framework/selects.scss +++ b/app/assets/stylesheets/framework/selects.scss @@ -50,18 +50,6 @@ } } -.namespace-result { - .namespace-kind { - color: $gray-300; - font-weight: $gl-font-weight-normal; - } - - .namespace-path { - margin-left: 10px; - font-weight: $gl-font-weight-bold; - } -} - .ajax-users-dropdown { min-width: 250px !important; } diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss index 6b3201ba2b0..6c7fc25f2d9 100644 --- a/app/assets/stylesheets/framework/sidebar.scss +++ b/app/assets/stylesheets/framework/sidebar.scss @@ -16,21 +16,6 @@ transition: padding $sidebar-transition-duration; } -.nav-header-btn { - padding: 10px $gl-sidebar-padding; - color: inherit; - transition-duration: 0.3s; - position: absolute; - top: 0; - cursor: pointer; - - &:hover, - &:focus { - color: $white; - text-decoration: none; - } -} - .right-sidebar-collapsed { padding-right: 0; diff --git a/app/assets/stylesheets/framework/snippets.scss b/app/assets/stylesheets/framework/snippets.scss index 47184804353..c59e70c80df 100644 --- a/app/assets/stylesheets/framework/snippets.scss +++ b/app/assets/stylesheets/framework/snippets.scss @@ -4,11 +4,6 @@ font-weight: $gl-font-weight-bold; } - .snippet-filename { - color: $gl-text-color-secondary; - font-weight: normal; - } - .snippet-info { color: $gl-text-color-secondary; } diff --git a/app/assets/stylesheets/framework/sortable.scss b/app/assets/stylesheets/framework/sortable.scss index 25868061d04..953c42219a9 100644 --- a/app/assets/stylesheets/framework/sortable.scss +++ b/app/assets/stylesheets/framework/sortable.scss @@ -36,61 +36,6 @@ } } -.related-issues-list-item { - .card-body, - .issuable-info-container { - padding: $gl-padding-4 $gl-padding-4 $gl-padding-4 $gl-padding; - - .block-truncated { - padding: $gl-padding-8 0; - line-height: $gl-btn-line-height; - } - - @include media-breakpoint-down(md) { - padding-left: $gl-padding; - - .block-truncated { - flex-direction: column-reverse; - padding: $gl-padding-4 0; - - .text-secondary { - margin-top: $gl-padding-4; - } - - .issue-token-title-text { - display: block; - } - } - - .issue-item-remove-button { - align-self: baseline; - } - } - - @include media-breakpoint-only(md) { - .block-truncated .issue-token-title-text { - white-space: nowrap; - } - - .issue-item-remove-button { - align-self: center; - } - } - - @include media-breakpoint-down(sm) { - padding-left: $gl-padding-8; - - .block-truncated .issue-token-title-text { - white-space: normal; - } - } - } - - &.is-dragging { - padding: 0; - } -} - .is-dragging { // Important because plugin sets inline CSS opacity: 1 !important; diff --git a/app/assets/stylesheets/framework/zen.scss b/app/assets/stylesheets/framework/zen.scss index 62abf4a7683..10df532e334 100644 --- a/app/assets/stylesheets/framework/zen.scss +++ b/app/assets/stylesheets/framework/zen.scss @@ -40,15 +40,6 @@ border: 0; } -.zen-control-full { - color: $gl-text-color-secondary; - - &:hover { - color: $blue-600; - text-decoration: none; - } -} - .zen-control-leave { display: none; color: $gl-text-color; diff --git a/app/assets/stylesheets/pages/commits.scss b/app/assets/stylesheets/pages/commits.scss index bc4dbf695cf..7f35b8fab43 100644 --- a/app/assets/stylesheets/pages/commits.scss +++ b/app/assets/stylesheets/pages/commits.scss @@ -82,11 +82,6 @@ } } -.commits-compare-switch { - float: left; - margin-right: 9px; -} - .commit-header { padding: 5px 10px; background-color: $gray-light; diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index 59520e629ab..cec8d8a29cc 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -474,31 +474,6 @@ $tabs-holder-z-index: 250; } } } - - .merge-request-labels { - display: inline-block; - } -} - -.merge-request-angle { - text-align: center; - margin: 0 auto; - font-size: 2em; - line-height: 1.1; -} - -// hide mr close link for inline diff comment form -.diff-file .close-mr-link, -.diff-file .reopen-mr-link { - display: none; -} - -.mr-links { - padding-left: $gl-padding-8 + $status-icon-size + $gl-btn-padding; - - &:last-child { - padding-bottom: $gl-padding; - } } .mr-info-list { @@ -649,10 +624,6 @@ $tabs-holder-z-index: 250; } } -.target-branch-select-dropdown-container { - position: relative; -} - .assign-to-me-link { padding-left: 12px; white-space: nowrap; @@ -667,12 +638,6 @@ $tabs-holder-z-index: 250; } } -.merged-buttons { - .btn { - float: left; - } -} - .mr-version-controls { position: relative; z-index: $tabs-holder-z-index + 10; diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss index 3c0f10eb5cb..1c408f6d985 100644 --- a/app/assets/stylesheets/pages/note_form.scss +++ b/app/assets/stylesheets/pages/note_form.scss @@ -24,12 +24,6 @@ margin: $gl-padding 0 0; } - .note-preview-holder { - > p { - overflow-x: auto; - } - } - img { max-width: 100%; } diff --git a/app/assets/stylesheets/pages/notifications.scss b/app/assets/stylesheets/pages/notifications.scss index 298de33888d..2fd2757cf08 100644 --- a/app/assets/stylesheets/pages/notifications.scss +++ b/app/assets/stylesheets/pages/notifications.scss @@ -4,11 +4,6 @@ width: 100%; } - .notification-form { - display: block; - } - - .notifications-btn, .btn-group { width: 100%; } diff --git a/app/assets/stylesheets/pages/profile.scss b/app/assets/stylesheets/pages/profile.scss index de9e0c6f705..af9f10c9a26 100644 --- a/app/assets/stylesheets/pages/profile.scss +++ b/app/assets/stylesheets/pages/profile.scss @@ -1,9 +1,3 @@ -.profile-avatar-form-option { - hr { - margin: 10px 0; - } -} - .avatar-image { margin-bottom: $grid-size; @@ -23,41 +17,6 @@ display: inline-block; } -.private-tokens-reset div.reset-action:not(:first-child) { - padding-top: 15px; -} - -.oauth-buttons { - .btn-group { - margin-right: 10px; - } - - .btn { - line-height: 40px; - height: 42px; - padding: 0 12px; - - img { - width: 32px; - height: 32px; - } - } -} - -// Profile > Account > Two Factor Authentication -.two-factor-new { - .manual-instructions { - h3 { - margin-top: 0; - } - - // Slightly increase the size of the details so they're easier to read - dl { - font-size: 1.1em; - } - } -} - .account-well { padding: 10px; background-color: $gray-light; @@ -191,10 +150,6 @@ } } -.personal-access-tokens-never-expires-label { - color: $note-disabled-comment-color; -} - .created-personal-access-token-container { .btn-clipboard { border: 1px solid $border-color; @@ -266,8 +221,7 @@ } } -table.u2f-registrations, -.webauthn-registrations { +table.u2f-registrations { th:not(:last-child), td:not(:last-child) { border-right: solid 1px transparent; diff --git a/app/assets/stylesheets/pages/profiles/preferences.scss b/app/assets/stylesheets/pages/profiles/preferences.scss index 12386fa66ec..b583d40de79 100644 --- a/app/assets/stylesheets/pages/profiles/preferences.scss +++ b/app/assets/stylesheets/pages/profiles/preferences.scss @@ -1,19 +1,3 @@ -.multi-file-editor-options { - label { - margin-right: 20px; - text-align: center; - } - - .preview { - font-size: 0; - - img { - border: 1px solid $border-color-settings; - border-radius: 4px; - } - } -} - .application-theme { $ui-dark-bg: #2e2e2e; $ui-light-bg: #dfdfdf; diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index c330e0709a6..6b4d7c2520c 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -622,12 +622,6 @@ pre.light-well { } } - .star-button { - .icon { - top: 0; - } - } - .icon-container { @include media-breakpoint-down(xs) { margin-right: $gl-padding-8; @@ -938,16 +932,6 @@ pre.light-well { } } -.project-ci-linter { - .ci-editor { - height: 400px; - } - - .ci-template pre { - white-space: pre-wrap; - } -} - .project-badge { opacity: 0.9; diff --git a/app/assets/stylesheets/pages/prometheus.scss b/app/assets/stylesheets/pages/prometheus.scss index a3b6cbdff25..71cbd7d9613 100644 --- a/app/assets/stylesheets/pages/prometheus.scss +++ b/app/assets/stylesheets/pages/prometheus.scss @@ -96,11 +96,6 @@ padding: $gl-padding-8; } -.prometheus-graph-embed { - border: 1px solid $border-color; - border-radius: $border-radius-default; -} - .alert-current-setting { max-width: 240px; @@ -110,233 +105,6 @@ } } -.prometheus-graph-cursor { - position: absolute; - background: $gray-400; - width: 1px; -} - -.prometheus-graph-flag { - display: block; - min-width: 160px; - border: 0; - box-shadow: 0 1px 4px 0 $black-transparent; - - h5 { - padding: 0; - margin: 0; - font-size: 14px; - line-height: 1.2; - } - - .deploy-meta-content { - border-bottom: 1px solid $white-dark; - - svg { - height: 15px; - vertical-align: bottom; - } - } - - &.popover { - padding: 0; - - &.left { - left: auto; - right: 0; - margin-right: 10px; - - > .arrow { - right: -14px; - border-left-color: $border-color; - } - - > .arrow::after { - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-left: 4px solid $gray-10; - } - - .arrow-shadow { - right: -3px; - box-shadow: 1px 0 9px 0 $black-transparent; - } - } - - &.right { - left: 0; - right: auto; - margin-left: 10px; - - > .arrow { - left: -7px; - border-right-color: $border-color; - } - - > .arrow::after { - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 4px solid $gray-10; - } - - .arrow-shadow { - left: -3px; - box-shadow: 1px 0 8px 0 $black-transparent; - } - } - - > .arrow { - top: 10px; - margin: 0; - } - - .arrow-shadow { - content: ''; - position: absolute; - width: 7px; - height: 7px; - background-color: transparent; - transform: rotate(45deg); - top: 13px; - } - - > .popover-title, - > .popover-content, - > .popover-header, - > .popover-body { - padding: 8px; - white-space: nowrap; - position: relative; - } - - > .popover-title { - background-color: $gray-10; - border-radius: $border-radius-default $border-radius-default 0 0; - } - } - - strong { - font-weight: 600; - } -} - -.prometheus-table { - border-collapse: collapse; - padding: 0; - margin: 0; - - td { - vertical-align: middle; - - + td { - padding-left: 8px; - vertical-align: top; - } - } - - .legend-metric-title { - font-size: 12px; - vertical-align: middle; - } -} - -.prometheus-svg-container { - position: relative; - height: 0; - width: 100%; - padding: 0; - padding-bottom: 100%; - - .text-metric-usage { - fill: $black; - font-weight: $gl-font-weight-normal; - font-size: 12px; - } - - > svg { - position: absolute; - height: 100%; - width: 100%; - left: 0; - top: 0; - - text { - fill: $gl-text-color; - stroke-width: 0; - } - - .text-metric-bold { - font-weight: $gl-font-weight-bold; - } - - .label-axis-text { - fill: $black; - font-weight: $gl-font-weight-normal; - font-size: 10px; - } - - .legend-axis-text { - fill: $black; - } - - .tick { - > line { - stroke: $gray-darker; - } - - > text { - fill: $gray-400; - font-size: 10px; - } - } - - .y-label-text, - .x-label-text { - fill: $gray-darkest; - } - - .axis-tick { - stroke: $gray-darker; - } - - .deploy-info-text { - dominant-baseline: text-before-edge; - font-size: 12px; - } - - .deploy-info-text-link { - font-family: $monospace-font; - fill: $blue-600; - - &:hover { - fill: $blue-800; - } - } - - @include media-breakpoint-down(sm) { - .label-axis-text, - .text-metric-usage, - .legend-axis-text { - font-size: 8px; - } - - .tick > text { - font-size: 8px; - } - } - } -} - -.prometheus-table-row-highlight { - background-color: $gray-100; -} - -.prometheus-graph-overlay { - fill: none; - opacity: 0; - pointer-events: all; -} - .prometheus-panel-builder { .preview-date-time-picker { // same as in .dropdown-menu-toggle diff --git a/app/assets/stylesheets/pages/settings.scss b/app/assets/stylesheets/pages/settings.scss index aa9ebfe2968..57745ab06ed 100644 --- a/app/assets/stylesheets/pages/settings.scss +++ b/app/assets/stylesheets/pages/settings.scss @@ -154,17 +154,6 @@ } } -.token-token-container { - #impersonation-token-token { - width: 80%; - display: inline; - } - - .btn-clipboard { - margin-left: 5px; - } -} - .visibility-level-setting { .form-check { margin-bottom: 10px; @@ -219,31 +208,6 @@ } } -.nested-settings { - padding-left: 20px; -} - -.input-btn-group { - display: flex; - - .input-large { - flex: 1; - } - - .btn { - margin-left: 10px; - } -} - -.content-list > .settings-flex-row { - display: flex; - align-items: center; - - .float-right { - margin-left: auto; - } -} - .prometheus-metrics-monitoring { .card { .card-toggle { @@ -326,10 +290,6 @@ } } -.personal-access-tokens-never-expires-label { - color: $note-disabled-comment-color; -} - .created-deploy-token-container { .deploy-token-field { width: 90%; diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss index 5765156f26c..33c66648718 100644 --- a/app/assets/stylesheets/pages/tree.scss +++ b/app/assets/stylesheets/pages/tree.scss @@ -223,11 +223,6 @@ min-height: 200px; } -.upload-link { - font-weight: $gl-font-weight-normal; - color: $blue-600; -} - .repo-charts { .sub-header { margin: 20px 0; diff --git a/app/controllers/projects/ci/daily_build_group_report_results_controller.rb b/app/controllers/projects/ci/daily_build_group_report_results_controller.rb index fee216da492..b2b5e096105 100644 --- a/app/controllers/projects/ci/daily_build_group_report_results_controller.rb +++ b/app/controllers/projects/ci/daily_build_group_report_results_controller.rb @@ -4,7 +4,7 @@ class Projects::Ci::DailyBuildGroupReportResultsController < Projects::Applicati before_action :authorize_read_build_report_results! before_action :validate_param_type! - feature_category :continuous_integration + feature_category :code_testing def index respond_to do |format| diff --git a/app/graphql/mutations/issues/create.rb b/app/graphql/mutations/issues/create.rb index 32f96f1bfe6..70a8f539ccf 100644 --- a/app/graphql/mutations/issues/create.rb +++ b/app/graphql/mutations/issues/create.rb @@ -71,7 +71,7 @@ module Mutations def resolve(project_path:, **attributes) project = authorized_find!(project_path) - params = build_create_issue_params(attributes.merge(author_id: current_user.id)) + params = build_create_issue_params(attributes.merge(author_id: current_user.id), project) spam_params = ::Spam::SpamParams.new_from_request(request: context[:request]) issue = ::Issues::CreateService.new(project: project, current_user: current_user, params: params, spam_params: spam_params).execute @@ -88,7 +88,8 @@ module Mutations private - def build_create_issue_params(params) + # _project argument is unused here, but it is necessary on the EE version of the method + def build_create_issue_params(params, _project) params[:milestone_id] &&= params[:milestone_id]&.model_id params[:assignee_ids] &&= params[:assignee_ids].map { |assignee_id| assignee_id&.model_id } params[:label_ids] &&= params[:label_ids].map { |label_id| label_id&.model_id } diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index a19c00f20db..5709bc26956 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -194,7 +194,6 @@ module Ci add_authentication_token_field :token, encrypted: :required before_save :ensure_token - before_destroy { unscoped_project } after_save :stick_build_if_status_changed @@ -1156,10 +1155,6 @@ module Ci self.update(erased_by: user, erased_at: Time.current, artifacts_expire_at: nil) end - def unscoped_project - @unscoped_project ||= Project.unscoped.find_by(id: project_id) - end - def environment_url options&.dig(:environment, :url) || persisted_environment&.external_url end diff --git a/app/models/concerns/packages/debian/distribution.rb b/app/models/concerns/packages/debian/distribution.rb index 196bec04be6..ff52769fce8 100644 --- a/app/models/concerns/packages/debian/distribution.rb +++ b/app/models/concerns/packages/debian/distribution.rb @@ -96,18 +96,8 @@ module Packages architectures.pluck(:name).sort end - def needs_update? - !file.exists? || time_duration_expired? - end - private - def time_duration_expired? - return false unless valid_time_duration_seconds.present? - - updated_at + valid_time_duration_seconds.seconds + 6.hours < Time.current - end - def unique_codename_and_suite errors.add(:codename, _('has already been taken as Suite')) if codename_exists_as_suite? errors.add(:suite, _('has already been taken as Codename')) if suite_exists_as_codename? diff --git a/app/models/namespace.rb b/app/models/namespace.rb index f7a5b976716..da75aa7b046 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -44,6 +44,8 @@ class Namespace < ApplicationRecord # This should _not_ be `inverse_of: :namespace`, because that would also set # `user.namespace` when this user creates a group with themselves as `owner`. + # TODO: can this be moved into the UserNamespace class? + # evaluate in issue https://gitlab.com/gitlab-org/gitlab/-/issues/341070 belongs_to :owner, class_name: "User" belongs_to :parent, class_name: "Namespace" diff --git a/app/models/user.rb b/app/models/user.rb index f56506066ae..f4e6069ac9a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -112,9 +112,14 @@ class User < ApplicationRecord # # Namespace for personal projects - # TODO: change to `type: Namespaces::UserNamespace.sti_name` when - # working on issue https://gitlab.com/gitlab-org/gitlab/-/issues/341070 - has_one :namespace, -> { where(type: [nil, Namespaces::UserNamespace.sti_name]) }, dependent: :destroy, foreign_key: :owner_id, inverse_of: :owner, autosave: true # rubocop:disable Cop/ActiveRecordDependent + # TODO: change to `:namespace, -> { where(type: Namespaces::UserNamespace.sti_name}, class_name: 'Namespaces::UserNamespace'...` + # when working on issue https://gitlab.com/gitlab-org/gitlab/-/issues/341070 + has_one :namespace, + -> { where(type: [nil, Namespaces::UserNamespace.sti_name]) }, + dependent: :destroy, # rubocop:disable Cop/ActiveRecordDependent + foreign_key: :owner_id, + inverse_of: :owner, + autosave: true # rubocop:disable Cop/ActiveRecordDependent # Profile has_many :keys, -> { regular_keys }, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent @@ -1437,7 +1442,10 @@ class User < ApplicationRecord namespace.path = username if username_changed? namespace.name = name if name_changed? else - namespace = build_namespace(path: username, name: name) + # TODO: we should no longer need the `type` parameter once we can make the + # the `has_one :namespace` association use the correct class. + # issue https://gitlab.com/gitlab-org/gitlab/-/issues/341070 + namespace = build_namespace(path: username, name: name, type: ::Namespaces::UserNamespace.sti_name) namespace.build_namespace_settings end end diff --git a/app/serializers/merge_request_widget_entity.rb b/app/serializers/merge_request_widget_entity.rb index 1c033dee5ff..1e4289ce774 100644 --- a/app/serializers/merge_request_widget_entity.rb +++ b/app/serializers/merge_request_widget_entity.rb @@ -83,7 +83,10 @@ class MergeRequestWidgetEntity < Grape::Entity end expose :is_dismissed_suggest_pipeline do |_merge_request| - current_user && current_user.dismissed_callout?(feature_name: SUGGEST_PIPELINE) + next true unless current_user + next true unless Gitlab::CurrentSettings.suggest_pipeline_enabled? + + current_user.dismissed_callout?(feature_name: SUGGEST_PIPELINE) end expose :human_access do |merge_request| diff --git a/app/services/base_project_service.rb b/app/services/base_project_service.rb index fb466e61673..1bf4a235a79 100644 --- a/app/services/base_project_service.rb +++ b/app/services/base_project_service.rb @@ -2,6 +2,8 @@ # Base class, scoped by project class BaseProjectService < ::BaseContainerService + include ::Gitlab::Utils::StrongMemoize + attr_accessor :project def initialize(project:, current_user: nil, params: {}) @@ -11,4 +13,12 @@ class BaseProjectService < ::BaseContainerService end delegate :repository, to: :project + + private + + def project_group + strong_memoize(:project_group) do + project.group + end + end end diff --git a/app/services/ci/stuck_builds/drop_running_service.rb b/app/services/ci/stuck_builds/drop_running_service.rb index c543d8a94db..a79224cc231 100644 --- a/app/services/ci/stuck_builds/drop_running_service.rb +++ b/app/services/ci/stuck_builds/drop_running_service.rb @@ -17,8 +17,11 @@ module Ci def running_timed_out_builds if Feature.enabled?(:ci_new_query_for_running_stuck_jobs, default_enabled: :yaml) - running_builds = Ci::Build.running.created_at_before(BUILD_RUNNING_OUTDATED_TIMEOUT.ago).order(created_at: :asc, project_id: :asc) # rubocop: disable CodeReuse/ActiveRecord - Ci::Build.id_in(running_builds).updated_at_before(BUILD_RUNNING_OUTDATED_TIMEOUT.ago) + Ci::Build + .running + .created_at_before(BUILD_RUNNING_OUTDATED_TIMEOUT.ago) + .updated_at_before(BUILD_RUNNING_OUTDATED_TIMEOUT.ago) + .order(created_at: :asc, project_id: :asc) # rubocop:disable CodeReuse/ActiveRecord else Ci::Build.running.updated_at_before(BUILD_RUNNING_OUTDATED_TIMEOUT.ago) end diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 1c294ea9204..802697b66e1 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -194,7 +194,7 @@ :tags: [] - :name: cronjob:ci_delete_unit_tests :worker_name: Ci::DeleteUnitTestsWorker - :feature_category: :continuous_integration + :feature_category: :code_testing :has_external_dependencies: :urgency: :low :resource_boundary: :unknown @@ -203,7 +203,7 @@ :tags: [] - :name: cronjob:ci_pipeline_artifacts_expire_artifacts :worker_name: Ci::PipelineArtifacts::ExpireArtifactsWorker - :feature_category: :continuous_integration + :feature_category: :build_artifacts :has_external_dependencies: :urgency: :low :resource_boundary: :unknown @@ -302,7 +302,7 @@ :tags: [] - :name: cronjob:expire_build_artifacts :worker_name: ExpireBuildArtifactsWorker - :feature_category: :continuous_integration + :feature_category: :build_artifacts :has_external_dependencies: :urgency: :low :resource_boundary: :unknown @@ -2098,7 +2098,7 @@ :tags: [] - :name: expire_build_instance_artifacts :worker_name: ExpireBuildInstanceArtifactsWorker - :feature_category: :continuous_integration + :feature_category: :build_artifacts :has_external_dependencies: :urgency: :low :resource_boundary: :unknown @@ -2465,15 +2465,6 @@ :weight: 1 :idempotent: :tags: [] -- :name: pages_remove - :worker_name: PagesRemoveWorker - :feature_category: :pages - :has_external_dependencies: - :urgency: :low - :resource_boundary: :unknown - :weight: 1 - :idempotent: - :tags: [] - :name: pages_transfer :worker_name: PagesTransferWorker :feature_category: :pages diff --git a/app/workers/ci/delete_unit_tests_worker.rb b/app/workers/ci/delete_unit_tests_worker.rb index d5bb72ce80c..01d909773d2 100644 --- a/app/workers/ci/delete_unit_tests_worker.rb +++ b/app/workers/ci/delete_unit_tests_worker.rb @@ -10,7 +10,7 @@ module Ci include CronjobQueue # rubocop:enable Scalability/CronWorkerContext - feature_category :continuous_integration + feature_category :code_testing idempotent! def perform diff --git a/app/workers/ci/pipeline_artifacts/expire_artifacts_worker.rb b/app/workers/ci/pipeline_artifacts/expire_artifacts_worker.rb index 2af07cf6f93..cde3d71286e 100644 --- a/app/workers/ci/pipeline_artifacts/expire_artifacts_worker.rb +++ b/app/workers/ci/pipeline_artifacts/expire_artifacts_worker.rb @@ -14,7 +14,7 @@ module Ci deduplicate :until_executed, including_scheduled: true idempotent! - feature_category :continuous_integration + feature_category :build_artifacts def perform service = ::Ci::PipelineArtifacts::DestroyAllExpiredService.new diff --git a/app/workers/expire_build_artifacts_worker.rb b/app/workers/expire_build_artifacts_worker.rb index 65d387f73ed..295703cc1c3 100644 --- a/app/workers/expire_build_artifacts_worker.rb +++ b/app/workers/expire_build_artifacts_worker.rb @@ -10,7 +10,7 @@ class ExpireBuildArtifactsWorker # rubocop:disable Scalability/IdempotentWorker include CronjobQueue # rubocop:enable Scalability/CronWorkerContext - feature_category :continuous_integration + feature_category :build_artifacts def perform service = Ci::JobArtifacts::DestroyAllExpiredService.new diff --git a/app/workers/expire_build_instance_artifacts_worker.rb b/app/workers/expire_build_instance_artifacts_worker.rb index 96378acca08..77b8f59e365 100644 --- a/app/workers/expire_build_instance_artifacts_worker.rb +++ b/app/workers/expire_build_instance_artifacts_worker.rb @@ -7,7 +7,7 @@ class ExpireBuildInstanceArtifactsWorker # rubocop:disable Scalability/Idempoten sidekiq_options retry: 3 - feature_category :continuous_integration + feature_category :build_artifacts # rubocop: disable CodeReuse/ActiveRecord def perform(build_id) diff --git a/app/workers/packages/debian/generate_distribution_worker.rb b/app/workers/packages/debian/generate_distribution_worker.rb index b9b157d25d2..1eff3ea02dd 100644 --- a/app/workers/packages/debian/generate_distribution_worker.rb +++ b/app/workers/packages/debian/generate_distribution_worker.rb @@ -2,7 +2,7 @@ module Packages module Debian - class GenerateDistributionWorker # rubocop:disable Scalability/IdempotentWorker + class GenerateDistributionWorker include ApplicationWorker data_consistency :always diff --git a/app/workers/pages_remove_worker.rb b/app/workers/pages_remove_worker.rb deleted file mode 100644 index 4de99b8654d..00000000000 --- a/app/workers/pages_remove_worker.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -# TODO: remove this worker https://gitlab.com/gitlab-org/gitlab/-/issues/340641 -class PagesRemoveWorker # rubocop:disable Scalability/IdempotentWorker - include ApplicationWorker - - data_consistency :always - - sidekiq_options retry: 3 - feature_category :pages - loggable_arguments 0 - - def perform(project_id) - # no-op - end -end diff --git a/app/workers/stuck_ci_jobs_worker.rb b/app/workers/stuck_ci_jobs_worker.rb index 20bc201f5f0..d87e866d8a7 100644 --- a/app/workers/stuck_ci_jobs_worker.rb +++ b/app/workers/stuck_ci_jobs_worker.rb @@ -21,9 +21,11 @@ class StuckCiJobsWorker # rubocop:disable Scalability/IdempotentWorker return unless try_obtain_lease - Ci::StuckBuilds::DropService.new.execute - - remove_lease + begin + Ci::StuckBuilds::DropService.new.execute + ensure + remove_lease + end end private |