Commit 6b03035d authored by GitLab Bot's avatar GitLab Bot

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

# Conflicts:
#	app/assets/javascripts/pages/projects/edit/index.js
#	app/assets/javascripts/pages/projects/issues/form.js

[ci skip]
parents b11f1ba1 cedbf9c8
<<<<<<< HEAD
/* eslint-disable no-new */ /* eslint-disable no-new */
import initSettingsPanels from '~/settings_panels'; import initSettingsPanels from '~/settings_panels';
import setupProjectEdit from '~/project_edit'; import setupProjectEdit from '~/project_edit';
...@@ -15,4 +16,13 @@ export default () => { ...@@ -15,4 +16,13 @@ export default () => {
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' });
=======
import initSettingsPanels from '~/settings_panels';
import setupProjectEdit from '~/project_edit';
export default () => {
setupProjectEdit();
// Initialize expandable settings panels
initSettingsPanels();
>>>>>>> upstream/master
}; };
...@@ -5,7 +5,10 @@ import LabelsSelect from '~/labels_select'; ...@@ -5,7 +5,10 @@ import LabelsSelect from '~/labels_select';
import MilestoneSelect from '~/milestone_select'; import MilestoneSelect from '~/milestone_select';
import ShortcutsNavigation from '~/shortcuts_navigation'; import ShortcutsNavigation from '~/shortcuts_navigation';
import IssuableTemplateSelectors from '~/templates/issuable_template_selectors'; import IssuableTemplateSelectors from '~/templates/issuable_template_selectors';
<<<<<<< HEAD
import WeightSelect from 'ee/weight_select'; import WeightSelect from 'ee/weight_select';
=======
>>>>>>> upstream/master
export default () => { export default () => {
new ShortcutsNavigation(); new ShortcutsNavigation();
...@@ -14,5 +17,8 @@ export default () => { ...@@ -14,5 +17,8 @@ export default () => {
new LabelsSelect(); new LabelsSelect();
new MilestoneSelect(); new MilestoneSelect();
new IssuableTemplateSelectors(); new IssuableTemplateSelectors();
<<<<<<< HEAD
new WeightSelect(); new WeightSelect();
=======
>>>>>>> upstream/master
}; };
- issues = IssuesFinder.new(current_user, group_id: @group.id, state: 'opened').execute - issues_count = IssuesFinder.new(current_user, group_id: @group.id, state: 'opened').execute.count
- merge_requests = MergeRequestsFinder.new(current_user, group_id: @group.id, state: 'opened', non_archived: true).execute - merge_requests_count = MergeRequestsFinder.new(current_user, group_id: @group.id, state: 'opened', non_archived: true).execute.count
- issues_sub_menu_items = ['groups#issues', 'labels#index', 'milestones#index'] - issues_sub_menu_items = ['groups#issues', 'labels#index', 'milestones#index']
- if @group.feature_available?(:group_issue_boards) - if @group.feature_available?(:group_issue_boards)
...@@ -52,14 +52,14 @@ ...@@ -52,14 +52,14 @@
= sprite_icon('issues') = sprite_icon('issues')
%span.nav-item-name %span.nav-item-name
Issues Issues
%span.badge.count= number_with_delimiter(issues.count) %span.badge.count= number_with_delimiter(issues_count)
%ul.sidebar-sub-level-items %ul.sidebar-sub-level-items
= nav_link(path: ['groups#issues', 'labels#index', 'milestones#index'], html_options: { class: "fly-out-top-item" } ) do = nav_link(path: ['groups#issues', 'labels#index', 'milestones#index'], html_options: { class: "fly-out-top-item" } ) do
= link_to issues_group_path(@group) do = link_to issues_group_path(@group) do
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
#{ _('Issues') } #{ _('Issues') }
%span.badge.count.issue_counter.fly-out-badge= number_with_delimiter(issues.count) %span.badge.count.issue_counter.fly-out-badge= number_with_delimiter(issues_count)
%li.divider.fly-out-top-item %li.divider.fly-out-top-item
= nav_link(path: 'groups#issues', html_options: { class: 'home' }) do = nav_link(path: 'groups#issues', html_options: { class: 'home' }) do
= link_to issues_group_path(@group), title: 'List' do = link_to issues_group_path(@group), title: 'List' do
...@@ -88,13 +88,13 @@ ...@@ -88,13 +88,13 @@
= sprite_icon('git-merge') = sprite_icon('git-merge')
%span.nav-item-name %span.nav-item-name
Merge Requests Merge Requests
%span.badge.count= number_with_delimiter(merge_requests.count) %span.badge.count= number_with_delimiter(merge_requests_count)
%ul.sidebar-sub-level-items.is-fly-out-only %ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(path: 'groups#merge_requests', html_options: { class: "fly-out-top-item" } ) do = nav_link(path: 'groups#merge_requests', html_options: { class: "fly-out-top-item" } ) do
= link_to merge_requests_group_path(@group) do = link_to merge_requests_group_path(@group) do
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
#{ _('Merge Requests') } #{ _('Merge Requests') }
%span.badge.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(merge_requests.count) %span.badge.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(merge_requests_count)
= nav_link(path: 'group_members#index') do = nav_link(path: 'group_members#index') do
= link_to group_group_members_path(@group) do = link_to group_group_members_path(@group) do
.nav-icon-container .nav-icon-container
......
---
title: Fix double query execution on groups page
merge_request: 16314
author:
type: performance
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