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'; ...@@ -11,7 +11,10 @@ import GroupLabelSubscription from './group_label_subscription';
import LineHighlighter from './line_highlighter'; import LineHighlighter from './line_highlighter';
import MergeRequest from './merge_request'; import MergeRequest from './merge_request';
import Compare from './compare'; import Compare from './compare';
<<<<<<< HEAD
import initCompareAutocomplete from './compare_autocomplete'; import initCompareAutocomplete from './compare_autocomplete';
=======
>>>>>>> upstream/master
import Labels from './labels'; import Labels from './labels';
import LabelManager from './label_manager'; import LabelManager from './label_manager';
import Sidebar from './right_sidebar'; import Sidebar from './right_sidebar';
......
...@@ -7,6 +7,7 @@ import setupProjectEdit from '~/project_edit'; ...@@ -7,6 +7,7 @@ import setupProjectEdit from '~/project_edit';
import ProjectNew from '../shared/project_new'; import ProjectNew from '../shared/project_new';
import projectAvatar from '../shared/project_avatar'; import projectAvatar from '../shared/project_avatar';
import initProjectPermissionsSettings from '../shared/permissions'; import initProjectPermissionsSettings from '../shared/permissions';
<<<<<<< HEAD
// EE imports // EE imports
import ApproversSelect from 'ee/approvers_select'; // eslint-disable-line import/first import ApproversSelect from 'ee/approvers_select'; // eslint-disable-line import/first
...@@ -15,15 +16,23 @@ export default () => { ...@@ -15,15 +16,23 @@ export default () => {
new ProjectNew(); // eslint-disable-line no-new new ProjectNew(); // eslint-disable-line no-new
new UsersSelect(); new UsersSelect();
groupsSelect(); groupsSelect();
=======
export default () => {
new ProjectNew(); // eslint-disable-line no-new
>>>>>>> upstream/master
setupProjectEdit(); setupProjectEdit();
// Initialize expandable settings panels // Initialize expandable settings panels
initSettingsPanels(); initSettingsPanels();
projectAvatar(); projectAvatar();
initProjectPermissionsSettings(); initProjectPermissionsSettings();
<<<<<<< HEAD
new UserCallout({ className: 'js-service-desk-callout' }); new UserCallout({ className: 'js-service-desk-callout' });
new UserCallout({ className: 'js-mr-approval-callout' }); new UserCallout({ className: 'js-mr-approval-callout' });
// EE imports // EE imports
new ApproversSelect(); // eslint-disable-line no-new new ApproversSelect(); // eslint-disable-line no-new
=======
>>>>>>> upstream/master
}; };
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
Pipeline Pipeline
</div> </div>
<div <div
class="table-section section-25 js-pipeline-commit pipeline-commit" class="table-section section-20 js-pipeline-commit pipeline-commit"
role="rowheader" role="rowheader"
> >
Commit Commit
</div> </div>
<div <div
class="table-section section-15 js-pipeline-stages pipeline-stages" class="table-section section-20 js-pipeline-stages pipeline-stages"
role="rowheader" role="rowheader"
> >
Stages Stages
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
:auto-devops-help-path="autoDevopsHelpPath" :auto-devops-help-path="autoDevopsHelpPath"
/> />
<div class="table-section section-25"> <div class="table-section section-20">
<div <div
class="table-mobile-header" class="table-mobile-header"
role="rowheader"> role="rowheader">
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
</div> </div>
</div> </div>
<div class="table-section section-wrap section-15 stage-cell"> <div class="table-section section-wrap section-20 stage-cell">
<div <div
class="table-mobile-header" class="table-mobile-header"
role="rowheader"> role="rowheader">
......
...@@ -99,6 +99,7 @@ const bindEvents = () => { ...@@ -99,6 +99,7 @@ const bindEvents = () => {
$projectImportUrl.keyup(() => deriveProjectPathFromUrl($projectImportUrl)); $projectImportUrl.keyup(() => deriveProjectPathFromUrl($projectImportUrl));
<<<<<<< HEAD
$('.import_git').on('click', () => { $('.import_git').on('click', () => {
const $projectMirror = $('#project_mirror'); const $projectMirror = $('#project_mirror');
...@@ -106,6 +107,8 @@ const bindEvents = () => { ...@@ -106,6 +107,8 @@ const bindEvents = () => {
}); });
}; };
=======
>>>>>>> upstream/master
export default { export default {
bindEvents, bindEvents,
deriveProjectPathFromUrl, deriveProjectPathFromUrl,
......
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
.stage-cell { .stage-cell {
&.table-section { &.table-section {
@media (min-width: $screen-md-min) { @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; margin-right: -4px;
} }
} }
......
...@@ -71,7 +71,7 @@ class LabelsFinder < UnionFinder ...@@ -71,7 +71,7 @@ class LabelsFinder < UnionFinder
end end
def projects? def projects?
params[:project_ids].present? params[:project_ids]
end end
def only_group_labels? def only_group_labels?
......
...@@ -307,6 +307,12 @@ module IssuablesHelper ...@@ -307,6 +307,12 @@ module IssuablesHelper
issuable.model_name.human.downcase issuable.model_name.human.downcase
end end
def selected_labels
Array(params[:label_name]).map do |label_name|
Label.new(title: label_name)
end
end
private private
def sidebar_gutter_collapsed? def sidebar_gutter_collapsed?
......
...@@ -3,23 +3,6 @@ ...@@ -3,23 +3,6 @@
= render 'profiles/head' = 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| = 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 .col-lg-4.application-theme
%h4.prepend-top-0 %h4.prepend-top-0
GitLab navigation theme GitLab navigation theme
......
...@@ -23,7 +23,7 @@ ...@@ -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 = 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 .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? - if issuable_filter_present?
.filter-item.inline.reset-filters .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 ...@@ -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 of the shortcomings of Git. The general recommendation is to not have Git repositories
larger than 1GB to preserve performance. 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 ## How it works
Git LFS client talks with the GitLab server over HTTPS. It uses HTTP Basic Authentication Git LFS client talks with the GitLab server over HTTPS. It uses HTTP Basic Authentication
......
...@@ -28,6 +28,8 @@ module Gitlab ...@@ -28,6 +28,8 @@ module Gitlab
UPDATE #{quoted_table} UPDATE #{quoted_table}
SET #{quoted_copy_to} = #{quoted_copy_from} SET #{quoted_copy_to} = #{quoted_copy_from}
WHERE id BETWEEN #{start_id} AND #{end_id} WHERE id BETWEEN #{start_id} AND #{end_id}
AND #{quoted_copy_from} IS NOT NULL
AND #{quoted_copy_to} IS NULL
SQL SQL
end end
......
...@@ -525,8 +525,9 @@ module Gitlab ...@@ -525,8 +525,9 @@ module Gitlab
install_rename_triggers(table, column, temp_column) install_rename_triggers(table, column, temp_column)
# Schedule the jobs that will copy the data from the old column to the # Schedule the jobs that will copy the data from the old column to the
# new one. # new one. Rows with NULL values in our source column are skipped since
relation.each_batch(of: batch_size) do |batch, index| # 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 start_id, end_id = batch.pluck('MIN(id), MAX(id)').first
max_index = index max_index = index
......
...@@ -32,18 +32,6 @@ describe 'User visits the profile preferences page' do ...@@ -32,18 +32,6 @@ describe 'User visits the profile preferences page' do
end end
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 describe 'User changes their default dashboard', :js do
it 'creates a flash message' do it 'creates a flash message' do
select 'Starred Projects', from: 'user_dashboard' select 'Starred Projects', from: 'user_dashboard'
......
...@@ -218,4 +218,33 @@ describe IssuablesHelper do ...@@ -218,4 +218,33 @@ describe IssuablesHelper do
expect(JSON.parse(helper.issuable_initial_data(epic))).to eq(expected_data) expect(JSON.parse(helper.issuable_initial_data(epic))).to eq(expected_data)
end end
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 end
...@@ -1038,7 +1038,7 @@ describe Gitlab::Database::MigrationHelpers do ...@@ -1038,7 +1038,7 @@ describe Gitlab::Database::MigrationHelpers do
end end
describe '#change_column_type_using_background_migration' do 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 let(:issue_model) do
Class.new(ActiveRecord::Base) 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