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 $ from 'jquery';
import Vue from 'vue'; import Vue from 'vue';
<<<<<<< HEAD
import IssueCardWeight from 'ee/boards/components/issue_card_weight.vue'; 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 UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
import eventHub from '../eventhub'; import eventHub from '../eventhub';
...@@ -47,7 +50,10 @@ gl.issueBoards.IssueCardInner = Vue.extend({ ...@@ -47,7 +50,10 @@ gl.issueBoards.IssueCardInner = Vue.extend({
}, },
components: { components: {
UserAvatarLink, UserAvatarLink,
<<<<<<< HEAD
IssueCardWeight, IssueCardWeight,
=======
>>>>>>> upstream/master
}, },
computed: { computed: {
numberOverLimit() { numberOverLimit() {
......
...@@ -622,7 +622,7 @@ ...@@ -622,7 +622,7 @@
} }
.dropdown-content { .dropdown-content {
max-height: $dropdown-max-height; max-height: 252px;
overflow-y: auto; overflow-y: auto;
} }
...@@ -699,6 +699,31 @@ ...@@ -699,6 +699,31 @@
border-radius: $border-radius-base; 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-menu-due-date {
.dropdown-content { .dropdown-content {
max-height: 230px; max-height: 230px;
......
...@@ -152,3 +152,4 @@ ...@@ -152,3 +152,4 @@
.sidebar-collapsed-icon .sidebar-collapsed-value { .sidebar-collapsed-icon .sidebar-collapsed-value {
font-size: 12px; font-size: 12px;
} }
...@@ -32,8 +32,12 @@ ...@@ -32,8 +32,12 @@
.dropdown-menu-issues-board-new { .dropdown-menu-issues-board-new {
width: 320px; width: 320px;
.open & {
max-height: 400px;
}
.dropdown-content { .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 { .divergence-graph {
padding: 12px 12px 0 0; padding: 0 6px;
float: right;
.graph-side { .graph-side {
position: relative; position: relative;
...@@ -53,3 +64,9 @@ ...@@ -53,3 +64,9 @@
background-color: $divergence-graph-separator-bg; background-color: $divergence-graph-separator-bg;
} }
} }
.divergence-graph,
.branch-item .controls {
flex: 0 0 auto;
white-space: nowrap;
}
...@@ -162,17 +162,14 @@ ...@@ -162,17 +162,14 @@
* Last push widget * Last push widget
*/ */
.event-last-push { .event-last-push {
overflow: auto;
width: 100%; width: 100%;
display: flex;
align-items: center;
.event-last-push-text { .event-last-push-text {
@include str-truncated(100%); @include str-truncated(100%);
padding: 4px 0;
font-size: 13px; font-size: 13px;
float: left; margin-right: $gl-padding;
margin-right: -150px;
padding-right: 150px;
line-height: 20px;
} }
} }
......
...@@ -26,9 +26,15 @@ ...@@ -26,9 +26,15 @@
} }
} }
.dropdown-menu-labels {
.dropdown-content {
max-height: 135px;
}
}
.dropdown-new-label { .dropdown-new-label {
.dropdown-content { .dropdown-content {
max-height: 260px; max-height: 136px;
} }
} }
......
...@@ -112,7 +112,7 @@ input[type="checkbox"]:hover { ...@@ -112,7 +112,7 @@ input[type="checkbox"]:hover {
} }
.dropdown-content { .dropdown-content {
max-height: 350px; max-height: 302px;
} }
} }
......
...@@ -73,7 +73,7 @@ module Ci ...@@ -73,7 +73,7 @@ module Ci
project.pipelines project.pipelines
.where(ref: pipeline.ref) .where(ref: pipeline.ref)
.where.not(id: pipeline.id) .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 .created_or_pending
end end
......
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
= render "layouts/header/ee_license_banner" = render "layouts/header/ee_license_banner"
= render "layouts/broadcast" = render "layouts/broadcast"
= render 'layouts/header/read_only_banner' = render 'layouts/header/read_only_banner'
<<<<<<< HEAD
= render "layouts/nav/ee/classification_level_banner" = render "layouts/nav/ee/classification_level_banner"
=======
>>>>>>> upstream/master
= yield :flash_message = yield :flash_message
- unless @hide_breadcrumbs - unless @hide_breadcrumbs
= render "layouts/nav/breadcrumbs" = render "layouts/nav/breadcrumbs"
......
...@@ -13,6 +13,6 @@ ...@@ -13,6 +13,6 @@
#{time_ago_with_tooltip(event.created_at)} #{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 = 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') } #{ _('Create merge request') }
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
- number_commits_behind = diverging_commit_counts[:behind] - number_commits_behind = diverging_commit_counts[:behind]
- number_commits_ahead = diverging_commit_counts[:ahead] - number_commits_ahead = diverging_commit_counts[:ahead]
- merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project)) - merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project))
%li{ class: "js-branch-#{branch.name}" } %li{ class: "branch-item js-branch-#{branch.name}" }
%div .branch-info
= link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated ref-name' do .branch-title
= link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated-100 ref-name' do
= sprite_icon('fork', size: 12) = sprite_icon('fork', size: 12)
= branch.name = branch.name
&nbsp; &nbsp;
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
%span.label.label-info.has-tooltip{ title: s_('Branches|Merged into %{default_branch}') % { default_branch: @repository.root_ref } } %span.label.label-info.has-tooltip{ title: s_('Branches|Merged into %{default_branch}') % { default_branch: @repository.root_ref } }
= s_('Branches|merged') = s_('Branches|merged')
<<<<<<< HEAD
- if protected_branch?(@project, branch) - if protected_branch?(@project, branch)
%span.label.label-success %span.label.label-success
= s_('Branches|protected') = s_('Branches|protected')
...@@ -30,6 +32,34 @@ ...@@ -30,6 +32,34 @@
- if merge_project && create_mr_button?(@repository.root_ref, branch.name) - 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 = link_to create_mr_path(@repository.root_ref, branch.name), class: 'btn btn-default' do
= _('Merge request') = _('Merge request')
=======
- if protected_branch?(@project, branch)
%span.label.label-success
= s_('Branches|protected')
>>>>>>> upstream/master
.block-truncated
- if commit
= render 'projects/branches/commit', commit: commit, project: @project
- else
= s_('Branches|Cant find HEAD commit for this branch')
- 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)
.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 - if branch.name != @repository.root_ref
= link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name), = link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name),
...@@ -70,22 +100,3 @@ ...@@ -70,22 +100,3 @@
remote: true, remote: true,
'aria-label' => s_('Branches|Delete branch') do 'aria-label' => s_('Branches|Delete branch') do
= icon("trash-o") = icon("trash-o")
- 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 commit
= render 'projects/branches/commit', commit: commit, project: @project
- else
%p
= s_('Branches|Cant find HEAD commit for this branch')
---
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 ...@@ -198,7 +198,7 @@ module Gitlab
ENV['GIT_TERMINAL_PROMPT'] = '0' ENV['GIT_TERMINAL_PROMPT'] = '0'
# Gitlab Read-only middleware support # 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| config.generators do |g|
g.factory_bot false g.factory_bot false
......
...@@ -39,6 +39,7 @@ function generateEntries() { ...@@ -39,6 +39,7 @@ function generateEntries() {
} }
pageEntries.forEach(( path ) => generateAutoEntries(path)); pageEntries.forEach(( path ) => generateAutoEntries(path));
<<<<<<< HEAD
// EE-specific auto entries // EE-specific auto entries
const eePageEntries = glob.sync('pages/**/index.js', { const eePageEntries = glob.sync('pages/**/index.js', {
...@@ -48,6 +49,8 @@ function generateEntries() { ...@@ -48,6 +49,8 @@ function generateEntries() {
watchAutoEntries.concat( watchAutoEntries.concat(
path.join(ROOT_PATH, 'ee/app/assets/javascripts/pages/'), path.join(ROOT_PATH, 'ee/app/assets/javascripts/pages/'),
); );
=======
>>>>>>> upstream/master
autoEntriesCount = Object.keys(autoEntries).length; autoEntriesCount = Object.keys(autoEntries).length;
...@@ -218,9 +221,6 @@ const config = { ...@@ -218,9 +221,6 @@ const config = {
names: ['main', 'common', 'webpack_runtime'], names: ['main', 'common', 'webpack_runtime'],
}), }),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// copy pre-compiled vendor libraries verbatim // copy pre-compiled vendor libraries verbatim
new CopyWebpackPlugin([ new CopyWebpackPlugin([
{ {
...@@ -253,12 +253,15 @@ const config = { ...@@ -253,12 +253,15 @@ const config = {
'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'), 'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'),
'vue$': 'vue/dist/vue.esm.js', 'vue$': 'vue/dist/vue.esm.js',
'spec': path.join(ROOT_PATH, 'spec/javascripts'), 'spec': path.join(ROOT_PATH, 'spec/javascripts'),
<<<<<<< HEAD
// EE-only // EE-only
ee: path.join(ROOT_PATH, 'ee/app/assets/javascripts'), ee: path.join(ROOT_PATH, 'ee/app/assets/javascripts'),
ee_empty_states: path.join(ROOT_PATH, 'ee/app/views/shared/empty_states'), 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_icons: path.join(ROOT_PATH, 'ee/app/views/shared/icons'),
ee_images: path.join(ROOT_PATH, 'ee/app/assets/images'), ee_images: path.join(ROOT_PATH, 'ee/app/assets/images'),
=======
>>>>>>> upstream/master
} }
}, },
...@@ -276,6 +279,7 @@ if (IS_PRODUCTION) { ...@@ -276,6 +279,7 @@ if (IS_PRODUCTION) {
minimize: true, minimize: true,
debug: false debug: false
}), }),
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.optimize.UglifyJsPlugin({ new webpack.optimize.UglifyJsPlugin({
sourceMap: true sourceMap: true
}), }),
......
...@@ -23,10 +23,6 @@ When downtime is necessary the migration has to be approved by: ...@@ -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 An up-to-date list of people holding these titles can be found at
<https://about.gitlab.com/team/>. <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 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 or inconsistencies and guard for that. Try to make as few assumptions as
possible about the state of the database. 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 ...@@ -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 only be added in the monthly release, patch releases may only contain data
migrations _unless_ schema changes are absolutely required to solve a problem. 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 ## Downtime Tagging
Every migration must specify if it requires downtime or not, and if it should Every migration must specify if it requires downtime or not, and if it should
......
...@@ -516,10 +516,6 @@ module Gitlab ...@@ -516,10 +516,6 @@ module Gitlab
end end
end end
def sha_from_ref(ref)
rev_parse_target(ref).oid
end
# Return the object that +revspec+ points to. If +revspec+ is an # Return the object that +revspec+ points to. If +revspec+ is an
# annotated tag, then return the tag's target instead. # annotated tag, then return the tag's target instead.
def rev_parse_target(revspec) def rev_parse_target(revspec)
...@@ -2431,6 +2427,10 @@ module Gitlab ...@@ -2431,6 +2427,10 @@ module Gitlab
def rev_list_param(spec) def rev_list_param(spec)
spec == :all ? ['--all'] : spec spec == :all ? ['--all'] : spec
end end
def sha_from_ref(ref)
rev_parse_target(ref).oid
end
end end
end end
end end
...@@ -20,6 +20,7 @@ Disallow: /projects/new ...@@ -20,6 +20,7 @@ Disallow: /projects/new
Disallow: /groups/new Disallow: /groups/new
Disallow: /groups/*/edit Disallow: /groups/*/edit
Disallow: /users Disallow: /users
Disallow: /help
# Global snippets # Global snippets
User-Agent: * 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