Skip to content
Snippets Groups Projects
Commit cc502768 authored by John Jarvis's avatar John Jarvis
Browse files

Merge commit '207d3100' into 11-9-stable-prepare-rc4

parents 3190b498 207d3100
No related branches found
No related tags found
No related merge requests found
Showing
with 208 additions and 104 deletions
Loading
@@ -243,7 +243,7 @@ export default {
Loading
@@ -243,7 +243,7 @@ export default {
methods: { methods: {
handleCancelClick() { handleCancelClick() {
eventHub.$emit('openConfirmationModal', { eventHub.$emit('openConfirmationModal', {
pipelineId: this.pipeline.id, pipeline: this.pipeline,
endpoint: this.pipeline.cancel_path, endpoint: this.pipeline.cancel_path,
}); });
}, },
Loading
Loading
Loading
@@ -125,10 +125,18 @@ const bindEvents = () => {
Loading
@@ -125,10 +125,18 @@ const bindEvents = () => {
text: 'Spring', text: 'Spring',
icon: '.template-option .icon-spring', icon: '.template-option .icon-spring',
}, },
iosswift: {
text: 'iOS (Swift)',
icon: '.template-option svg.icon-gitlab',
},
dotnetcore: { dotnetcore: {
text: '.NET Core', text: '.NET Core',
icon: '.template-option .icon-dotnet', icon: '.template-option .icon-dotnet',
}, },
android: {
text: 'Android',
icon: '.template-option svg.icon-android',
},
gomicro: { gomicro: {
text: 'Go Micro', text: 'Go Micro',
icon: '.template-option .icon-gomicro', icon: '.template-option .icon-gomicro',
Loading
Loading
Loading
@@ -66,19 +66,23 @@ export default {
Loading
@@ -66,19 +66,23 @@ export default {
   
import(/* webpackChunkName: 'emoji' */ '~/emoji') import(/* webpackChunkName: 'emoji' */ '~/emoji')
.then(Emoji => { .then(Emoji => {
if (this.emoji) { Emoji.initEmojiMap()
this.emojiTag = Emoji.glEmojiTag(this.emoji); .then(() => {
} if (this.emoji) {
this.noEmoji = this.emoji === ''; this.emojiTag = Emoji.glEmojiTag(this.emoji);
this.defaultEmojiTag = Emoji.glEmojiTag('speech_balloon'); }
this.noEmoji = this.emoji === '';
this.defaultEmojiTag = Emoji.glEmojiTag('speech_balloon');
   
this.emojiMenu = new EmojiMenuInModal( this.emojiMenu = new EmojiMenuInModal(
Emoji, Emoji,
toggleEmojiMenuButtonSelector, toggleEmojiMenuButtonSelector,
emojiMenuClass, emojiMenuClass,
this.setEmoji, this.setEmoji,
this.$refs.userStatusForm, this.$refs.userStatusForm,
); );
})
.catch(() => createFlash(__('Failed to load emoji list.')));
}) })
.catch(() => createFlash(__('Failed to load emoji list.'))); .catch(() => createFlash(__('Failed to load emoji list.')));
}, },
Loading
Loading
Loading
@@ -135,7 +135,7 @@ export default {
Loading
@@ -135,7 +135,7 @@ export default {
<span class="dropdown"> <span class="dropdown">
<button <button
type="button" type="button"
class="btn dropdown-toggle" class="btn dropdown-toggle qa-dropdown-toggle"
data-toggle="dropdown" data-toggle="dropdown"
aria-label="Download as" aria-label="Download as"
aria-haspopup="true" aria-haspopup="true"
Loading
@@ -145,12 +145,20 @@ export default {
Loading
@@ -145,12 +145,20 @@ export default {
</button> </button>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li> <li>
<a :href="mr.emailPatchesPath" class="js-download-email-patches" download> <a
:href="mr.emailPatchesPath"
class="js-download-email-patches qa-download-email-patches"
download
>
{{ s__('mrWidget|Email patches') }} {{ s__('mrWidget|Email patches') }}
</a> </a>
</li> </li>
<li> <li>
<a :href="mr.plainDiffPath" class="js-download-plain-diff" download> <a
:href="mr.plainDiffPath"
class="js-download-plain-diff qa-download-plain-diff"
download
>
{{ s__('mrWidget|Plain diff') }} {{ s__('mrWidget|Plain diff') }}
</a> </a>
</li> </li>
Loading
Loading
Loading
@@ -20,7 +20,6 @@ export default {
Loading
@@ -20,7 +20,6 @@ export default {
<div> <div>
<gl-dropdown <gl-dropdown
right right
no-caret
text="Use an existing commit message" text="Use an existing commit message"
variant="link" variant="link"
class="mr-commit-dropdown" class="mr-commit-dropdown"
Loading
Loading
Loading
@@ -329,7 +329,7 @@ export default {
Loading
@@ -329,7 +329,7 @@ export default {
> >
<ul class="border-top content-list commits-list flex-list"> <ul class="border-top content-list commits-list flex-list">
<commit-edit <commit-edit
v-if="squashBeforeMerge" v-if="squashBeforeMerge && shouldShowSquashBeforeMerge"
v-model="squashCommitMessage" v-model="squashCommitMessage"
:label="__('Squash commit message')" :label="__('Squash commit message')"
input-id="squash-message-edit" input-id="squash-message-edit"
Loading
Loading
Loading
@@ -3,7 +3,6 @@
Loading
@@ -3,7 +3,6 @@
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope. * the top of the compiled file, but it's generally better to create a new file per style scope.
*= require jquery.atwho *= require jquery.atwho
*= require select2
*= require_self *= require_self
*= require cropper.css *= require cropper.css
*/ */
Loading
@@ -18,6 +17,7 @@
Loading
@@ -18,6 +17,7 @@
   
@import "../../../node_modules/pikaday/scss/pikaday"; @import "../../../node_modules/pikaday/scss/pikaday";
@import "../../../node_modules/dropzone/dist/basic"; @import "../../../node_modules/dropzone/dist/basic";
@import "../../../node_modules/select2/select2";
   
/* /*
* GitLab UI framework * GitLab UI framework
Loading
Loading
Loading
@@ -5,7 +5,7 @@
Loading
@@ -5,7 +5,7 @@
padding-left: $contextual-sidebar-collapsed-width; padding-left: $contextual-sidebar-collapsed-width;
} }
   
@include media-breakpoint-up(lg) { @include media-breakpoint-up(xl) {
padding-left: $contextual-sidebar-width; padding-left: $contextual-sidebar-width;
} }
   
Loading
@@ -15,7 +15,7 @@
Loading
@@ -15,7 +15,7 @@
} }
   
.page-with-icon-sidebar { .page-with-icon-sidebar {
@include media-breakpoint-up(sm) { @include media-breakpoint-up(md) {
padding-left: $contextual-sidebar-collapsed-width; padding-left: $contextual-sidebar-collapsed-width;
} }
} }
Loading
@@ -71,6 +71,44 @@
Loading
@@ -71,6 +71,44 @@
} }
} }
   
@mixin collapse-contextual-sidebar-content {
.context-header {
height: 60px;
width: $contextual-sidebar-collapsed-width;
a {
padding: 10px 4px;
}
}
.sidebar-top-level-items > li {
.sidebar-sub-level-items {
&:not(.flyout-list) {
display: none;
}
}
}
.nav-icon-container {
margin-right: 0;
}
.toggle-sidebar-button {
padding: 16px;
width: $contextual-sidebar-collapsed-width - 1px;
.collapse-text,
.icon-angle-double-left {
display: none;
}
.icon-angle-double-right {
display: block;
margin: 0;
}
}
}
.nav-sidebar { .nav-sidebar {
transition: width $sidebar-transition-duration, left $sidebar-transition-duration; transition: width $sidebar-transition-duration, left $sidebar-transition-duration;
position: fixed; position: fixed;
Loading
@@ -89,7 +127,7 @@
Loading
@@ -89,7 +127,7 @@
} }
} }
   
&.sidebar-collapsed-desktop { @mixin collapse-contextual-sidebar {
width: $contextual-sidebar-collapsed-width; width: $contextual-sidebar-collapsed-width;
   
.nav-sidebar-inner-scroll { .nav-sidebar-inner-scroll {
Loading
@@ -115,6 +153,10 @@
Loading
@@ -115,6 +153,10 @@
} }
} }
   
&.sidebar-collapsed-desktop {
@include collapse-contextual-sidebar;
}
&.sidebar-expanded-mobile { &.sidebar-expanded-mobile {
left: 0; left: 0;
} }
Loading
@@ -150,7 +192,7 @@
Loading
@@ -150,7 +192,7 @@
} }
} }
   
@include media-breakpoint-down(xs) { @include media-breakpoint-down(sm) {
left: (-$contextual-sidebar-width); left: (-$contextual-sidebar-width);
} }
   
Loading
@@ -167,16 +209,19 @@
Loading
@@ -167,16 +209,19 @@
height: 16px; height: 16px;
width: 16px; width: 16px;
} }
@media (min-width: map-get($grid-breakpoints, md)) and (max-width: map-get($grid-breakpoints, xl) - 1px) {
&:not(.sidebar-expanded-mobile) {
@include collapse-contextual-sidebar;
@include collapse-contextual-sidebar-content;
}
}
} }
   
.nav-sidebar-inner-scroll { .nav-sidebar-inner-scroll {
height: 100%; height: 100%;
width: 100%; width: 100%;
overflow: auto; overflow: auto;
@include media-breakpoint-up(sm) {
overflow: hidden;
}
} }
   
.with-performance-bar .nav-sidebar { .with-performance-bar .nav-sidebar {
Loading
@@ -346,53 +391,13 @@
Loading
@@ -346,53 +391,13 @@
} }
} }
   
.toggle-sidebar-button {
@include media-breakpoint-down(xs) {
display: none;
}
}
.collapse-text { .collapse-text {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
} }
   
.sidebar-collapsed-desktop { .sidebar-collapsed-desktop {
.context-header { @include collapse-contextual-sidebar-content;
height: 60px;
width: $contextual-sidebar-collapsed-width;
a {
padding: 10px 4px;
}
}
.sidebar-top-level-items > li {
.sidebar-sub-level-items {
&:not(.flyout-list) {
display: none;
}
}
}
.nav-icon-container {
margin-right: 0;
}
.toggle-sidebar-button {
padding: 16px;
width: $contextual-sidebar-collapsed-width - 1px;
.collapse-text,
.icon-angle-double-left {
display: none;
}
.icon-angle-double-right {
display: block;
margin: 0;
}
}
} }
   
.fly-out-top-item { .fly-out-top-item {
Loading
@@ -428,16 +433,14 @@
Loading
@@ -428,16 +433,14 @@
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
} }
   
@include media-breakpoint-down(xs) { @include media-breakpoint-down(sm) {
display: flex; display: flex;
align-items: center; align-items: center;
   
i { i {
font-size: 18px; font-size: 18px;
} }
}
   
@include media-breakpoint-down(xs) {
+ .breadcrumbs-links { + .breadcrumbs-links {
padding-left: $gl-padding; padding-left: $gl-padding;
border-left: 1px solid $gl-text-color-quaternary; border-left: 1px solid $gl-text-color-quaternary;
Loading
@@ -445,21 +448,25 @@
Loading
@@ -445,21 +448,25 @@
} }
} }
   
@include media-breakpoint-down(xs) { @include media-breakpoint-down(sm) {
.close-nav-button { .close-nav-button {
display: flex; display: flex;
} }
}
   
.mobile-overlay { .toggle-sidebar-button {
display: none; display: none;
}
   
&.mobile-nav-open { .mobile-overlay {
display: block; display: none;
position: fixed;
background-color: $black-transparent; &.mobile-nav-open {
height: 100%; display: block;
width: 100%; position: fixed;
z-index: 300; background-color: $black-transparent;
height: 100%;
width: 100%;
z-index: 300;
}
} }
} }
Loading
@@ -52,14 +52,16 @@
Loading
@@ -52,14 +52,16 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
   
.btn + .btn { .btn + .btn:not(.dropdown-toggle-split),
.btn + .btn-group {
margin-left: $grid-size; margin-left: $grid-size;
} }
   
@include media-breakpoint-down(xs) { @include media-breakpoint-down(xs) {
flex-direction: column; flex-direction: column;
   
.btn + .btn { .btn + .btn:not(.dropdown-toggle-split),
.btn + .btn-group {
margin-left: 0; margin-left: 0;
margin-top: $grid-size; margin-top: $grid-size;
} }
Loading
Loading
Loading
@@ -157,3 +157,55 @@
Loading
@@ -157,3 +157,55 @@
.sidebar-collapsed-icon .sidebar-collapsed-value { .sidebar-collapsed-icon .sidebar-collapsed-value {
font-size: 12px; font-size: 12px;
} }
.ancestor-tree {
.vertical-timeline {
position: relative;
list-style: none;
margin: 0;
padding: 0;
&::before {
content: '';
border-left: 1px solid $gray-500;
position: absolute;
top: $gl-padding;
bottom: $gl-padding;
left: map-get($spacers, 2) - 1px;
}
&-row {
margin-top: map-get($spacers, 3);
&:nth-child(1) {
margin-top: 0;
}
}
&-icon {
/**
* 2px extra is to give a little more height than needed
* to hide timeline line before/after the element starts/ends
*/
height: map-get($spacers, 4) + 2px;
z-index: 1;
position: relative;
top: -3px;
padding: $gl-padding-4 0;
background-color: $gray-light;
&.opened {
color: $green-500;
}
&.closed {
color: $blue-500;
}
}
&-content {
line-height: initial;
margin-left: $gl-padding-8;
}
}
}
Loading
@@ -161,4 +161,3 @@ table {
Loading
@@ -161,4 +161,3 @@ table {
border-top: 0; border-top: 0;
} }
} }
Loading
@@ -343,6 +343,7 @@ $regular-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-San
Loading
@@ -343,6 +343,7 @@ $regular-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-San
$dropdown-width: 300px; $dropdown-width: 300px;
$dropdown-min-height: 40px; $dropdown-min-height: 40px;
$dropdown-max-height: 312px; $dropdown-max-height: 312px;
$dropdown-max-height-lg: 445px;
$dropdown-vertical-offset: 4px; $dropdown-vertical-offset: 4px;
$dropdown-empty-row-bg: rgba(#000, 0.04); $dropdown-empty-row-bg: rgba(#000, 0.04);
$dropdown-shadow-color: rgba(#000, 0.1); $dropdown-shadow-color: rgba(#000, 0.1);
Loading
Loading
Loading
@@ -53,6 +53,10 @@
Loading
@@ -53,6 +53,10 @@
background-color: $gray-normal; background-color: $gray-normal;
} }
   
a {
color: $gray-700;
}
svg { svg {
vertical-align: middle; vertical-align: middle;
top: -1px; top: -1px;
Loading
Loading
Loading
@@ -341,13 +341,15 @@
Loading
@@ -341,13 +341,15 @@
&.builds .ci-table tr { &.builds .ci-table tr {
height: 71px; height: 71px;
} }
}
   
.build-failures { .ci-table {
th { thead th {
border-top: 0; border-top: 0;
}
} }
}
   
.build-failures {
.build-state { .build-state {
padding: 20px 2px; padding: 20px 2px;
   
Loading
Loading
Loading
@@ -316,8 +316,4 @@
Loading
@@ -316,8 +316,4 @@
   
.push-pull-table { .push-pull-table {
margin-top: 1em; margin-top: 1em;
.mirror-action-buttons {
padding-right: 0;
}
} }
Loading
@@ -3,26 +3,41 @@
Loading
@@ -3,26 +3,41 @@
class Clusters::ApplicationsController < Clusters::BaseController class Clusters::ApplicationsController < Clusters::BaseController
before_action :cluster before_action :cluster
before_action :authorize_create_cluster!, only: [:create] before_action :authorize_create_cluster!, only: [:create]
before_action :authorize_update_cluster!, only: [:update]
   
def create def create
Clusters::Applications::CreateService request_handler do
.new(@cluster, current_user, create_cluster_application_params) Clusters::Applications::CreateService
.execute(request) .new(@cluster, current_user, cluster_application_params)
.execute(request)
end
end
def update
request_handler do
Clusters::Applications::UpdateService
.new(@cluster, current_user, cluster_application_params)
.execute(request)
end
end
private
def request_handler
yield
   
head :no_content head :no_content
rescue Clusters::Applications::CreateService::InvalidApplicationError rescue Clusters::Applications::BaseService::InvalidApplicationError
render_404 render_404
rescue StandardError rescue StandardError
head :bad_request head :bad_request
end end
   
private
def cluster def cluster
@cluster ||= clusterable.clusters.find(params[:id]) || render_404 @cluster ||= clusterable.clusters.find(params[:id]) || render_404
end end
   
def create_cluster_application_params def cluster_application_params
params.permit(:application, :hostname, :email) params.permit(:application, :hostname, :email)
end end
end end
Loading
@@ -6,7 +6,7 @@ module ContinueParams
Loading
@@ -6,7 +6,7 @@ module ContinueParams
   
def continue_params def continue_params
continue_params = params[:continue] continue_params = params[:continue]
return nil unless continue_params return unless continue_params
   
continue_params = continue_params.permit(:to, :notice, :notice_now) continue_params = continue_params.permit(:to, :notice, :notice_now)
continue_params[:to] = safe_redirect_path(continue_params[:to]) continue_params[:to] = safe_redirect_path(continue_params[:to])
Loading
Loading
Loading
@@ -8,7 +8,7 @@ module IssuableActions
Loading
@@ -8,7 +8,7 @@ module IssuableActions
before_action :authorize_destroy_issuable!, only: :destroy before_action :authorize_destroy_issuable!, only: :destroy
before_action :authorize_admin_issuable!, only: :bulk_update before_action :authorize_admin_issuable!, only: :bulk_update
before_action only: :show do before_action only: :show do
push_frontend_feature_flag(:reply_to_individual_notes) push_frontend_feature_flag(:reply_to_individual_notes, default_enabled: true)
end end
end end
   
Loading
Loading
Loading
@@ -16,7 +16,7 @@ module RendersNotes
Loading
@@ -16,7 +16,7 @@ module RendersNotes
private private
   
def preload_max_access_for_authors(notes, project) def preload_max_access_for_authors(notes, project)
return nil unless project return unless project
   
user_ids = notes.map(&:author_id) user_ids = notes.map(&:author_id)
project.team.max_member_access_for_user_ids(user_ids) project.team.max_member_access_for_user_ids(user_ids)
Loading
Loading
Loading
@@ -3,9 +3,16 @@
Loading
@@ -3,9 +3,16 @@
class GraphqlController < ApplicationController class GraphqlController < ApplicationController
# Unauthenticated users have access to the API for public data # Unauthenticated users have access to the API for public data
skip_before_action :authenticate_user! skip_before_action :authenticate_user!
prepend_before_action(only: [:execute]) { authenticate_sessionless_user!(:api) }
# Allow missing CSRF tokens, this would mean that if a CSRF is invalid or missing,
# the user won't be authenticated but can proceed as an anonymous user.
#
# If a CSRF is valid, the user is authenticated. This makes it easier to play
# around in GraphiQL.
protect_from_forgery with: :null_session, only: :execute
   
before_action :check_graphql_feature_flag! before_action :check_graphql_feature_flag!
before_action(only: [:execute]) { authenticate_sessionless_user!(:api) }
   
def execute def execute
variables = Gitlab::Graphql::Variables.new(params[:variables]).to_h variables = Gitlab::Graphql::Variables.new(params[:variables]).to_h
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment