Commit c5b1014e authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-01-18

# Conflicts:
#	app/assets/javascripts/dispatcher.js
#	app/assets/javascripts/pages/projects/edit/index.js
#	app/assets/javascripts/projects/project_new.js

[ci skip]
parents 2af562e5 792e9ed7
......@@ -11,7 +11,10 @@ import GroupLabelSubscription from './group_label_subscription';
import LineHighlighter from './line_highlighter';
import MergeRequest from './merge_request';
import Compare from './compare';
<<<<<<< HEAD
import initCompareAutocomplete from './compare_autocomplete';
=======
>>>>>>> upstream/master
import Labels from './labels';
import LabelManager from './label_manager';
import Sidebar from './right_sidebar';
......
......@@ -7,6 +7,7 @@ import setupProjectEdit from '~/project_edit';
import ProjectNew from '../shared/project_new';
import projectAvatar from '../shared/project_avatar';
import initProjectPermissionsSettings from '../shared/permissions';
<<<<<<< HEAD
// EE imports
import ApproversSelect from 'ee/approvers_select'; // eslint-disable-line import/first
......@@ -15,15 +16,23 @@ export default () => {
new ProjectNew(); // eslint-disable-line no-new
new UsersSelect();
groupsSelect();
=======
export default () => {
new ProjectNew(); // eslint-disable-line no-new
>>>>>>> upstream/master
setupProjectEdit();
// Initialize expandable settings panels
initSettingsPanels();
projectAvatar();
initProjectPermissionsSettings();
<<<<<<< HEAD
new UserCallout({ className: 'js-service-desk-callout' });
new UserCallout({ className: 'js-mr-approval-callout' });
// EE imports
new ApproversSelect(); // eslint-disable-line no-new
=======
>>>>>>> upstream/master
};
......@@ -50,13 +50,13 @@
Pipeline
</div>
<div
class="table-section section-25 js-pipeline-commit pipeline-commit"
class="table-section section-20 js-pipeline-commit pipeline-commit"
role="rowheader"
>
Commit
</div>
<div
class="table-section section-15 js-pipeline-stages pipeline-stages"
class="table-section section-20 js-pipeline-stages pipeline-stages"
role="rowheader"
>
Stages
......
......@@ -240,7 +240,7 @@
:auto-devops-help-path="autoDevopsHelpPath"
/>
<div class="table-section section-25">
<div class="table-section section-20">
<div
class="table-mobile-header"
role="rowheader">
......@@ -259,7 +259,7 @@
</div>
</div>
<div class="table-section section-wrap section-15 stage-cell">
<div class="table-section section-wrap section-20 stage-cell">
<div
class="table-mobile-header"
role="rowheader">
......
......@@ -99,6 +99,7 @@ const bindEvents = () => {
$projectImportUrl.keyup(() => deriveProjectPathFromUrl($projectImportUrl));
<<<<<<< HEAD
$('.import_git').on('click', () => {
const $projectMirror = $('#project_mirror');
......@@ -106,6 +107,8 @@ const bindEvents = () => {
});
};
=======
>>>>>>> upstream/master
export default {
bindEvents,
deriveProjectPathFromUrl,
......
......@@ -255,7 +255,7 @@
.stage-cell {
&.table-section {
@media (min-width: $screen-md-min) {
min-width: 148px;
min-width: 160px; /* Hack alert: Without this the mini graph pipeline won't work properly*/
margin-right: -4px;
}
}
......
......@@ -71,7 +71,7 @@ class LabelsFinder < UnionFinder
end
def projects?
params[:project_ids].present?
params[:project_ids]
end
def only_group_labels?
......
......@@ -307,6 +307,12 @@ module IssuablesHelper
issuable.model_name.human.downcase
end
def selected_labels
Array(params[:label_name]).map do |label_name|
Label.new(title: label_name)
end
end
private
def sidebar_gutter_collapsed?
......
......@@ -3,23 +3,6 @@
= render 'profiles/head'
= form_for @user, url: profile_preferences_path, remote: true, method: :put, html: { class: 'row prepend-top-default js-preferences-form' } do |f|
.col-lg-4
%h4.prepend-top-0
Web IDE (Beta)
%p Enable the new web IDE on this device to make it possible to open and edit multiple files with a single commit
.col-lg-8.multi-file-editor-options
= label_tag do
.preview.append-bottom-10= image_tag "multi-editor-off.png"
= f.radio_button :multi_file, "off", checked: true
Off
= label_tag do
.preview.append-bottom-10= image_tag "multi-editor-on.png"
= f.radio_button :multi_file, "on", checked: false
On
.col-sm-12
%hr
.col-lg-4.application-theme
%h4.prepend-top-0
GitLab navigation theme
......
......@@ -23,7 +23,7 @@
= render "shared/issuable/milestone_dropdown", selected: finder.milestones.try(:first), name: :milestone_title, show_any: true, show_upcoming: true, board: board, show_started: true
.filter-item.inline.labels-filter
= render "shared/issuable/label_dropdown", selected: finder.labels.select(:title).uniq, use_id: false, selected_toggle: params[:label_name], data_options: { field_name: "label_name[]" }
= render "shared/issuable/label_dropdown", selected: selected_labels, use_id: false, selected_toggle: params[:label_name], data_options: { field_name: "label_name[]" }
- if issuable_filter_present?
.filter-item.inline.reset-filters
......
---
title: Remove unecessary query from labels filter
merge_request:
author:
type: performance
......@@ -4,6 +4,11 @@ Managing large files such as audio, video and graphics files has always been one
of the shortcomings of Git. The general recommendation is to not have Git repositories
larger than 1GB to preserve performance.
![Git LFS tracking status](img/lfs-icon.png)
An LFS icon is shown on files tracked by Git LFS to denote if a file is stored
as a blob or as an LFS pointer.
## How it works
Git LFS client talks with the GitLab server over HTTPS. It uses HTTP Basic Authentication
......
......@@ -28,6 +28,8 @@ module Gitlab
UPDATE #{quoted_table}
SET #{quoted_copy_to} = #{quoted_copy_from}
WHERE id BETWEEN #{start_id} AND #{end_id}
AND #{quoted_copy_from} IS NOT NULL
AND #{quoted_copy_to} IS NULL
SQL
end
......
......@@ -525,8 +525,9 @@ module Gitlab
install_rename_triggers(table, column, temp_column)
# Schedule the jobs that will copy the data from the old column to the
# new one.
relation.each_batch(of: batch_size) do |batch, index|
# new one. Rows with NULL values in our source column are skipped since
# the target column is already NULL at this point.
relation.where.not(column => nil).each_batch(of: batch_size) do |batch, index|
start_id, end_id = batch.pluck('MIN(id), MAX(id)').first
max_index = index
......
......@@ -32,18 +32,6 @@ describe 'User visits the profile preferences page' do
end
end
describe 'User changes their multi file editor preferences', :js do
it 'set the new_repo cookie when the option is ON' do
choose 'user_multi_file_on'
expect(get_cookie('new_repo')).not_to be_nil
end
it 'deletes the new_repo cookie when the option is OFF' do
choose 'user_multi_file_off'
expect(get_cookie('new_repo')).to be_nil
end
end
describe 'User changes their default dashboard', :js do
it 'creates a flash message' do
select 'Starred Projects', from: 'user_dashboard'
......
......@@ -218,4 +218,33 @@ describe IssuablesHelper do
expect(JSON.parse(helper.issuable_initial_data(epic))).to eq(expected_data)
end
end
describe '#selected_labels' do
context 'if label_name param is a string' do
it 'returns a new label with title' do
allow(helper).to receive(:params)
.and_return(ActionController::Parameters.new(label_name: 'test label'))
labels = helper.selected_labels
expect(labels).to be_an(Array)
expect(labels.size).to eq(1)
expect(labels.first.title).to eq('test label')
end
end
context 'if label_name param is an array' do
it 'returns a new label with title for each element' do
allow(helper).to receive(:params)
.and_return(ActionController::Parameters.new(label_name: ['test label 1', 'test label 2']))
labels = helper.selected_labels
expect(labels).to be_an(Array)
expect(labels.size).to eq(2)
expect(labels.first.title).to eq('test label 1')
expect(labels.second.title).to eq('test label 2')
end
end
end
end
......@@ -1038,7 +1038,7 @@ describe Gitlab::Database::MigrationHelpers do
end
describe '#change_column_type_using_background_migration' do
let!(:issue) { create(:issue) }
let!(:issue) { create(:issue, :closed, closed_at: Time.zone.now) }
let(:issue_model) do
Class.new(ActiveRecord::Base) do
......
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