Commit bd44f141 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge remote-tracking branch 'upstream/master' into new-issue-by-email

* upstream/master:
  navbar_icon was renamed to custom_icon in:
  Fix spec Don't attempt to disable statement timeout on a MySQL DB
  Disable statement timeout outside of transaction and during adding concurrent index
  Disable PostgreSQL statement timeout during migrations
  Add visibility icon
  Remove previously introduced CSS that will not be used anymore
  Make admin/groups view consistent with dashboard/groups
  Fix New Group button spacing on mobile
  Make CSS consistent again
  Rename .group-controls to .controls
  Remove unnecesary CSS class
  Change bg color of collapsed diff to blue on hover
  Reduce padding on collapsed diff message
  updated changelog
  fixed similar issue with gitlab.com importer because why not!
  fix updated_at not preserved after import - for GitLab projects
  Update permissons links to new page
  CHANGELOG
  Changed collapsed assignee tooltip to users name Fixes tooltip when updating the assignee
  Refresh branch cache after `git gc`
parents 0f7851b7 8b7932c2
......@@ -2,10 +2,11 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.10.0 (unreleased)
- Expose {should,force}_remove_source_branch (Ben Boeckel)
- Disable PostgreSQL statement timeout during migrations
- Fix projects dropdown loading performance with a simplified api cal. !5113 (tiagonbotelho)
- Fix commit builds API, return all builds for all pipelines for given commit. !4849
- Replace Haml with Hamlit to make view rendering faster. !3666
- Expire the branch cache after `git gc` runs
- Refresh the branch cache after `git gc` runs
- Refactor repository paths handling to allow multiple git mount points
- Optimize system note visibility checking by memoizing the visible reference count !5070
- Add Application Setting to configure default Repository Path for new projects
......@@ -35,6 +36,7 @@ v 8.10.0 (unreleased)
- Fix pagination when sorting by columns with lots of ties (like priority)
- The Markdown reference parsers now re-use query results to prevent running the same queries multiple times !5020
- Updated project header design
- Issuable collapsed assignee tooltip is now the users name
- Exclude email check from the standard health check
- Updated layout for Projects, Groups, Users on Admin area !4424
- Fix changing issue state columns in milestone view
......@@ -93,6 +95,7 @@ v 8.10.0 (unreleased)
- Redesign Builds and Pipelines pages
- Change status color and icon for running builds
- Fix markdown rendering for: consecutive labels references, label references that begin with a digit or contains `.`
- Fix last update timestamp on issues not preserved on gitlab.com and project imports
v 8.9.6
- Fix importing of events under notes for GitLab projects. !5154
......
......@@ -56,6 +56,11 @@ class @UsersSelect
username: ''
avatar: ''
$value.html(assigneeTemplate(user))
$collapsedSidebar
.attr('title', user.name)
.tooltip('fixTitle')
$collapsedSidebar.html(collapsedAssigneeTemplate(user))
......@@ -63,7 +68,6 @@ class @UsersSelect
'<% if( avatar ) { %>
<a class="author_link" href="/u/<%- username %>">
<img width="24" class="avatar avatar-inline s24" alt="" src="<%- avatar %>">
<span class="author">Toni Boehm</span>
</a>
<% } else { %>
<i class="fa fa-user"></i>
......
......@@ -16,8 +16,14 @@
font-weight: normal;
font-size: 16px;
line-height: 36px;
&.diff-collapsed {
padding: 5px;
cursor: pointer;
&:hover {
background-color: $row-hover;
}
}
}
......
......@@ -88,13 +88,7 @@
.user-name {
display: inline-block;
font-weight: bold;
}
.controls {
> .btn, > .dropdown {
margin-left: 5px;
}
font-weight: 600;
}
.dropdown {
......
......@@ -38,33 +38,6 @@
margin-right: 15px;
}
}
&.group-admin {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
.group-avatar, .group-details, .group-controls {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.group-details {
flex: 1 1 auto;
flex-direction: column;
min-width: 0;
}
.group-controls {
align-items: center;
a {
margin-left: 5px;
}
}
}
}
.ldap-group-links {
......
......@@ -482,6 +482,10 @@ pre.light-well {
a:hover {
text-decoration: none;
}
> span {
margin-left: 10px;
}
}
}
......
......@@ -185,7 +185,7 @@
padding-right: $gl-padding + 15px;
}
.btn-search {
.btn-search, .btn-new {
width: 100%;
margin-top: 5px;
......
......@@ -45,7 +45,7 @@ module SearchHelper
[
{ category: "Help", label: "API Help", url: help_page_path("api/README") },
{ category: "Help", label: "Markdown Help", url: help_page_path("markdown/markdown") },
{ category: "Help", label: "Permissions Help", url: help_page_path("permissions/permissions") },
{ category: "Help", label: "Permissions Help", url: help_page_path("user/permissions") },
{ category: "Help", label: "Public Access Help", url: help_page_path("public_access/public_access") },
{ category: "Help", label: "Rake Tasks Help", url: help_page_path("raketasks/README") },
{ category: "Help", label: "SSH Keys Help", url: help_page_path("ssh/README") },
......
- css_class = '' unless local_assigns[:css_class]
- css_class = 'no-description' if group.description.blank?
%li.group-row.group-admin{ class: css_class }
.group-avatar
= image_tag group_icon(group), class: 'avatar hidden-xs'
.group-details
%li.group-row{ class: css_class }
.controls
= link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: 'btn'
= link_to 'Delete', [:admin, group], data: { confirm: "Are you sure you want to remove #{group.name}?" }, method: :delete, class: 'btn btn-remove'
.stats
%span
= icon('bookmark')
= number_with_delimiter(group.projects.count)
%span
= icon('users')
= number_with_delimiter(group.users.count)
%span.visibility-icon.has-tooltip{data: { container: 'body', placement: 'left' }, title: visibility_icon_description(group)}
= visibility_level_icon(group.visibility_level, fw: false)
= image_tag group_icon(group), class: "avatar s40 hidden-xs"
.title
= link_to [:admin, group], class: 'group-name' do
= group.name
.group-stats
%span>= pluralize(number_with_delimiter(group.projects.count), 'project')
,
%span= pluralize(number_with_delimiter(group.users.count), 'member')
- if group.description.present?
.description
= markdown(group.description, pipeline: :description)
.group-controls.hidden-xs
= link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: 'btn'
= link_to 'Delete', [:admin, group], data: { confirm: "Are you sure you want to remove #{group.name}?" }, method: :delete, class: 'btn btn-remove'
......@@ -79,7 +79,7 @@
.panel-body.form-holder
%p.light
Read more about project permissions
%strong= link_to "here", help_page_path("permissions/permissions"), class: "vlink"
%strong= link_to "here", help_page_path("user/permissions"), class: "vlink"
= form_tag members_update_admin_group_path(@group), id: "new_project_member", class: "bulk_import", method: :put do
%div
......
......@@ -66,7 +66,7 @@
%ul.projects-list.content-list
- @projects.each_with_index do |project|
%li.project-row
.controls.pull-right
.controls
- if project.archived
%span.label.label-warning archived
%span.label.label-gray
......
......@@ -14,7 +14,7 @@
%span It's you!
.user-email
= mail_to user.email, user.email
.controls.pull-right
.controls
= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn'
- unless user == current_user
.dropdown.inline
......
......@@ -6,7 +6,7 @@
Code, test, and deploy together
.blank-state
.blank-state-icon
= navbar_icon("project", size: 50)
= custom_icon("project", size: 50)
%h3.blank-state-title
You don't have access to any projects right now
%p.blank-state-text
......@@ -24,7 +24,7 @@
- if current_user.can_create_group?
.blank-state
.blank-state-icon
= navbar_icon("group", size: 50)
= custom_icon("group", size: 50)
%h3.blank-state-title
You can create a group for several dependent projects.
%p.blank-state-text
......
......@@ -3,4 +3,4 @@
%h3 Access Denied
%hr
%p You are not allowed to access this page.
%p Read more about project permissions #{link_to "here", help_page_path("permissions/permissions"), class: "vlink"}
%p Read more about project permissions #{link_to "here", help_page_path("user/permissions"), class: "vlink"}
......@@ -12,7 +12,7 @@
= select_tag :access_level, options_for_select(GroupMember.access_level_roles, @group_member.access_level), class: "project-access-select select2"
.help-block
Read more about role permissions
%strong= link_to "here", help_page_path("permissions/permissions"), class: "vlink"
%strong= link_to "here", help_page_path("user/permissions"), class: "vlink"
.form-actions
= f.submit 'Add users to group', class: "btn btn-create"
......@@ -12,7 +12,7 @@
= select_tag :access_level, options_for_select(ProjectMember.access_level_roles, @project_member.access_level), class: "project-access-select select2"
.help-block
Read more about role permissions
%strong= link_to "here", help_page_path("permissions/permissions"), class: "vlink"
%strong= link_to "here", help_page_path("user/permissions"), class: "vlink"
.form-actions
= f.submit 'Add users to project', class: "btn btn-create"
......@@ -8,10 +8,10 @@
%p.prepend-top-20
Protected branches are designed to:
%ul
%li prevent pushes from everybody except #{link_to "masters", help_page_path("permissions/permissions"), class: "vlink"}
%li prevent pushes from everybody except #{link_to "masters", help_page_path("user/permissions"), class: "vlink"}
%li prevent anyone from force pushing to the branch
%li prevent anyone from deleting the branch
%p.append-bottom-0 Read more about #{link_to "project permissions", help_page_path("permissions/permissions"), class: "underlined-link"}
%p.append-bottom-0 Read more about #{link_to "project permissions", help_page_path("user/permissions"), class: "underlined-link"}
.col-lg-9
%h5.prepend-top-0
Protect a branch
......
......@@ -19,7 +19,7 @@
= form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, format: :json, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f|
.block.assignee
.sidebar-collapsed-icon.sidebar-collapsed-user{data: {toggle: "tooltip", placement: "left", container: "body"}, title: (issuable.assignee.to_reference if issuable.assignee)}
.sidebar-collapsed-icon.sidebar-collapsed-user{data: {toggle: "tooltip", placement: "left", container: "body"}, title: (issuable.assignee.name if issuable.assignee)}
- if issuable.assignee
= link_to_member(@project, issuable.assignee, size: 24)
- else
......
......@@ -8,7 +8,9 @@ class GitGarbageCollectWorker
project = Project.find(project_id)
gitlab_shell.gc(project.repository_storage_path, project.path_with_namespace)
# Expire the branch cache in case garbage collection caused a ref lookup to fail
# Refresh the branch cache in case garbage collection caused a ref lookup to fail
project.repository.after_create_branch
project.repository.branch_names
project.repository.has_visible_content?
end
end
......@@ -20,11 +20,19 @@ module Gitlab
if Database.postgresql?
options = options.merge({ algorithm: :concurrently })
disable_statement_timeout
end
add_index(table_name, column_name, options)
end
# Long-running migrations may take more than the timeout allowed by
# the database. Disable the session's statement timeout to ensure
# migrations don't get killed prematurely. (PostgreSQL only)
def disable_statement_timeout
ActiveRecord::Base.connection.execute('SET statement_timeout TO 0') if Database.postgresql?
end
# Updates the value of a column in batches.
#
# This method updates the table in batches of 5% of the total row count.
......@@ -133,6 +141,8 @@ module Gitlab
'in the body of your migration class'
end
disable_statement_timeout
transaction do
add_column(table, column, type, default: nil)
......
......@@ -15,6 +15,7 @@ module Gitlab
end
def execute
ActiveRecord::Base.no_touching do
project_identifier = CGI.escape(project.import_source)
# Issues && Comments
......@@ -39,9 +40,11 @@ module Gitlab
description: body,
title: issue["title"],
state: issue["state"],
updated_at: issue["updated_at"],
author_id: gl_user_id(project, issue["author"]["id"])
)
end
end
true
end
......
......@@ -12,7 +12,10 @@ module Gitlab
json = IO.read(@path)
@tree_hash = ActiveSupport::JSON.decode(json)
@project_members = @tree_hash.delete('project_members')
ActiveRecord::Base.no_touching do
create_relations
end
rescue => e
@shared.error(e)
false
......
......@@ -13,6 +13,10 @@ describe Gitlab::Database::MigrationHelpers, lib: true do
context 'outside a transaction' do
before do
expect(model).to receive(:transaction_open?).and_return(false)
unless Gitlab::Database.postgresql?
allow_any_instance_of(Gitlab::Database::MigrationHelpers).to receive(:disable_statement_timeout)
end
end
context 'using PostgreSQL' do
......
......@@ -30,6 +30,14 @@ describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do
expect(Event.where.not(data: nil).first.data[:ref]).not_to be_empty
end
it 'preserves updated_at on issues' do
restored_project_json
issue = Issue.where(description: 'Aliquam enim illo et possimus.').first
expect(issue.reload.updated_at.to_s).to eq('2016-06-14 15:02:47 UTC')
end
context 'event at forth level of the tree' do
let(:event) { Event.where(title: 'test levels').first }
......
......@@ -16,7 +16,10 @@ describe GitGarbageCollectWorker do
project.repository_storage_path,
project.path_with_namespace).
and_return(true)
expect_any_instance_of(Repository).to receive(:after_create_branch)
expect_any_instance_of(Repository).to receive(:after_create_branch).and_call_original
expect_any_instance_of(Repository).to receive(:branch_names).and_call_original
expect_any_instance_of(Repository).to receive(:branch_count).and_call_original
expect_any_instance_of(Repository).to receive(:has_visible_content?).and_call_original
subject.perform(project.id)
end
......
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