Skip to content
Snippets Groups Projects
Commit 72308952 authored by Regis's avatar Regis
Browse files

Merge remote-tracking branch 'gl-ce/9-2-stable' into 9-2-stable-ee

parents 3e779d18 8cba1f51
No related branches found
No related tags found
No related merge requests found
Showing
with 122 additions and 36 deletions
Loading
Loading
@@ -64,6 +64,24 @@
capitalizeStageName(name) {
return name.charAt(0).toUpperCase() + name.slice(1);
},
isFirstColumn(index) {
return index === 0;
},
stageConnectorClass(index, stage) {
let className;
// If it's the first stage column and only has one job
if (index === 0 && stage.groups.length === 1) {
className = 'no-margin';
} else if (index > 0) {
// If it is not the first column
className = 'left-margin';
}
return className;
},
},
};
</script>
Loading
Loading
@@ -82,10 +100,12 @@
v-if="!isLoading"
class="stage-column-list">
<stage-column-component
v-for="stage in state.graph"
v-for="(stage, index) in state.graph"
:title="capitalizeStageName(stage.name)"
:jobs="stage.groups"
:key="stage.name"/>
:key="stage.name"
:stage-connector-class="stageConnectorClass(index, stage)"
:is-first-column="isFirstColumn(index)"/>
</ul>
</div>
</div>
Loading
Loading
Loading
Loading
@@ -13,6 +13,18 @@ export default {
type: Array,
required: true,
},
isFirstColumn: {
type: Boolean,
required: false,
default: false,
},
stageConnectorClass: {
type: String,
required: false,
default: '',
},
},
 
components: {
Loading
Loading
@@ -28,20 +40,27 @@ export default {
jobId(job) {
return `ci-badge-${job.name}`;
},
buildConnnectorClass(index) {
return index === 0 && !this.isFirstColumn ? 'left-connector' : '';
},
},
};
</script>
<template>
<li class="stage-column">
<li
class="stage-column"
:class="stageConnectorClass">
<div class="stage-name">
{{title}}
</div>
<div class="builds-container">
<ul>
<li
v-for="job in jobs"
v-for="(job, index) in jobs"
:key="job.id"
class="build"
:class="buildConnnectorClass(index)"
:id="jobId(job)">
 
<div class="curve"></div>
Loading
Loading
export default {
name: 'MRWidgetSHAMismatch',
template: `
<div class="mr-widget-body">
<button
type="button"
class="btn btn-success btn-small"
disabled="true">
Merge
</button>
<span class="bold">
The source branch HEAD has recently changed. Please reload the page and review the changes before merging.
</span>
</div>
`,
};
Loading
Loading
@@ -16,6 +16,7 @@ export { default as NothingToMergeState } from './components/states/mr_widget_no
export { default as MissingBranchState } from './components/states/mr_widget_missing_branch';
export { default as NotAllowedState } from './components/states/mr_widget_not_allowed';
export { default as ReadyToMergeState } from './ee/components/states/mr_widget_ready_to_merge';
export { default as SHAMismatchState } from './components/states/mr_widget_sha_mismatch';
export { default as UnresolvedDiscussionsState } from './components/states/mr_widget_unresolved_discussions';
export { default as PipelineBlockedState } from './components/states/mr_widget_pipeline_blocked';
export { default as PipelineFailedState } from './components/states/mr_widget_pipeline_failed';
Loading
Loading
Loading
Loading
@@ -16,6 +16,7 @@ import {
MissingBranchState,
NotAllowedState,
ReadyToMergeState,
SHAMismatchState,
UnresolvedDiscussionsState,
PipelineBlockedState,
PipelineFailedState,
Loading
Loading
@@ -205,6 +206,7 @@ export default {
'mr-widget-not-allowed': NotAllowedState,
'mr-widget-missing-branch': MissingBranchState,
'mr-widget-ready-to-merge': ReadyToMergeState,
'mr-widget-sha-mismatch': SHAMismatchState,
'mr-widget-squash-before-merge': SquashBeforeMerge,
'mr-widget-checking': CheckingState,
'mr-widget-unresolved-discussions': UnresolvedDiscussionsState,
Loading
Loading
Loading
Loading
@@ -21,6 +21,8 @@ export default function deviseState(data) {
return 'unresolvedDiscussions';
} else if (this.isPipelineBlocked) {
return 'pipelineBlocked';
} else if (this.hasSHAChanged) {
return 'shaMismatch';
} else if (this.canBeMerged) {
return 'readyToMerge';
}
Loading
Loading
Loading
Loading
@@ -4,6 +4,7 @@ import { getStateKey } from '../dependencies';
export default class MergeRequestStore {
 
constructor(data) {
this.startingSha = data.diff_head_sha;
this.setData(data);
}
 
Loading
Loading
@@ -70,6 +71,7 @@ export default class MergeRequestStore {
this.canMerge = !!data.merge_path;
this.canCreateIssue = currentUser.can_create_issue || false;
this.canCancelAutomaticMerge = !!data.cancel_merge_when_pipeline_succeeds_path;
this.hasSHAChanged = this.sha !== this.startingSha;
this.canBeMerged = data.can_be_merged || false;
 
// Cherry-pick and Revert actions related
Loading
Loading
Loading
Loading
@@ -16,6 +16,7 @@ const stateToComponentMap = {
mergeWhenPipelineSucceeds: 'mr-widget-merge-when-pipeline-succeeds',
failedToMerge: 'mr-widget-failed-to-merge',
autoMergeFailed: 'mr-widget-auto-merge-failed',
shaMismatch: 'mr-widget-sha-mismatch',
};
 
const statesToShowHelpWidget = [
Loading
Loading
import cancelSVG from 'icons/_icon_action_cancel.svg';
import retrySVG from 'icons/_icon_action_retry.svg';
import playSVG from 'icons/_icon_action_play.svg';
import stopSVG from 'icons/_icon_action_stop.svg';
 
export default function getActionIcon(action) {
let icon;
Loading
Loading
@@ -14,6 +15,9 @@ export default function getActionIcon(action) {
case 'icon_action_play':
icon = playSVG;
break;
case 'icon_action_stop':
icon = stopSVG;
break;
default:
icon = '';
}
Loading
Loading
Loading
Loading
@@ -24,10 +24,10 @@
}
 
@mixin scrolling-links() {
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
display: flex;
 
&::-webkit-scrollbar {
display: none;
Loading
Loading
@@ -35,6 +35,7 @@
}
 
.nav-links {
display: flex;
padding: 0;
margin: 0;
list-style: none;
Loading
Loading
@@ -42,17 +43,16 @@
border-bottom: 1px solid $border-color;
 
li {
display: inline-block;
display: flex;
 
a {
display: inline-block;
padding: $gl-btn-padding;
padding-bottom: 11px;
margin-bottom: -1px;
font-size: 14px;
line-height: 28px;
color: $gl-text-color-secondary;
border-bottom: 2px solid transparent;
white-space: nowrap;
 
&:hover,
&:active,
Loading
Loading
@@ -85,10 +85,10 @@
.container-fluid {
background-color: $gray-normal;
margin-bottom: 0;
display: flex;
}
 
li {
&.active a {
border-bottom: none;
color: $link-underline-blue;
Loading
Loading
@@ -137,9 +137,9 @@
}
 
.nav-links {
display: inline-block;
margin-bottom: 0;
border-bottom: none;
float: left;
 
&.wide {
width: 100%;
Loading
Loading
@@ -363,6 +363,10 @@
border-bottom: none;
height: 51px;
 
@media (min-width: $screen-sm-min) {
justify-content: center;
}
li {
a {
padding-top: 10px;
Loading
Loading
@@ -373,6 +377,7 @@
 
.scrolling-tabs-container {
position: relative;
overflow: hidden;
 
.nav-links {
@include scrolling-links();
Loading
Loading
@@ -510,10 +515,7 @@
 
.inner-page-scroll-tabs {
position: relative;
.nav-links {
padding-bottom: 1px;
}
overflow: hidden;
 
.fade-right {
@include fade(left, $white-light);
Loading
Loading
Loading
Loading
@@ -378,7 +378,7 @@
background-color: $row-hover;
}
 
.fa-spinner {
.fa-refresh {
font-size: 13px;
margin-left: 3px;
}
Loading
Loading
Loading
Loading
@@ -23,16 +23,6 @@
.merge-manually {
@extend .fixed-width-container;
}
.merge-request-tabs-holder {
&.affix {
border-bottom: 1px solid $border-color;
.nav-links {
border: 0;
}
}
}
}
 
.merge-request-details {
Loading
Loading
Loading
Loading
@@ -704,6 +704,7 @@
 
.merge-request-tabs-holder {
background-color: $white-light;
border-bottom: 1px solid $border-color;
 
&.affix {
top: 0;
Loading
Loading
@@ -720,6 +721,16 @@
padding-right: $gl-padding;
}
}
.nav-links {
border: 0;
}
}
.merge-request-tabs {
display: flex;
margin-bottom: 0;
padding: 0;
}
 
.limit-container-width {
Loading
Loading
@@ -730,6 +741,15 @@
}
}
 
.merge-request-tabs-container {
display: flex;
justify-content: space-between;
@media (max-width: $screen-xs-max) {
flex-direction: column-reverse;
}
}
.limit-container-width:not(.container-limited) {
.merge-request-tabs-holder:not(.affix) {
.merge-request-tabs-container {
Loading
Loading
Loading
Loading
@@ -618,6 +618,15 @@ ul.notes {
}
 
.line-resolve-all-container {
@media (min-width: $screen-sm-min) {
margin-right: 0;
padding-left: $gl-padding;
}
> div {
white-space: nowrap;
}
.btn-group {
margin-left: -4px;
}
Loading
Loading
Loading
Loading
@@ -388,9 +388,9 @@
content: '';
position: absolute;
top: 48%;
left: -48px;
left: -44px;
border-top: 2px solid $border-color;
width: 48px;
width: 44px;
height: 1px;
}
}
Loading
Loading
@@ -490,7 +490,7 @@
color: $gl-text-color-secondary;
 
// Action Icons in big pipeline-graph nodes
> div > .ci-action-icon-container .ci-action-icon-wrapper {
.ci-action-icon-container .ci-action-icon-wrapper {
height: 30px;
width: 30px;
background: $white-light;
Loading
Loading
@@ -515,7 +515,7 @@
}
}
 
> div > .ci-action-icon-container {
.ci-action-icon-container {
position: absolute;
right: 5px;
top: 5px;
Loading
Loading
@@ -545,7 +545,7 @@
}
}
 
> div > .build-content {
.build-content {
display: inline-block;
padding: 8px 10px 9px;
width: 100%;
Loading
Loading
Loading
Loading
@@ -81,7 +81,7 @@ module TreeHelper
part_path = ""
parts = @path.split('/')
 
yield('..', nil) if parts.count > max_links
yield('..', File.join(*parts.first(parts.count - 2))) if parts.count > max_links
 
parts.each do |part|
part_path = File.join(part_path, part) unless part_path.empty?
Loading
Loading
Loading
Loading
@@ -47,7 +47,7 @@ class Namespace < ActiveRecord::Base
before_destroy(prepend: true) { prepare_for_destroy }
after_destroy :rm_dir
 
scope :root, -> { where('type IS NULL') }
scope :for_user, -> { where('type IS NULL') }
 
scope :with_statistics, -> do
joins('LEFT JOIN project_statistics ps ON ps.namespace_id = namespaces.id')
Loading
Loading
Loading
Loading
@@ -150,7 +150,7 @@ class ChatNotificationService < Service
 
def notify_for_ref?(data)
return true if data[:object_attributes][:tag]
return true unless notify_only_default_branch
return true unless notify_only_default_branch?
 
data[:object_attributes][:ref] == project.default_branch
end
Loading
Loading
Loading
Loading
@@ -1230,8 +1230,6 @@ class Repository
@project.repository_storage_path
end
 
delegate :gitaly_channel, :gitaly_repository, to: :raw_repository
def initialize_raw_repository
Gitlab::Git::Repository.new(project.repository_storage, path_with_namespace + '.git')
end
Loading
Loading
Loading
Loading
@@ -360,7 +360,7 @@ class User < ActiveRecord::Base
end
 
def find_by_full_path(path, follow_redirects: false)
namespace = Namespace.find_by_full_path(path, follow_redirects: follow_redirects)
namespace = Namespace.for_user.find_by_full_path(path, follow_redirects: follow_redirects)
namespace&.owner
end
 
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