Commit c9330f1c authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-03-23

# Conflicts:
#	app/assets/javascripts/boards/components/issue_card_inner.js
#	app/views/layouts/_page.html.haml
#	app/views/projects/branches/_branch.html.haml
#	config/webpack.config.js

[ci skip]
parents 2686c97d 453b5c1c
import $ from 'jquery';
import Vue from 'vue';
<<<<<<< HEAD
import IssueCardWeight from 'ee/boards/components/issue_card_weight.vue';
=======
>>>>>>> upstream/master
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
import eventHub from '../eventhub';
......@@ -47,7 +50,10 @@ gl.issueBoards.IssueCardInner = Vue.extend({
},
components: {
UserAvatarLink,
<<<<<<< HEAD
IssueCardWeight,
=======
>>>>>>> upstream/master
},
computed: {
numberOverLimit() {
......
......@@ -622,7 +622,7 @@
}
.dropdown-content {
max-height: $dropdown-max-height;
max-height: 252px;
overflow-y: auto;
}
......@@ -699,6 +699,31 @@
border-radius: $border-radius-base;
}
.git-revision-dropdown {
.dropdown-content {
max-height: 215px;
}
}
.sidebar-move-issue-dropdown {
.dropdown-content {
max-height: 160px;
}
}
.dropdown-menu-author {
.dropdown-content {
max-height: 215px;
}
}
.dropdown-menu-labels {
.dropdown-content {
max-height: 128px;
}
}
.dropdown-menu-due-date {
.dropdown-content {
max-height: 230px;
......
......@@ -152,3 +152,4 @@
.sidebar-collapsed-icon .sidebar-collapsed-value {
font-size: 12px;
}
......@@ -32,8 +32,12 @@
.dropdown-menu-issues-board-new {
width: 320px;
.open & {
max-height: 400px;
}
.dropdown-content {
max-height: 150px;
max-height: 162px;
}
}
......
.content-list > .branch-item,
.branch-title {
display: flex;
align-items: center;
}
.branch-info {
flex: auto;
min-width: 0;
overflow: hidden;
}
.divergence-graph {
padding: 12px 12px 0 0;
float: right;
padding: 0 6px;
.graph-side {
position: relative;
......@@ -53,3 +64,9 @@
background-color: $divergence-graph-separator-bg;
}
}
.divergence-graph,
.branch-item .controls {
flex: 0 0 auto;
white-space: nowrap;
}
......@@ -162,17 +162,14 @@
* Last push widget
*/
.event-last-push {
overflow: auto;
width: 100%;
display: flex;
align-items: center;
.event-last-push-text {
@include str-truncated(100%);
padding: 4px 0;
font-size: 13px;
float: left;
margin-right: -150px;
padding-right: 150px;
line-height: 20px;
margin-right: $gl-padding;
}
}
......
......@@ -26,9 +26,15 @@
}
}
.dropdown-menu-labels {
.dropdown-content {
max-height: 135px;
}
}
.dropdown-new-label {
.dropdown-content {
max-height: 260px;
max-height: 136px;
}
}
......
......@@ -112,7 +112,7 @@ input[type="checkbox"]:hover {
}
.dropdown-content {
max-height: 350px;
max-height: 302px;
}
}
......
......@@ -73,7 +73,7 @@ module Ci
project.pipelines
.where(ref: pipeline.ref)
.where.not(id: pipeline.id)
.where.not(sha: project.repository.sha_from_ref(pipeline.ref))
.where.not(sha: project.commit(pipeline.ref).try(:id))
.created_or_pending
end
......
......@@ -8,7 +8,10 @@
= render "layouts/header/ee_license_banner"
= render "layouts/broadcast"
= render 'layouts/header/read_only_banner'
<<<<<<< HEAD
= render "layouts/nav/ee/classification_level_banner"
=======
>>>>>>> upstream/master
= yield :flash_message
- unless @hide_breadcrumbs
= render "layouts/nav/breadcrumbs"
......
......@@ -13,6 +13,6 @@
#{time_ago_with_tooltip(event.created_at)}
.pull-right
.flex-right
= link_to new_mr_path_from_push_event(event), title: _("New merge request"), class: "btn btn-info btn-sm qa-create-merge-request" do
#{ _('Create merge request') }
......@@ -5,18 +5,20 @@
- number_commits_behind = diverging_commit_counts[:behind]
- number_commits_ahead = diverging_commit_counts[:ahead]
- merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project))
%li{ class: "js-branch-#{branch.name}" }
%div
= link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated ref-name' do
= sprite_icon('fork', size: 12)
= branch.name
&nbsp;
- if branch.name == @repository.root_ref
%span.label.label-primary default
- elsif merged
%span.label.label-info.has-tooltip{ title: s_('Branches|Merged into %{default_branch}') % { default_branch: @repository.root_ref } }
= s_('Branches|merged')
%li{ class: "branch-item js-branch-#{branch.name}" }
.branch-info
.branch-title
= link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated-100 ref-name' do
= sprite_icon('fork', size: 12)
= branch.name
&nbsp;
- if branch.name == @repository.root_ref
%span.label.label-primary default
- elsif merged
%span.label.label-info.has-tooltip{ title: s_('Branches|Merged into %{default_branch}') % { default_branch: @repository.root_ref } }
= s_('Branches|merged')
<<<<<<< HEAD
- if protected_branch?(@project, branch)
%span.label.label-success
= s_('Branches|protected')
......@@ -30,62 +32,71 @@
- if merge_project && create_mr_button?(@repository.root_ref, branch.name)
= link_to create_mr_path(@repository.root_ref, branch.name), class: 'btn btn-default' do
= _('Merge request')
=======
- if protected_branch?(@project, branch)
%span.label.label-success
= s_('Branches|protected')
>>>>>>> upstream/master
- if branch.name != @repository.root_ref
= link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name),
class: "btn btn-default #{'prepend-left-10' unless merge_project}",
method: :post,
title: s_('Branches|Compare') do
= s_('Branches|Compare')
.block-truncated
- if commit
= render 'projects/branches/commit', commit: commit, project: @project
- else
= s_('Branches|Cant find HEAD commit for this branch')
= render 'projects/buttons/download', project: @project, ref: branch.name, pipeline: @refs_pipelines[branch.name]
- if branch.name != @repository.root_ref
.divergence-graph{ title: s_('%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead') % { number_commits_behind: diverging_count_label(number_commits_behind),
default_branch: @repository.root_ref,
number_commits_ahead: diverging_count_label(number_commits_ahead) } }
.graph-side
.bar.bar-behind{ style: "width: #{number_commits_behind * bar_graph_width_factor}%" }
%span.count.count-behind= diverging_count_label(number_commits_behind)
.graph-separator
.graph-side
.bar.bar-ahead{ style: "width: #{number_commits_ahead * bar_graph_width_factor}%" }
%span.count.count-ahead= diverging_count_label(number_commits_ahead)
- if can?(current_user, :push_code, @project)
- if branch.name == @project.repository.root_ref
%button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip disabled",
disabled: true,
title: s_('Branches|The default branch cannot be deleted') }
= icon("trash-o")
- elsif protected_branch?(@project, branch)
- if can?(current_user, :delete_protected_branch, @project)
%button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip",
title: s_('Branches|Delete protected branch'),
data: { toggle: "modal",
target: "#modal-delete-branch",
delete_path: project_branch_path(@project, branch.name),
branch_name: branch.name,
is_merged: ("true" if merged) } }
= icon("trash-o")
- else
%button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip disabled",
disabled: true,
title: s_('Branches|Only a project master or owner can delete a protected branch') }
= icon("trash-o")
- else
= link_to project_branch_path(@project, branch.name),
class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip",
title: s_('Branches|Delete branch'),
method: :delete,
data: { confirm: s_("Branches|Deleting the '%{branch_name}' branch cannot be undone. Are you sure?") % { branch_name: branch.name } },
remote: true,
'aria-label' => s_('Branches|Delete branch') do
= icon("trash-o")
.controls.hidden-xs<
- if merge_project && create_mr_button?(@repository.root_ref, branch.name)
= link_to create_mr_path(@repository.root_ref, branch.name), class: 'btn btn-default' do
= _('Merge request')
- if branch.name != @repository.root_ref
.divergence-graph{ title: s_('%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead') % { number_commits_behind: diverging_count_label(number_commits_behind),
default_branch: @repository.root_ref,
number_commits_ahead: diverging_count_label(number_commits_ahead) } }
.graph-side
.bar.bar-behind{ style: "width: #{number_commits_behind * bar_graph_width_factor}%" }
%span.count.count-behind= diverging_count_label(number_commits_behind)
.graph-separator
.graph-side
.bar.bar-ahead{ style: "width: #{number_commits_ahead * bar_graph_width_factor}%" }
%span.count.count-ahead= diverging_count_label(number_commits_ahead)
= link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name),
class: "btn btn-default #{'prepend-left-10' unless merge_project}",
method: :post,
title: s_('Branches|Compare') do
= s_('Branches|Compare')
= render 'projects/buttons/download', project: @project, ref: branch.name, pipeline: @refs_pipelines[branch.name]
- if commit
= render 'projects/branches/commit', commit: commit, project: @project
- else
%p
= s_('Branches|Cant find HEAD commit for this branch')
- if can?(current_user, :push_code, @project)
- if branch.name == @project.repository.root_ref
%button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip disabled",
disabled: true,
title: s_('Branches|The default branch cannot be deleted') }
= icon("trash-o")
- elsif protected_branch?(@project, branch)
- if can?(current_user, :delete_protected_branch, @project)
%button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip",
title: s_('Branches|Delete protected branch'),
data: { toggle: "modal",
target: "#modal-delete-branch",
delete_path: project_branch_path(@project, branch.name),
branch_name: branch.name,
is_merged: ("true" if merged) } }
= icon("trash-o")
- else
%button{ class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip disabled",
disabled: true,
title: s_('Branches|Only a project master or owner can delete a protected branch') }
= icon("trash-o")
- else
= link_to project_branch_path(@project, branch.name),
class: "btn btn-remove remove-row js-ajax-loading-spinner has-tooltip",
title: s_('Branches|Delete branch'),
method: :delete,
data: { confirm: s_("Branches|Deleting the '%{branch_name}' branch cannot be undone. Are you sure?") % { branch_name: branch.name } },
remote: true,
'aria-label' => s_('Branches|Delete branch') do
= icon("trash-o")
---
title: Fix UI breakdown for Create merge request button
merge_request: 17821
author: Takuya Noguchi
type: fixed
---
title: UX re-design branch items with flexbox
merge_request: 17832
author: Takuya Noguchi
type: fixed
---
title: Use porcelain commit lookup method on CI::CreatePipelineService
merge_request: 17911
author:
type: fixed
......@@ -198,7 +198,7 @@ module Gitlab
ENV['GIT_TERMINAL_PROMPT'] = '0'
# Gitlab Read-only middleware support
config.middleware.insert_after ActionDispatch::Flash, 'Gitlab::Middleware::ReadOnly'
config.middleware.insert_after ActionDispatch::Flash, '::Gitlab::Middleware::ReadOnly'
config.generators do |g|
g.factory_bot false
......
......@@ -39,6 +39,7 @@ function generateEntries() {
}
pageEntries.forEach(( path ) => generateAutoEntries(path));
<<<<<<< HEAD
// EE-specific auto entries
const eePageEntries = glob.sync('pages/**/index.js', {
......@@ -48,6 +49,8 @@ function generateEntries() {
watchAutoEntries.concat(
path.join(ROOT_PATH, 'ee/app/assets/javascripts/pages/'),
);
=======
>>>>>>> upstream/master
autoEntriesCount = Object.keys(autoEntries).length;
......@@ -218,9 +221,6 @@ const config = {
names: ['main', 'common', 'webpack_runtime'],
}),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// copy pre-compiled vendor libraries verbatim
new CopyWebpackPlugin([
{
......@@ -253,12 +253,15 @@ const config = {
'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'),
'vue$': 'vue/dist/vue.esm.js',
'spec': path.join(ROOT_PATH, 'spec/javascripts'),
<<<<<<< HEAD
// EE-only
ee: path.join(ROOT_PATH, 'ee/app/assets/javascripts'),
ee_empty_states: path.join(ROOT_PATH, 'ee/app/views/shared/empty_states'),
ee_icons: path.join(ROOT_PATH, 'ee/app/views/shared/icons'),
ee_images: path.join(ROOT_PATH, 'ee/app/assets/images'),
=======
>>>>>>> upstream/master
}
},
......@@ -276,6 +279,7 @@ if (IS_PRODUCTION) {
minimize: true,
debug: false
}),
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true
}),
......
......@@ -23,10 +23,6 @@ When downtime is necessary the migration has to be approved by:
An up-to-date list of people holding these titles can be found at
<https://about.gitlab.com/team/>.
The document ["What Requires Downtime?"](what_requires_downtime.md) specifies
various database operations, whether they require downtime and how to
work around that whenever possible.
When writing your migrations, also consider that databases might have stale data
or inconsistencies and guard for that. Try to make as few assumptions as
possible about the state of the database.
......@@ -41,6 +37,18 @@ Migrations that make changes to the database schema (e.g. adding a column) can
only be added in the monthly release, patch releases may only contain data
migrations _unless_ schema changes are absolutely required to solve a problem.
## What Requires Downtime?
The document ["What Requires Downtime?"](what_requires_downtime.md) specifies
various database operations, such as
- [adding, dropping, and renaming columns](what_requires_downtime.md#adding-columns)
- [changing column constraints and types](what_requires_downtime.md#changing-column-constraints)
- [adding and dropping indexes, tables, and foreign keys](what_requires_downtime.md#adding-indexes)
and whether they require downtime and how to work around that whenever possible.
## Downtime Tagging
Every migration must specify if it requires downtime or not, and if it should
......
......@@ -516,10 +516,6 @@ module Gitlab
end
end
def sha_from_ref(ref)
rev_parse_target(ref).oid
end
# Return the object that +revspec+ points to. If +revspec+ is an
# annotated tag, then return the tag's target instead.
def rev_parse_target(revspec)
......@@ -2431,6 +2427,10 @@ module Gitlab
def rev_list_param(spec)
spec == :all ? ['--all'] : spec
end
def sha_from_ref(ref)
rev_parse_target(ref).oid
end
end
end
end
......@@ -20,6 +20,7 @@ Disallow: /projects/new
Disallow: /groups/new
Disallow: /groups/*/edit
Disallow: /users
Disallow: /help
# Global snippets
User-Agent: *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment