Commit eccf20df authored by 🤖 GitLab Bot 🤖's avatar 🤖 GitLab Bot 🤖

Merge branch 'ce-to-ee-2018-12-10' into 'master'

CE upstream - 2018-12-10 20:21 UTC

Closes gitlab-org/release/framework#21

See merge request gitlab-org/gitlab-ee!8777
parents 0cb9f3a6 c1a5a16c
...@@ -625,7 +625,6 @@ danger-review: ...@@ -625,7 +625,6 @@ danger-review:
<<: *pull-cache <<: *pull-cache
image: registry.gitlab.com/gitlab-org/gitlab-build-images:danger image: registry.gitlab.com/gitlab-org/gitlab-build-images:danger
stage: test stage: test
allow_failure: true
dependencies: [] dependencies: []
before_script: [] before_script: []
only: only:
......
...@@ -836,7 +836,7 @@ GEM ...@@ -836,7 +836,7 @@ GEM
selenium-webdriver (3.12.0) selenium-webdriver (3.12.0)
childprocess (~> 0.5) childprocess (~> 0.5)
rubyzip (~> 1.2) rubyzip (~> 1.2)
sentry-raven (2.7.2) sentry-raven (2.7.4)
faraday (>= 0.7.6, < 1.0) faraday (>= 0.7.6, < 1.0)
settingslogic (2.0.9) settingslogic (2.0.9)
sexp_processor (4.11.0) sexp_processor (4.11.0)
......
...@@ -90,12 +90,6 @@ ...@@ -90,12 +90,6 @@
padding: 2px 8px; padding: 2px 8px;
margin: 5px 2px 5px -8px; margin: 5px 2px 5px -8px;
border-radius: $border-radius-default; border-radius: $border-radius-default;
.tanuki-logo {
@include media-breakpoint-up(sm) {
margin-right: 8px;
}
}
} }
.project-item-select { .project-item-select {
......
...@@ -407,7 +407,7 @@ $award-emoji-positive-add-lines: #bb9c13; ...@@ -407,7 +407,7 @@ $award-emoji-positive-add-lines: #bb9c13;
* Search Box * Search Box
*/ */
$search-input-border-color: rgba($blue-400, 0.8); $search-input-border-color: rgba($blue-400, 0.8);
$search-input-width: 240px; $search-input-width: 200px;
$search-input-active-width: 320px; $search-input-active-width: 320px;
$location-icon-color: #e7e9ed; $location-icon-color: #e7e9ed;
......
...@@ -98,7 +98,6 @@ ...@@ -98,7 +98,6 @@
// Limits the width of the user bio for readability. // Limits the width of the user bio for readability.
max-width: 600px; max-width: 600px;
margin: 10px auto; margin: 10px auto;
padding: 0 16px;
} }
.user-avatar-button { .user-avatar-button {
...@@ -222,7 +221,11 @@ ...@@ -222,7 +221,11 @@
} }
.profile-header { .profile-header {
margin: 0 auto; margin: 0 $gl-padding;
&.with-no-profile-tabs {
margin-bottom: $gl-padding-24;
}
.avatar-holder { .avatar-holder {
width: 90px; width: 90px;
......
...@@ -47,8 +47,8 @@ module NavHelper ...@@ -47,8 +47,8 @@ module NavHelper
class_names class_names
end end
def show_separator? def has_extra_nav_icons?
Gitlab::Sherlock.enabled? || can?(current_user, :read_instance_statistics) Gitlab::Sherlock.enabled? || can?(current_user, :read_instance_statistics) || current_user.admin?
end end
def page_has_markdown? def page_has_markdown?
......
...@@ -4,6 +4,8 @@ module Storage ...@@ -4,6 +4,8 @@ module Storage
module LegacyNamespace module LegacyNamespace
extend ActiveSupport::Concern extend ActiveSupport::Concern
include Gitlab::ShellAdapter
def move_dir def move_dir
proj_with_tags = first_project_with_container_registry_tags proj_with_tags = first_project_with_container_registry_tags
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
class ProjectMember < Member class ProjectMember < Member
SOURCE_TYPE = 'Project'.freeze SOURCE_TYPE = 'Project'.freeze
include Gitlab::ShellAdapter
belongs_to :project, foreign_key: 'source_id' belongs_to :project, foreign_key: 'source_id'
# Make sure project member points only to project as it source # Make sure project member points only to project as it source
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
class Namespace < ActiveRecord::Base class Namespace < ActiveRecord::Base
include CacheMarkdownField include CacheMarkdownField
include Sortable include Sortable
include Gitlab::ShellAdapter
include Gitlab::VisibilityLevel include Gitlab::VisibilityLevel
include Routable include Routable
include AfterCommitQueue include AfterCommitQueue
......
# frozen_string_literal: true # frozen_string_literal: true
class ProtectedBranch < ActiveRecord::Base class ProtectedBranch < ActiveRecord::Base
include Gitlab::ShellAdapter
include ProtectedRef include ProtectedRef
protected_ref_access_levels :merge, :push protected_ref_access_levels :merge, :push
......
# frozen_string_literal: true # frozen_string_literal: true
class ProtectedTag < ActiveRecord::Base class ProtectedTag < ActiveRecord::Base
include Gitlab::ShellAdapter
include ProtectedRef include ProtectedRef
validates :name, uniqueness: { scope: :project_id } validates :name, uniqueness: { scope: :project_id }
......
...@@ -19,7 +19,6 @@ class Repository ...@@ -19,7 +19,6 @@ class Repository
#{REF_ENVIRONMENTS} #{REF_ENVIRONMENTS}
].freeze ].freeze
include Gitlab::ShellAdapter
include Gitlab::RepositoryCacheAdapter include Gitlab::RepositoryCacheAdapter
include Elastic::RepositoriesSearch include Elastic::RepositoriesSearch
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
= brand_header_logo = brand_header_logo
- logo_text = brand_header_logo_type - logo_text = brand_header_logo_type
- if logo_text.present? - if logo_text.present?
%span.logo-text.d-none.d-sm-block %span.logo-text.d-none.d-lg-block.prepend-left-8
= logo_text = logo_text
- if current_user - if current_user
......
-# WAIT! Before adding more items to the nav bar, please see
-# https://gitlab.com/gitlab-org/gitlab-ce/issues/49713 for more information.
%ul.list-unstyled.navbar-sub-nav %ul.list-unstyled.navbar-sub-nav
- if dashboard_nav_link?(:projects) - if dashboard_nav_link?(:projects)
= nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index'], html_options: { id: 'nav-projects-dropdown', class: "home dropdown header-projects qa-projects-dropdown" }) do = nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index'], html_options: { id: 'nav-projects-dropdown', class: "home dropdown header-projects qa-projects-dropdown" }) do
...@@ -16,22 +18,22 @@ ...@@ -16,22 +18,22 @@
= render "layouts/nav/groups_dropdown/show" = render "layouts/nav/groups_dropdown/show"
- if dashboard_nav_link?(:activity) - if dashboard_nav_link?(:activity)
= nav_link(path: 'dashboard#activity', html_options: { class: "d-none d-lg-block d-xl-block" }) do = nav_link(path: 'dashboard#activity', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do
= link_to activity_dashboard_path, class: 'dashboard-shortcuts-activity', title: _('Activity') do = link_to activity_dashboard_path, class: 'dashboard-shortcuts-activity', title: _('Activity') do
= _('Activity') = _('Activity')
- if dashboard_nav_link?(:milestones) - if dashboard_nav_link?(:milestones)
= nav_link(controller: 'dashboard/milestones', html_options: { class: "d-none d-lg-block d-xl-block" }) do = nav_link(controller: 'dashboard/milestones', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do
= link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: _('Milestones') do = link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: _('Milestones') do
= _('Milestones') = _('Milestones')
- if dashboard_nav_link?(:snippets) - if dashboard_nav_link?(:snippets)
= nav_link(controller: 'dashboard/snippets', html_options: { class: "d-none d-lg-block d-xl-block" }) do = nav_link(controller: 'dashboard/snippets', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do
= link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: _('Snippets') do = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: _('Snippets') do
= _('Snippets') = _('Snippets')
- if any_dashboard_nav_link?([:groups, :milestones, :activity, :snippets]) - if any_dashboard_nav_link?([:groups, :milestones, :activity, :snippets])
%li.header-more.dropdown.d-lg-none.d-xl-none %li.header-more.dropdown.d-xl-none{ class: ('d-lg-none' unless has_extra_nav_icons?) }
%a{ href: "#", data: { toggle: "dropdown" } } %a{ href: "#", data: { toggle: "dropdown" } }
= _('More') = _('More')
= sprite_icon('angle-down', css_class: 'caret-down') = sprite_icon('angle-down', css_class: 'caret-down')
...@@ -52,6 +54,21 @@ ...@@ -52,6 +54,21 @@
= link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: _('Snippets') do = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: _('Snippets') do
= _('Snippets') = _('Snippets')
= render_if_exists 'dashboard/operations/nav_link'
- if can?(current_user, :read_instance_statistics)
= nav_link(controller: [:conversational_development_index, :cohorts]) do
= link_to instance_statistics_root_path, title: _('Instance Statistics'), aria: { label: _('Instance Statistics') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= _('Instance Statistics')
- if current_user.admin?
= nav_link(controller: 'admin/dashboard') do
= link_to admin_root_path, class: 'admin-icon qa-admin-area-link', title: _('Admin Area'), aria: { label: _('Admin Area') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= _('Admin Area')
- if Gitlab::Sherlock.enabled?
%li
= link_to sherlock_transactions_path, class: 'admin-icon', title: _('Sherlock Transactions'),
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= _('Sherlock Transactions')
-# Shortcut to Dashboard > Projects -# Shortcut to Dashboard > Projects
- if dashboard_nav_link?(:projects) - if dashboard_nav_link?(:projects)
%li.hidden %li.hidden
...@@ -64,20 +81,18 @@ ...@@ -64,20 +81,18 @@
= link_to '#', class: 'dashboard-shortcuts-web-ide', title: _('Web IDE') do = link_to '#', class: 'dashboard-shortcuts-web-ide', title: _('Web IDE') do
= _('Web IDE') = _('Web IDE')
- if show_separator?
%li.line-separator.d-none.d-sm-block
= render_if_exists 'dashboard/operations/nav_link' = render_if_exists 'dashboard/operations/nav_link'
- if can?(current_user, :read_instance_statistics) - if can?(current_user, :read_instance_statistics)
= nav_link(controller: [:conversational_development_index, :cohorts]) do = nav_link(controller: [:conversational_development_index, :cohorts], html_options: { class: "d-none d-lg-block d-xl-block"}) do
= link_to instance_statistics_root_path, title: _('Instance Statistics'), aria: { label: _('Instance Statistics') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = link_to instance_statistics_root_path, title: _('Instance Statistics'), aria: { label: _('Instance Statistics') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= sprite_icon('chart', size: 18) = sprite_icon('chart', size: 18)
- if current_user.admin? - if current_user.admin?
= nav_link(controller: 'admin/dashboard') do = nav_link(controller: 'admin/dashboard', html_options: { class: "d-none d-lg-block d-xl-block"}) do
= link_to admin_root_path, class: 'admin-icon qa-admin-area-link', title: _('Admin area'), aria: { label: _('Admin area') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = link_to admin_root_path, class: 'admin-icon qa-admin-area-link', title: _('Admin Area'), aria: { label: _('Admin Area') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= sprite_icon('admin', size: 18) = sprite_icon('admin', size: 18)
- if Gitlab::Sherlock.enabled? - if Gitlab::Sherlock.enabled?
%li %li
= link_to sherlock_transactions_path, class: 'admin-icon', title: _('Sherlock Transactions'), = link_to sherlock_transactions_path, class: 'admin-icon d-none d-lg-block d-xl-block', title: _('Sherlock Transactions'),
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= icon('tachometer fw') = icon('tachometer fw')
- if Gitlab::Geo.secondary? && Gitlab::Geo.primary_node_configured? - if Gitlab::Geo.secondary? && Gitlab::Geo.primary_node_configured?
......
...@@ -31,12 +31,12 @@ ...@@ -31,12 +31,12 @@
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= icon('users') = icon('users')
.profile-header .profile-header{ class: [('with-no-profile-tabs' if profile_tabs.empty?)] }
.avatar-holder .avatar-holder
= link_to avatar_icon_for_user(@user, 400), target: '_blank', rel: 'noopener noreferrer' do = link_to avatar_icon_for_user(@user, 400), target: '_blank', rel: 'noopener noreferrer' do
= image_tag avatar_icon_for_user(@user, 90), class: "avatar s90", alt: '' = image_tag avatar_icon_for_user(@user, 90), class: "avatar s90", alt: ''
.user-info.prepend-left-default.append-right-default .user-info
.cover-title .cover-title
= @user.name = @user.name
...@@ -81,10 +81,10 @@ ...@@ -81,10 +81,10 @@
= icon('briefcase') = icon('briefcase')
= @user.organization = @user.organization
- if @user.bio.present? - if @user.bio.present?
.cover-desc .cover-desc
%p.profile-user-bio %p.profile-user-bio
= @user.bio = @user.bio
- unless profile_tabs.empty? - unless profile_tabs.empty?
.scrolling-tabs-container .scrolling-tabs-container
......
...@@ -5,7 +5,6 @@ class RepositoryUpdateRemoteMirrorWorker ...@@ -5,7 +5,6 @@ class RepositoryUpdateRemoteMirrorWorker
UpdateError = Class.new(StandardError) UpdateError = Class.new(StandardError)
include ApplicationWorker include ApplicationWorker
include Gitlab::ShellAdapter
sidekiq_options retry: 3, dead: false sidekiq_options retry: 3, dead: false
......
---
title: Resolve Main navbar is broken in certain viewport widths
merge_request: 23348
author:
type: fixed
---
title: Fix a frozen string error in lib/gitlab/utils.rb
merge_request: 23690
author:
type: fixed
---
title: Fix bottom paddings of profile header and some markup updates of profile
merge_request: 23168
author: Harry Kiselev
type: other
class RenameReservedProjectNames < ActiveRecord::Migration[4.2] class RenameReservedProjectNames < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers include Gitlab::Database::MigrationHelpers
include Gitlab::ShellAdapter
DOWNTIME = false DOWNTIME = false
......
class RenameMoreReservedProjectNames < ActiveRecord::Migration[4.2] class RenameMoreReservedProjectNames < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers include Gitlab::Database::MigrationHelpers
include Gitlab::ShellAdapter
DOWNTIME = false DOWNTIME = false
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
module Gitlab module Gitlab
module BitbucketServerImport module BitbucketServerImport
class Importer class Importer
include Gitlab::ShellAdapter
attr_reader :recover_missing_commits attr_reader :recover_missing_commits
attr_reader :project, :project_key, :repository_slug, :client, :errors, :users attr_reader :project, :project_key, :repository_slug, :client, :errors, :users
attr_accessor :logger attr_accessor :logger
......
...@@ -4,7 +4,6 @@ module Gitlab ...@@ -4,7 +4,6 @@ module Gitlab
module ImportExport module ImportExport
class RepoRestorer class RepoRestorer
include Gitlab::ImportExport::CommandLineUtil include Gitlab::ImportExport::CommandLineUtil
include Gitlab::ShellAdapter
def initialize(project:, shared:, path_to_bundle:) def initialize(project:, shared:, path_to_bundle:)
@project = project @project = project
......
...@@ -60,7 +60,7 @@ module Gitlab ...@@ -60,7 +60,7 @@ module Gitlab
# Converts newlines into HTML line break elements # Converts newlines into HTML line break elements
def nlbr(str) def nlbr(str)
ActionView::Base.full_sanitizer.sanitize(str, tags: []).gsub(/\r?\n/, '<br>').html_safe ActionView::Base.full_sanitizer.sanitize(+str, tags: []).gsub(/\r?\n/, '<br>').html_safe
end end
def remove_line_breaks(str) def remove_line_breaks(str)
......
...@@ -498,9 +498,6 @@ msgstr "" ...@@ -498,9 +498,6 @@ msgstr ""
msgid "Admin Overview" msgid "Admin Overview"
msgstr "" msgstr ""
msgid "Admin area"
msgstr ""
msgid "AdminArea| You are about to permanently delete the user %{username}. Issues, merge requests, and groups linked to them will be transferred to a system-wide \"Ghost-user\". To avoid data loss, consider using the %{strong_start}block user%{strong_end} feature instead. Once you %{strong_start}Delete user%{strong_end}, it cannot be undone or recovered." msgid "AdminArea| You are about to permanently delete the user %{username}. Issues, merge requests, and groups linked to them will be transferred to a system-wide \"Ghost-user\". To avoid data loss, consider using the %{strong_start}block user%{strong_end} feature instead. Once you %{strong_start}Delete user%{strong_end}, it cannot be undone or recovered."
msgstr "" msgstr ""
......
...@@ -44,6 +44,12 @@ describe Gitlab::Utils do ...@@ -44,6 +44,12 @@ describe Gitlab::Utils do
end end
end end
describe '.nlbr' do
it 'replaces new lines with <br>' do
expect(described_class.nlbr("<b>hello</b>\n<i>world</i>".freeze)).to eq("hello<br>world")
end
end
describe '.remove_line_breaks' do describe '.remove_line_breaks' do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
......
...@@ -11,10 +11,6 @@ describe ProjectMember do ...@@ -11,10 +11,6 @@ describe ProjectMember do
it { is_expected.to validate_inclusion_of(:access_level).in_array(Gitlab::Access.values) } it { is_expected.to validate_inclusion_of(:access_level).in_array(Gitlab::Access.values) }
end end
describe 'modules' do
it { is_expected.to include_module(Gitlab::ShellAdapter) }
end
describe '.access_level_roles' do describe '.access_level_roles' do
it 'returns Gitlab::Access.options' do it 'returns Gitlab::Access.options' do
expect(described_class.access_level_roles).to eq(Gitlab::Access.options) expect(described_class.access_level_roles).to eq(Gitlab::Access.options)
......
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