Commit 35824755 authored by Rémy Coutable's avatar Rémy Coutable

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2017-11-22

# Conflicts:
#	CHANGELOG.md
#	Gemfile.lock
#	app/assets/javascripts/boards/components/board_card.vue
#	app/assets/javascripts/boards/models/issue.js
#	app/assets/javascripts/init_legacy_filters.js
#	app/models/system_note_metadata.rb
#	db/schema.rb

[ci skip]
parents 8445acfc 48b65bb0
...@@ -216,7 +216,7 @@ review-docs-deploy: ...@@ -216,7 +216,7 @@ review-docs-deploy:
name: review-docs/$CI_COMMIT_REF_NAME name: review-docs/$CI_COMMIT_REF_NAME
# DOCS_REVIEW_APPS_DOMAIN and DOCS_GITLAB_REPO_SUFFIX are secret variables # DOCS_REVIEW_APPS_DOMAIN and DOCS_GITLAB_REPO_SUFFIX are secret variables
# Discussion: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14236/diffs#note_40140693 # Discussion: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14236/diffs#note_40140693
url: http://preview-$CI_COMMIT_REF_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX url: http://$DOCS_GITLAB_REPO_SUFFIX-$CI_COMMIT_REF_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
on_stop: review-docs-cleanup on_stop: review-docs-cleanup
script: script:
- ./trigger-build-docs deploy - ./trigger-build-docs deploy
...@@ -279,7 +279,7 @@ flaky-examples-check: ...@@ -279,7 +279,7 @@ flaky-examples-check:
USE_BUNDLE_INSTALL: "false" USE_BUNDLE_INSTALL: "false"
NEW_FLAKY_SPECS_REPORT: rspec_flaky/report-new.json NEW_FLAKY_SPECS_REPORT: rspec_flaky/report-new.json
stage: post-test stage: post-test
allow_failure: yes allow_failure: true
retry: 0 retry: 0
only: only:
- branches - branches
...@@ -441,7 +441,6 @@ ee_compat_check: ...@@ -441,7 +441,6 @@ ee_compat_check:
- /^[\d-]+-stable(-ee)?/ - /^[\d-]+-stable(-ee)?/
- branches@gitlab-org/gitlab-ee - branches@gitlab-org/gitlab-ee
- branches@gitlab/gitlab-ee - branches@gitlab/gitlab-ee
allow_failure: no
retry: 0 retry: 0
artifacts: artifacts:
name: "${CI_JOB_NAME}_${CI_COMIT_REF_NAME}_${CI_COMMIT_SHA}" name: "${CI_JOB_NAME}_${CI_COMIT_REF_NAME}_${CI_COMMIT_SHA}"
......
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "feature proposal" label:
For the Community Edition issue tracker:
- https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=feature+proposal
For the Enterprise Edition issue tracker:
- https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=feature+proposal
and verify the issue you're about to submit isn't a duplicate.
Please remove this notice if you're confident your issue isn't a duplicate.
------
### Description ### Description
(Include problem, use cases, benefits, and/or goals) (Include problem, use cases, benefits, and/or goals)
...@@ -25,26 +6,4 @@ Please remove this notice if you're confident your issue isn't a duplicate. ...@@ -25,26 +6,4 @@ Please remove this notice if you're confident your issue isn't a duplicate.
### Links / references ### Links / references
### Documentation blurb
#### Overview
What is it?
Why should someone use this feature?
What is the underlying (business) problem?
How do you use this feature?
#### Use cases
Who is this for? Provide one or more use cases.
### Feature checklist
Make sure these are completed before closing the issue,
with a link to the relevant commit.
- [ ] [Feature assurance](https://about.gitlab.com/handbook/product/#feature-assurance)
- [ ] Documentation
- [ ] Added to [features.yml](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/data/features.yml)
/label ~"feature proposal" /label ~"feature proposal"
...@@ -62,6 +62,10 @@ entry. ...@@ -62,6 +62,10 @@ entry.
- Update container repository path reference and allow using double underscore. !15417 - Update container repository path reference and allow using double underscore. !15417
- Fix crash when navigating to second page of the group dashbaord when there are projects and groups on the first page. !15456 - Fix crash when navigating to second page of the group dashbaord when there are projects and groups on the first page. !15456
- Fix flash errors showing up on a non configured prometheus integration. !35652 - Fix flash errors showing up on a non configured prometheus integration. !35652
<<<<<<< HEAD
=======
- Fix timezone bug in Pikaday and upgrade Pikaday version.
>>>>>>> upstream/master
- Fix arguments Import/Export error importing project merge requests. - Fix arguments Import/Export error importing project merge requests.
- Moves mini graph of pipeline to the end of sentence in MR widget. Cleans HTML and tests. - Moves mini graph of pipeline to the end of sentence in MR widget. Cleans HTML and tests.
- Fix user autocomplete in subgroups. - Fix user autocomplete in subgroups.
...@@ -95,7 +99,10 @@ entry. ...@@ -95,7 +99,10 @@ entry.
- Only set Auto-Submitted header once for emails on push. - Only set Auto-Submitted header once for emails on push.
- Fix overlap of right-sidebar and main content when creating a Wiki page. - Fix overlap of right-sidebar and main content when creating a Wiki page.
- Enables scroll to bottom once user has scrolled back to bottom in job log. - Enables scroll to bottom once user has scrolled back to bottom in job log.
<<<<<<< HEAD
- Fix timezone bug in Pikaday and upgrade Pikaday version. - Fix timezone bug in Pikaday and upgrade Pikaday version.
=======
>>>>>>> upstream/master
### Changed (21 changes, 7 of them are from the community) ### Changed (21 changes, 7 of them are from the community)
...@@ -138,9 +145,14 @@ entry. ...@@ -138,9 +145,14 @@ entry.
- Optimise getting the pipeline status of commits. - Optimise getting the pipeline status of commits.
- Improve performance of commits list by fully using DB index when getting commit note counts. - Improve performance of commits list by fully using DB index when getting commit note counts.
<<<<<<< HEAD
### Added (27 changes, 10 of them are from the community) ### Added (27 changes, 10 of them are from the community)
- Add new push rule to enforce that only the author of a commit can push to the repository. !3086 - Add new push rule to enforce that only the author of a commit can push to the repository. !3086
=======
### Added (26 changes, 10 of them are from the community)
>>>>>>> upstream/master
- Expose duration in Job entity. !13644 (Mehdi Lahmam (@mehlah)) - Expose duration in Job entity. !13644 (Mehdi Lahmam (@mehlah))
- Prevent git push when LFS objects are missing. !13837 - Prevent git push when LFS objects are missing. !13837
- Automatic configuration settings page. !13850 (Francisco Lopez) - Automatic configuration settings page. !13850 (Francisco Lopez)
......
...@@ -544,6 +544,7 @@ When having your code reviewed and when reviewing merge requests please take the ...@@ -544,6 +544,7 @@ When having your code reviewed and when reviewing merge requests please take the
etc.), they should conform to our [Licensing guidelines][license-finder-doc]. etc.), they should conform to our [Licensing guidelines][license-finder-doc].
See the instructions in that document for help if your MR fails the See the instructions in that document for help if your MR fails the
"license-finder" test with a "Dependencies that need approval" error. "license-finder" test with a "Dependencies that need approval" error.
1. The merge request meets the [definition of done](#definition-of-done).
## Definition of done ## Definition of done
......
...@@ -275,6 +275,8 @@ gem 'gettext_i18n_rails', '~> 1.8.0' ...@@ -275,6 +275,8 @@ gem 'gettext_i18n_rails', '~> 1.8.0'
gem 'gettext_i18n_rails_js', '~> 1.2.0' gem 'gettext_i18n_rails_js', '~> 1.2.0'
gem 'gettext', '~> 3.2.2', require: false, group: :development gem 'gettext', '~> 3.2.2', require: false, group: :development
gem 'batch-loader'
# Perf bar # Perf bar
gem 'peek', '~> 1.0.1' gem 'peek', '~> 1.0.1'
gem 'peek-gc', '~> 0.0.2' gem 'peek-gc', '~> 0.0.2'
...@@ -414,7 +416,7 @@ group :ed25519 do ...@@ -414,7 +416,7 @@ group :ed25519 do
end end
# Gitaly GRPC client # Gitaly GRPC client
gem 'gitaly-proto', '~> 0.52.0', require: 'gitaly' gem 'gitaly-proto', '~> 0.54.0', require: 'gitaly'
gem 'toml-rb', '~> 0.3.15', require: false gem 'toml-rb', '~> 0.3.15', require: false
......
...@@ -81,6 +81,7 @@ GEM ...@@ -81,6 +81,7 @@ GEM
thread_safe (~> 0.3, >= 0.3.1) thread_safe (~> 0.3, >= 0.3.1)
babosa (1.0.2) babosa (1.0.2)
base32 (0.3.2) base32 (0.3.2)
batch-loader (1.1.1)
bcrypt (3.1.11) bcrypt (3.1.11)
bcrypt_pbkdf (1.0.0) bcrypt_pbkdf (1.0.0)
benchmark-ips (2.3.0) benchmark-ips (2.3.0)
...@@ -299,7 +300,7 @@ GEM ...@@ -299,7 +300,7 @@ GEM
po_to_json (>= 1.0.0) po_to_json (>= 1.0.0)
rails (>= 3.2.0) rails (>= 3.2.0)
gherkin-ruby (0.3.2) gherkin-ruby (0.3.2)
gitaly-proto (0.52.0) gitaly-proto (0.54.0)
google-protobuf (~> 3.1) google-protobuf (~> 3.1)
grpc (~> 1.0) grpc (~> 1.0)
github-linguist (4.7.6) github-linguist (4.7.6)
...@@ -384,8 +385,11 @@ GEM ...@@ -384,8 +385,11 @@ GEM
google-protobuf (~> 3.1) google-protobuf (~> 3.1)
googleapis-common-protos-types (~> 1.0.0) googleapis-common-protos-types (~> 1.0.0)
googleauth (>= 0.5.1, < 0.7) googleauth (>= 0.5.1, < 0.7)
<<<<<<< HEAD
gssapi (1.2.0) gssapi (1.2.0)
ffi (>= 1.0.1) ffi (>= 1.0.1)
=======
>>>>>>> upstream/master
haml (4.0.7) haml (4.0.7)
tilt tilt
haml_lint (0.26.0) haml_lint (0.26.0)
...@@ -1013,6 +1017,7 @@ DEPENDENCIES ...@@ -1013,6 +1017,7 @@ DEPENDENCIES
aws-sdk aws-sdk
babosa (~> 1.0.2) babosa (~> 1.0.2)
base32 (~> 0.3.0) base32 (~> 0.3.0)
batch-loader
bcrypt_pbkdf (~> 1.0) bcrypt_pbkdf (~> 1.0)
benchmark-ips (~> 2.3.0) benchmark-ips (~> 2.3.0)
better_errors (~> 2.1.0) better_errors (~> 2.1.0)
...@@ -1069,7 +1074,7 @@ DEPENDENCIES ...@@ -1069,7 +1074,7 @@ DEPENDENCIES
gettext (~> 3.2.2) gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.2.0) gettext_i18n_rails_js (~> 1.2.0)
gitaly-proto (~> 0.52.0) gitaly-proto (~> 0.54.0)
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
gitlab-flowdock-git-hook (~> 1.0.1) gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-license (~> 1.0) gitlab-license (~> 1.0)
......
10.2.0-pre 10.3.0-pre
...@@ -66,7 +66,10 @@ export default { ...@@ -66,7 +66,10 @@ export default {
:list="list" :list="list"
:issue="issue" :issue="issue"
:issue-link-base="issueLinkBase" :issue-link-base="issueLinkBase"
<<<<<<< HEAD:app/assets/javascripts/boards/components/board_card.vue
:group-id="groupId" :group-id="groupId"
=======
>>>>>>> upstream/master:app/assets/javascripts/boards/components/board_card.vue
:root-path="rootPath" :root-path="rootPath"
:update-filters="true" /> :update-filters="true" />
</li> </li>
......
...@@ -23,6 +23,7 @@ class ListIssue { ...@@ -23,6 +23,7 @@ class ListIssue {
}; };
this.sidebarInfoEndpoint = obj.issue_sidebar_endpoint; this.sidebarInfoEndpoint = obj.issue_sidebar_endpoint;
this.toggleSubscriptionEndpoint = obj.toggle_subscription_endpoint; this.toggleSubscriptionEndpoint = obj.toggle_subscription_endpoint;
<<<<<<< HEAD
this.milestone_id = obj.milestone_id; this.milestone_id = obj.milestone_id;
this.project_id = obj.project_id; this.project_id = obj.project_id;
this.weight = obj.weight; this.weight = obj.weight;
...@@ -30,6 +31,8 @@ class ListIssue { ...@@ -30,6 +31,8 @@ class ListIssue {
if (obj.project) { if (obj.project) {
this.project = new IssueProject(obj.project); this.project = new IssueProject(obj.project);
} }
=======
>>>>>>> upstream/master
if (obj.milestone) { if (obj.milestone) {
this.milestone = new ListMilestone(obj.milestone); this.milestone = new ListMilestone(obj.milestone);
......
...@@ -345,7 +345,6 @@ import initGroupAnalytics from './init_group_analytics'; ...@@ -345,7 +345,6 @@ import initGroupAnalytics from './init_group_analytics';
break; break;
case 'projects:merge_requests:show': case 'projects:merge_requests:show':
new Diff(); new Diff();
shortcut_handler = new ShortcutsIssuable(true);
new ZenMode(); new ZenMode();
initIssuableSidebar(); initIssuableSidebar();
...@@ -355,6 +354,8 @@ import initGroupAnalytics from './init_group_analytics'; ...@@ -355,6 +354,8 @@ import initGroupAnalytics from './init_group_analytics';
window.mergeRequest = new MergeRequest({ window.mergeRequest = new MergeRequest({
action: mrShowNode.dataset.mrAction, action: mrShowNode.dataset.mrAction,
}); });
shortcut_handler = new ShortcutsIssuable(true);
break; break;
case 'dashboard:activity': case 'dashboard:activity':
new gl.Activities(); new gl.Activities();
......
...@@ -249,8 +249,9 @@ export default { ...@@ -249,8 +249,9 @@ export default {
/> />
<div <div
class="blank-state blank-state-no-icon" class="blank-state-row"
v-if="!isLoading && state.environments.length === 0"> v-if="!isLoading && state.environments.length === 0">
<div class="blank-state-center">
<h2 class="blank-state-title js-blank-state-title"> <h2 class="blank-state-title js-blank-state-title">
You don't have any environments right now. You don't have any environments right now.
</h2> </h2>
...@@ -269,6 +270,7 @@ export default { ...@@ -269,6 +270,7 @@ export default {
New environment New environment
</a> </a>
</div> </div>
</div>
<div <div
class="table-holder" class="table-holder"
......
/* eslint-disable no-new */ /* eslint-disable no-new */
import LabelsSelect from './labels_select'; import LabelsSelect from './labels_select';
/* global MilestoneSelect */ /* global MilestoneSelect */
<<<<<<< HEAD
/* global WeightSelect */ /* global WeightSelect */
=======
>>>>>>> upstream/master
import subscriptionSelect from './subscription_select'; import subscriptionSelect from './subscription_select';
import UsersSelect from './users_select'; import UsersSelect from './users_select';
import issueStatusSelect from './issue_status_select'; import issueStatusSelect from './issue_status_select';
...@@ -12,5 +15,8 @@ export default () => { ...@@ -12,5 +15,8 @@ export default () => {
new MilestoneSelect(); new MilestoneSelect();
issueStatusSelect(); issueStatusSelect();
subscriptionSelect(); subscriptionSelect();
<<<<<<< HEAD
new WeightSelect(); new WeightSelect();
=======
>>>>>>> upstream/master
}; };
...@@ -107,6 +107,11 @@ export default { ...@@ -107,6 +107,11 @@ export default {
required: false, required: false,
default: 'issue', default: 'issue',
}, },
canAttachFile: {
type: Boolean,
required: false,
default: true,
},
}, },
data() { data() {
const store = new Store({ const store = new Store({
......
...@@ -29,7 +29,6 @@ import './commit/image_file'; ...@@ -29,7 +29,6 @@ import './commit/image_file';
// lib/utils // lib/utils
import { handleLocationHash } from './lib/utils/common_utils'; import { handleLocationHash } from './lib/utils/common_utils';
import './lib/utils/datetime_utility'; import './lib/utils/datetime_utility';
import './lib/utils/pretty_time';
import './lib/utils/url_utility'; import './lib/utils/url_utility';
// behaviors // behaviors
...@@ -73,6 +72,7 @@ import './projects_dropdown'; ...@@ -73,6 +72,7 @@ import './projects_dropdown';
import './projects_list'; import './projects_list';
import './syntax_highlight'; import './syntax_highlight';
import './render_math'; import './render_math';
import './render_mermaid';
import './render_gfm'; import './render_gfm';
import './right_sidebar'; import './right_sidebar';
import './search'; import './search';
......
import Vue from 'vue'; import axios from '../../lib/utils/axios_utils';
import VueResource from 'vue-resource';
import statusCodes from '../../lib/utils/http_status'; import statusCodes from '../../lib/utils/http_status';
import { backOff } from '../../lib/utils/common_utils'; import { backOff } from '../../lib/utils/common_utils';
Vue.use(VueResource);
const MAX_REQUESTS = 3; const MAX_REQUESTS = 3;
function backOffRequest(makeRequestCallback) { function backOffRequest(makeRequestCallback) {
...@@ -32,8 +29,8 @@ export default class MonitoringService { ...@@ -32,8 +29,8 @@ export default class MonitoringService {
} }
getGraphsData() { getGraphsData() {
return backOffRequest(() => Vue.http.get(this.metricsEndpoint)) return backOffRequest(() => axios.get(this.metricsEndpoint))
.then(resp => resp.json()) .then(resp => resp.data)
.then((response) => { .then((response) => {
if (!response || !response.data) { if (!response || !response.data) {
throw new Error('Unexpected metrics data response from prometheus endpoint'); throw new Error('Unexpected metrics data response from prometheus endpoint');
...@@ -43,8 +40,8 @@ export default class MonitoringService { ...@@ -43,8 +40,8 @@ export default class MonitoringService {
} }
getDeploymentData() { getDeploymentData() {
return backOffRequest(() => Vue.http.get(this.deploymentEndpoint)) return backOffRequest(() => axios.get(this.deploymentEndpoint))
.then(resp => resp.json()) .then(resp => resp.data)
.then((response) => { .then((response) => {
if (!response || !response.deployments) { if (!response || !response.deployments) {
throw new Error('Unexpected deployment data response from prometheus endpoint'); throw new Error('Unexpected deployment data response from prometheus endpoint');
......
...@@ -267,10 +267,12 @@ ...@@ -267,10 +267,12 @@
/> />
<div <div
class="blank-state blank-state-no-icon" class="blank-state-row"
v-if="shouldRenderNoPipelinesMessage"> v-if="shouldRenderNoPipelinesMessage">
<div class="blank-state-center">
<h2 class="blank-state-title js-blank-state-title">No pipelines to show.</h2> <h2 class="blank-state-title js-blank-state-title">No pipelines to show.</h2>
</div> </div>
</div>
<div <div
class="table-holder" class="table-holder"
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
// Render Gitlab flavoured Markdown // Render Gitlab flavoured Markdown
// //
// Delegates to syntax highlight and render math // Delegates to syntax highlight and render math & mermaid diagrams.
// //
(function() { (function() {
$.fn.renderGFM = function() { $.fn.renderGFM = function() {
this.find('.js-syntax-highlight').syntaxHighlight(); this.find('.js-syntax-highlight').syntaxHighlight();
this.find('.js-render-math').renderMath(); this.find('.js-render-math').renderMath();
this.find('.js-render-mermaid').renderMermaid();
return this; return this;
}; };
......
// Renders diagrams and flowcharts from text using Mermaid in any element with the
// `js-render-mermaid` class.
//
// Example markup:
//
// <pre class="js-render-mermaid">
// graph TD;
// A-- > B;
// A-- > C;
// B-- > D;
// C-- > D;
// </pre>
//
import Flash from './flash';
$.fn.renderMermaid = function renderMermaid() {
if (this.length === 0) return;
import(/* webpackChunkName: 'mermaid' */ 'blackst0ne-mermaid').then((mermaid) => {
mermaid.initialize({
loadOnStart: false,
theme: 'neutral',
});
mermaid.init(undefined, this);
}).catch((err) => {
Flash(`Can't load mermaid module: ${err}`);
});
};
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
<template> <template>
<div class="md-header"> <div class="md-header">
<ul class="nav-links clearfix"> <ul class="nav-links clearfix">
<li :class="{ active: !previewMarkdown }"> <li
class="md-header-tab"
:class="{ active: !previewMarkdown }">
<a <a
class="js-write-link" class="js-write-link"
href="#md-write-holder" href="#md-write-holder"
...@@ -59,7 +61,9 @@ ...@@ -59,7 +61,9 @@
Write Write
</a> </a>
</li> </li>
<li :class="{ active: previewMarkdown }"> <li
class="md-header-tab"
:class="{ active: previewMarkdown }">
<a <a
class="js-preview-link" class="js-preview-link"
href="#md-preview-holder" href="#md-preview-holder"
...@@ -68,8 +72,7 @@ ...@@ -68,8 +72,7 @@
Preview Preview
</a> </a>
</li> </li>
<li class="pull-right"> <li class="md-header-toolbar">
<div class="toolbar-group">
<toolbar-button <toolbar-button
tag="**" tag="**"
button-title="Add bold text" button-title="Add bold text"
...@@ -103,12 +106,10 @@ ...@@ -103,12 +106,10 @@
:prepend="true" :prepend="true"
button-title="Add a task list" button-title="Add a task list"
icon="task-done" /> icon="task-done" />
</div>
<div class="toolbar-group">
<button <button
v-tooltip v-tooltip
aria-label="Go full screen" aria-label="Go full screen"
class="toolbar-btn js-zen-enter" class="toolbar-btn toolbar-fullscreen-btn js-zen-enter"
data-container="body" data-container="body"
tabindex="-1" tabindex="-1"
title="Go full screen" title="Go full screen"
...@@ -117,7 +118,6 @@ ...@@ -117,7 +118,6 @@
name="screen-full"> name="screen-full">
</icon> </icon>
</button> </button>
</div>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<button <button
v-tooltip v-tooltip
type="button" type="button"
class="toolbar-btn js-md hidden-xs" class="toolbar-btn js-md"
tabindex="-1" tabindex="-1"
data-container="body" data-container="body"
:data-md-tag="tag" :data-md-tag="tag"
......
...@@ -56,6 +56,12 @@ ...@@ -56,6 +56,12 @@
} }
} }
.blank-state-center {
padding-top: 20px;
padding-bottom: 20px;
text-align: center;
}
.blank-state { .blank-state {
padding: 20px; padding: 20px;
border: 1px solid $border-color; border: 1px solid $border-color;
...@@ -67,7 +73,10 @@ ...@@ -67,7 +73,10 @@
align-items: center; align-items: center;
padding: 50px 30px; padding: 50px 30px;
} }
}
.blank-state,
.blank-state-center {
.blank-state-icon { .blank-state-icon {
svg { svg {
display: block; display: block;
......
...@@ -438,6 +438,7 @@ img.emoji { ...@@ -438,6 +438,7 @@ img.emoji {
/** COMMON CLASSES **/ /** COMMON CLASSES **/
.prepend-top-0 { margin-top: 0; } .prepend-top-0 { margin-top: 0; }
.prepend-top-5 { margin-top: 5px; } .prepend-top-5 { margin-top: 5px; }
.prepend-top-8 { margin-top: $grid-size; }
.prepend-top-10 { margin-top: 10px; } .prepend-top-10 { margin-top: 10px; }
.prepend-top-15 { margin-top: 15px; } .prepend-top-15 { margin-top: 15px; }
.prepend-top-default { margin-top: $gl-padding !important; } .prepend-top-default { margin-top: $gl-padding !important; }
......
...@@ -40,12 +40,6 @@ ...@@ -40,12 +40,6 @@
a:hover { a:hover {
background-color: $link-hover-background; background-color: $link-hover-background;
color: $gl-text-color; color: $gl-text-color;
.settings-avatar {
svg {
fill: $gl-text-color;
}
}
} }
.avatar-container { .avatar-container {
...@@ -138,10 +132,6 @@ ...@@ -138,10 +132,6 @@
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
} }
svg {
fill: $gl-text-color-secondary;
}
.nav-item-name { .nav-item-name {
flex: 1; flex: 1;
} }
...@@ -224,10 +214,6 @@ ...@@ -224,10 +214,6 @@
&:hover { &:hover {
color: $gl-text-color; color: $gl-text-color;
svg {
fill: $gl-text-color;
}
} }
} }
...@@ -338,7 +324,6 @@ ...@@ -338,7 +324,6 @@
align-items: center; align-items: center;
svg { svg {
fill: $gl-text-color-secondary;
margin-right: 8px; margin-right: 8px;
} }
...@@ -349,10 +334,6 @@ ...@@ -349,10 +334,6 @@
&:hover { &:hover {
background-color: $border-color; background-color: $border-color;
color: $gl-text-color; color: $gl-text-color;
svg {
fill: $gl-text-color;
}
} }
} }
......
...@@ -305,16 +305,11 @@ ...@@ -305,16 +305,11 @@
color: $gl-text-color; color: $gl-text-color;
border-color: $dropdown-input-focus-border; border-color: $dropdown-input-focus-border;
outline: none; outline: none;
svg {
fill: $gl-text-color;
}
} }
svg { svg {
height: 14px; height: 14px;
width: 14px; width: 14px;
fill: $gl-text-color-secondary;
vertical-align: middle; vertical-align: middle;
} }
......
...@@ -30,10 +30,6 @@ ...@@ -30,10 +30,6 @@
&.dropdown.open > a { &.dropdown.open > a {
color: $color-900; color: $color-900;
background-color: $color-alternate; background-color: $color-alternate;
svg {
fill: currentColor;
}
} }
&.line-separator { &.line-separator {
...@@ -51,10 +47,6 @@ ...@@ -51,10 +47,6 @@
color: $color-200; color: $color-200;
> a { > a {
svg {
fill: $color-200;
}
&.header-user-dropdown-toggle { &.header-user-dropdown-toggle {
.header-user-avatar { .header-user-avatar {
border-color: $color-200; border-color: $color-200;
......
...@@ -235,10 +235,6 @@ ...@@ -235,10 +235,6 @@
opacity: 1; opacity: 1;
color: $white-light; color: $white-light;
svg {
fill: currentColor;
}
&.header-user-dropdown-toggle .header-user-avatar { &.header-user-dropdown-toggle .header-user-avatar {
border-color: $white-light; border-color: $white-light;
} }
...@@ -269,14 +265,6 @@ ...@@ -269,14 +265,6 @@
font-size: 20px; font-size: 20px;
} }
} }
&.active > a,
&.dropdown.open > a {
svg {
fill: currentColor;
}
}
} }
} }
} }
...@@ -289,10 +277,6 @@ ...@@ -289,10 +277,6 @@
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
color: $white-light; color: $white-light;
svg {
fill: currentColor;
}
} }
> a { > a {
...@@ -307,10 +291,6 @@ ...@@ -307,10 +291,6 @@
border-radius: $border-radius-default; border-radius: $border-radius-default;
height: 32px; height: 32px;
font-weight: $gl-font-weight-bold; font-weight: $gl-font-weight-bold;
svg {
fill: currentColor;
}
} }
&.line-separator { &.line-separator {
......
.ci-status-icon-success, .ci-status-icon-success,
.ci-status-icon-passed { .ci-status-icon-passed {
color: $green-500; color: $green-500;
svg {
fill: $green-500;
}
} }
.ci-status-icon-failed { .ci-status-icon-failed {
color: $gl-danger; color: $gl-danger;
svg {
fill: $gl-danger;
}
} }
.ci-status-icon-pending, .ci-status-icon-pending,
.ci-status-icon-failed_with_warnings, .ci-status-icon-failed_with_warnings,
.ci-status-icon-success_with_warnings { .ci-status-icon-success_with_warnings {
color: $orange-500; color: $orange-500;
svg {
fill: $orange-500;
}
} }
.ci-status-icon-running { .ci-status-icon-running {
color: $blue-400; color: $blue-400;
svg {
fill: $blue-400;
}
} }
.ci-status-icon-canceled, .ci-status-icon-canceled,
.ci-status-icon-disabled, .ci-status-icon-disabled,
.ci-status-icon-not-found { .ci-status-icon-not-found {
color: $gl-text-color; color: $gl-text-color;
svg {
fill: $gl-text-color;
}
} }
.ci-status-icon-created, .ci-status-icon-created,
.ci-status-icon-skipped { .ci-status-icon-skipped {
color: $gray-darkest; color: $gray-darkest;
svg {
fill: $gray-darkest;
}
} }
.ci-status-icon-manual { .ci-status-icon-manual {
color: $gl-text-color; color: $gl-text-color;
svg {
fill: $gl-text-color;
}
} }
.icon-link { .icon-link {
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
} }
svg { svg {
fill: currentColor;
&.s8 { @include svg-size(8px); } &.s8 { @include svg-size(8px); }
&.s12 { @include svg-size(12px); } &.s12 { @include svg-size(12px); }
&.s16 { @include svg-size(16px); } &.s16 { @include svg-size(16px); }
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
.md-header { .md-header {
.nav-links { .nav-links {
a { a {
width: 100%;
padding-top: 0; padding-top: 0;
line-height: 19px; line-height: 19px;
...@@ -72,6 +73,28 @@ ...@@ -72,6 +73,28 @@
} }
} }
.md-header-tab {
@media(max-width: $screen-xs-max) {
flex: 1;
width: 100%;
border-bottom: 1px solid $border-color;
text-align: center;
}
}
.md-header-toolbar {
margin-left: auto;
@media(max-width: $screen-xs-max) {
flex: none;
display: flex;
justify-content: center;
width: 100%;
padding-top: $gl-padding-top;
padding-bottom: $gl-padding-top;
}
}
.referenced-users { .referenced-users {
color: $gl-text-color; color: $gl-text-color;
padding-top: 10px; padding-top: 10px;
...@@ -126,16 +149,6 @@ ...@@ -126,16 +149,6 @@
} }
} }
.toolbar-group {
float: left;
margin-right: -5px;
margin-left: $gl-padding;
&:first-child {
margin-left: 0;
}
}
.toolbar-btn { .toolbar-btn {
float: left; float: left;
padding: 0 7px; padding: 0 7px;
...@@ -158,6 +171,16 @@ ...@@ -158,6 +171,16 @@
} }
} }
.toolbar-fullscreen-btn {
margin-left: $gl-padding;
margin-right: -5px;
@media(max-width: $screen-xs-max) {
margin-left: 0;
margin-right: 0;
}
}
.atwho-view { .atwho-view {
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
......
...@@ -130,14 +130,6 @@ ...@@ -130,14 +130,6 @@
background-color: $color-light; background-color: $color-light;
color: $color-dark; color: $color-dark;
border-color: $color-dark; border-color: $color-dark;
svg {
fill: $color-dark;
}
}
svg {
fill: $color-main;
} }
} }
......
...@@ -57,15 +57,7 @@ ...@@ -57,15 +57,7 @@
padding: 5px; padding: 5px;
font-size: 36px; font-size: 36px;
svg {
fill: $gl-text-color;
}
&:hover { &:hover {
color: $black; color: $black;
svg {
fill: $black;
}
} }
} }
.documentation-index {
h1 {
margin: 0;
}
h2 {
font-size: 20px;
}
li {
line-height: 24px;
color: $document-index-color;
a {
margin-right: 3px;
}
}
}
.shortcut-mappings { .shortcut-mappings {
font-size: 12px; font-size: 12px;
color: $help-shortcut-mapping-color; color: $help-shortcut-mapping-color;
......
...@@ -547,10 +547,6 @@ ul.notes { ...@@ -547,10 +547,6 @@ ul.notes {
width: 16px; width: 16px;
top: 0; top: 0;
vertical-align: text-top; vertical-align: text-top;
path {
fill: currentColor;
}
} }
.award-control-icon-positive, .award-control-icon-positive,
...@@ -570,10 +566,6 @@ ul.notes { ...@@ -570,10 +566,6 @@ ul.notes {
.link-highlight { .link-highlight {
color: $gl-link-color; color: $gl-link-color;
fill: $gl-link-color; fill: $gl-link-color;
svg {
fill: $gl-link-color;
}
} }
.award-control-icon-neutral { .award-control-icon-neutral {
......
...@@ -55,10 +55,6 @@ ...@@ -55,10 +55,6 @@
&:not(span):hover { &:not(span):hover {
background-color: rgba($gl-text-color-secondary, .07); background-color: rgba($gl-text-color-secondary, .07);
} }
svg {
fill: $gl-text-color-secondary;
}
} }
} }
......
...@@ -86,7 +86,8 @@ class Groups::MilestonesController < Groups::ApplicationController ...@@ -86,7 +86,8 @@ class Groups::MilestonesController < Groups::ApplicationController
GroupMilestone.build_collection(group, group_projects, params) GroupMilestone.build_collection(group, group_projects, params)
end end
milestones + legacy_milestones @sort = params[:sort] || 'due_date_asc'
MilestoneArray.sort(milestones + legacy_milestones, @sort)
end end
def milestone def milestone
......
...@@ -22,12 +22,7 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -22,12 +22,7 @@ class Projects::CommitController < Projects::ApplicationController
apply_diff_view_cookie! apply_diff_view_cookie!
respond_to do |format| respond_to do |format|
format.html do format.html { render }
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37599
Gitlab::GitalyClient.allow_n_plus_1_calls do
render
end
end
format.diff { render text: @commit.to_diff } format.diff { render text: @commit.to_diff }
format.patch { render text: @commit.to_patch } format.patch { render text: @commit.to_patch }
end end
...@@ -112,7 +107,7 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -112,7 +107,7 @@ class Projects::CommitController < Projects::ApplicationController
end end
def commit def commit
@noteable = @commit ||= @project.commit(params[:id]) @noteable = @commit ||= @project.commit_by(oid: params[:id])
end end
def define_commit_vars def define_commit_vars
......
...@@ -10,11 +10,8 @@ class Projects::MergeRequests::DiffsController < Projects::MergeRequests::Applic ...@@ -10,11 +10,8 @@ class Projects::MergeRequests::DiffsController < Projects::MergeRequests::Applic
def show def show
@environment = @merge_request.environments_for(current_user).last @environment = @merge_request.environments_for(current_user).last
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37431
Gitlab::GitalyClient.allow_n_plus_1_calls do
render json: { html: view_to_html_string("projects/merge_requests/diffs/_diffs") } render json: { html: view_to_html_string("projects/merge_requests/diffs/_diffs") }
end end
end
def diff_for_path def diff_for_path
render_diff_for_path(@diffs) render_diff_for_path(@diffs)
......
...@@ -222,7 +222,7 @@ module MarkupHelper ...@@ -222,7 +222,7 @@ module MarkupHelper
data = options[:data].merge({ container: 'body' }) data = options[:data].merge({ container: 'body' })
content_tag :button, content_tag :button,
type: 'button', type: 'button',
class: 'toolbar-btn js-md has-tooltip hidden-xs', class: 'toolbar-btn js-md has-tooltip',
tabindex: -1, tabindex: -1,
data: data, data: data,
title: options[:title], title: options[:title],
......
...@@ -150,7 +150,8 @@ module SearchHelper ...@@ -150,7 +150,8 @@ module SearchHelper
placeholder: 'Search or filter results...', placeholder: 'Search or filter results...',
data: { data: {
'username-params' => @users.to_json(only: [:id, :username]) 'username-params' => @users.to_json(only: [:id, :username])
} },
autocomplete: 'off'
} }
if @project.present? if @project.present?
......
...@@ -76,12 +76,24 @@ class Blob < SimpleDelegator ...@@ -76,12 +76,24 @@ class Blob < SimpleDelegator
new(blob, project) new(blob, project)
end end
def self.lazy(project, commit_id, path)
BatchLoader.for(commit_id: commit_id, path: path).batch do |items, loader|
project.repository.blobs_at(items.map(&:values)).each do |blob|
loader.call({ commit_id: blob.commit_id, path: blob.path }, blob) if blob
end
end
end
def initialize(blob, project = nil) def initialize(blob, project = nil)
@project = project @project = project
super(blob) super(blob)
end end
def inspect
"#<#{self.class.name} oid:#{id[0..8]} commit:#{commit_id[0..8]} path:#{path}>"
end
# Returns the data of the blob. # Returns the data of the blob.
# #
# If the blob is a text based blob the content is converted to UTF-8 and any # If the blob is a text based blob the content is converted to UTF-8 and any
...@@ -95,8 +107,11 @@ class Blob < SimpleDelegator ...@@ -95,8 +107,11 @@ class Blob < SimpleDelegator
end end
def load_all_data! def load_all_data!
# Endpoint needed: gitlab-org/gitaly#756
Gitlab::GitalyClient.allow_n_plus_1_calls do
super(project.repository) if project super(project.repository) if project
end end
end
def no_highlighting? def no_highlighting?
raw_size && raw_size > MAXIMUM_TEXT_HIGHLIGHT_SIZE raw_size && raw_size > MAXIMUM_TEXT_HIGHLIGHT_SIZE
......
...@@ -520,7 +520,10 @@ module Ci ...@@ -520,7 +520,10 @@ module Ci
end end
def latest_builds_with_artifacts def latest_builds_with_artifacts
@latest_builds_with_artifacts ||= builds.latest.with_artifacts # We purposely cast the builds to an Array here. Because we always use the
# rows if there are more than 0 this prevents us from having to run two
# queries: one to get the count and one to get the rows.
@latest_builds_with_artifacts ||= builds.latest.with_artifacts.to_a
end end
private private
......
...@@ -84,7 +84,7 @@ class Commit ...@@ -84,7 +84,7 @@ class Commit
end end
def id def id
@raw.id raw.id
end end
def ==(other) def ==(other)
...@@ -361,7 +361,7 @@ class Commit ...@@ -361,7 +361,7 @@ class Commit
@deltas ||= raw.deltas @deltas ||= raw.deltas
end end
def diffs(diff_options = nil) def diffs(diff_options = {})
Gitlab::Diff::FileCollection::Commit.new(self, diff_options: diff_options) Gitlab::Diff::FileCollection::Commit.new(self, diff_options: diff_options)
end end
......
...@@ -225,11 +225,7 @@ class Repository ...@@ -225,11 +225,7 @@ class Repository
def branch_exists?(branch_name) def branch_exists?(branch_name)
return false unless raw_repository return false unless raw_repository
@branch_exists_memo ||= Hash.new do |hash, key| branch_names.include?(branch_name)
hash[key] = raw_repository.branch_exists?(key)
end
@branch_exists_memo[branch_name]
end end
def ref_exists?(ref) def ref_exists?(ref)
...@@ -486,6 +482,11 @@ class Repository ...@@ -486,6 +482,11 @@ class Repository
nil nil
end end
# items is an Array like: [[oid, path], [oid1, path1]]
def blobs_at(items)
raw_repository.batch_blobs(items).map { |blob| Blob.decorate(blob, project) }
end
def root_ref def root_ref
if raw_repository if raw_repository
raw_repository.root_ref raw_repository.root_ref
......
...@@ -7,7 +7,10 @@ class SystemNoteMetadata < ActiveRecord::Base ...@@ -7,7 +7,10 @@ class SystemNoteMetadata < ActiveRecord::Base
TYPES_WITH_CROSS_REFERENCES = %w[ TYPES_WITH_CROSS_REFERENCES = %w[
commit cross_reference commit cross_reference
close duplicate close duplicate
<<<<<<< HEAD
relate unrelate relate unrelate
=======
>>>>>>> upstream/master
].freeze ].freeze
ICON_TYPES = %w[ ICON_TYPES = %w[
......
...@@ -464,6 +464,10 @@ class User < ActiveRecord::Base ...@@ -464,6 +464,10 @@ class User < ActiveRecord::Base
skip_confirmation! if bool skip_confirmation! if bool
end end
def skip_reconfirmation=(bool)
skip_reconfirmation! if bool
end
def generate_reset_token def generate_reset_token
@reset_token, enc = Devise.token_generator.generate(self.class, :reset_password_token) @reset_token, enc = Devise.token_generator.generate(self.class, :reset_password_token)
......
...@@ -12,6 +12,8 @@ module MergeRequests ...@@ -12,6 +12,8 @@ module MergeRequests
attr_reader :merge_request, :source attr_reader :merge_request, :source
delegate :merge_jid, :state, to: :@merge_request
def execute(merge_request) def execute(merge_request)
if project.merge_requests_ff_only_enabled && !self.is_a?(FfMergeService) if project.merge_requests_ff_only_enabled && !self.is_a?(FfMergeService)
FfMergeService.new(project, current_user, params).execute(merge_request) FfMergeService.new(project, current_user, params).execute(merge_request)
...@@ -29,6 +31,7 @@ module MergeRequests ...@@ -29,6 +31,7 @@ module MergeRequests
success success
end end
end end
log_info("Merge process finished on JID #{merge_jid} with state #{state}")
rescue MergeError => e rescue MergeError => e
handle_merge_error(log_message: e.message, save_message_on_model: true) handle_merge_error(log_message: e.message, save_message_on_model: true)
end end
...@@ -73,7 +76,9 @@ module MergeRequests ...@@ -73,7 +76,9 @@ module MergeRequests
def commit def commit
message = params[:commit_message] || merge_request.merge_commit_message message = params[:commit_message] || merge_request.merge_commit_message
log_info("Git merge started on JID #{merge_jid}")
commit_id = repository.merge(current_user, source, merge_request, message) commit_id = repository.merge(current_user, source, merge_request, message)
log_info("Git merge finished on JID #{merge_jid} commit #{commit_id}")
raise MergeError, 'Conflicts detected during merge' unless commit_id raise MergeError, 'Conflicts detected during merge' unless commit_id
...@@ -87,7 +92,9 @@ module MergeRequests ...@@ -87,7 +92,9 @@ module MergeRequests
end end
def after_merge def after_merge
log_info("Post merge started on JID #{merge_jid} with state #{state}")
MergeRequests::PostMergeService.new(project, current_user).execute(merge_request) MergeRequests::PostMergeService.new(project, current_user).execute(merge_request)
log_info("Post merge finished on JID #{merge_jid} with state #{state}")
if delete_source_branch? if delete_source_branch?
DeleteBranchService.new(@merge_request.source_project, branch_deletion_user) DeleteBranchService.new(@merge_request.source_project, branch_deletion_user)
...@@ -116,6 +123,11 @@ module MergeRequests ...@@ -116,6 +123,11 @@ module MergeRequests
@merge_request.update(merge_error: log_message) if save_message_on_model @merge_request.update(merge_error: log_message) if save_message_on_model
end end
def log_info(message)
@logger ||= Rails.logger
@logger.info("#{merge_request_info} - #{message}")
end
def merge_request_info def merge_request_info
merge_request.to_reference(full: true) merge_request.to_reference(full: true)
end end
......
...@@ -8,14 +8,14 @@ module Milestones ...@@ -8,14 +8,14 @@ module Milestones
check_project_milestone!(milestone) check_project_milestone!(milestone)
Milestone.transaction do Milestone.transaction do
# Destroy all milestones with same title across projects
destroy_old_milestones(milestone)
group_milestone = clone_project_milestone(milestone) group_milestone = clone_project_milestone(milestone)
move_children_to_group_milestone(group_milestone) move_children_to_group_milestone(group_milestone)
# Just to be safe # Destroy all milestones with same title across projects
destroy_old_milestones(milestone)
# Rollback if milestone is not valid
unless group_milestone.valid? unless group_milestone.valid?
raise_error(group_milestone.errors.full_messages.to_sentence) raise_error(group_milestone.errors.full_messages.to_sentence)
end end
...@@ -37,7 +37,7 @@ module Milestones ...@@ -37,7 +37,7 @@ module Milestones
end end
def move_children_to_group_milestone(group_milestone) def move_children_to_group_milestone(group_milestone)
milestone_ids_for_merge(group_milestone).in_groups_of(100) do |milestone_ids| milestone_ids_for_merge(group_milestone).in_groups_of(100, false) do |milestone_ids|
update_children(group_milestone, milestone_ids) update_children(group_milestone, milestone_ids)
end end
end end
...@@ -51,7 +51,12 @@ module Milestones ...@@ -51,7 +51,12 @@ module Milestones
create_service = CreateService.new(group, current_user, params) create_service = CreateService.new(group, current_user, params)
create_service.execute milestone = create_service.execute
# milestone won't be valid here because of duplicated title
milestone.save(validate: false)
milestone
end end
def update_children(group_milestone, milestone_ids) def update_children(group_milestone, milestone_ids)
...@@ -67,12 +72,12 @@ module Milestones ...@@ -67,12 +72,12 @@ module Milestones
@group ||= parent.group || raise_error('Project does not belong to a group.') @group ||= parent.group || raise_error('Project does not belong to a group.')
end end
def destroy_old_milestones(group_milestone) def destroy_old_milestones(milestone)
Milestone.where(id: milestone_ids_for_merge(group_milestone)).destroy_all Milestone.where(id: milestone_ids_for_merge(milestone)).destroy_all
end end
def group_project_ids def group_project_ids
@group_project_ids ||= group.projects.map(&:id) @group_project_ids ||= group.projects.pluck(:id)
end end
def raise_error(message) def raise_error(message)
......
...@@ -26,11 +26,15 @@ class FileUploader < GitlabUploader ...@@ -26,11 +26,15 @@ class FileUploader < GitlabUploader
# This is used to build Upload paths dynamically based on the model's current # This is used to build Upload paths dynamically based on the model's current
# namespace and path, allowing us to ignore renames or transfers. # namespace and path, allowing us to ignore renames or transfers.
# #
# model - Object that responds to `path_with_namespace` # model - Object that responds to `full_path` and `disk_path`
# #
# Returns a String without a trailing slash # Returns a String without a trailing slash
def self.dynamic_path_segment(model) def self.dynamic_path_segment(project)
File.join(CarrierWave.root, base_dir, model.disk_path) if project.hashed_storage?(:attachments)
File.join(CarrierWave.root, base_dir, project.disk_path)
else
File.join(CarrierWave.root, base_dir, project.full_path)
end
end end
attr_accessor :model attr_accessor :model
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
= render 'shared/milestones_filter', counts: @milestone_states = render 'shared/milestones_filter', counts: @milestone_states
.nav-controls .nav-controls
= render 'shared/milestones_sort_dropdown'
- if can?(current_user, :admin_milestones, @group) - if can?(current_user, :admin_milestones, @group)
= link_to "New milestone", new_group_milestone_path(@group), class: "btn btn-new" = link_to "New milestone", new_group_milestone_path(@group), class: "btn btn-new"
......
- breadcrumb_title "Milestones" - breadcrumb_title "Milestones"
- page_title "Milestones" - page_title "Milestones"
- header_title group_title(@group, "Milestones", group_milestones_path(@group))
%h3.page-title %h3.page-title
New Milestone New Milestone
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
.row.prepend-top-default .row.prepend-top-default
.col-md-8 .col-md-8
.documentation-index .documentation-index.wiki
= markdown(@help_index) = markdown(@help_index)
.col-md-4 .col-md-4
.panel.panel-default .panel.panel-default
......
...@@ -10,15 +10,14 @@ ...@@ -10,15 +10,14 @@
.md-area .md-area
.md-header .md-header
%ul.nav-links.clearfix %ul.nav-links.clearfix
%li.active %li.md-header-tab.active
%a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 } %a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 }
Write Write
%li %li.md-header-tab
%a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 } %a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 }
Preview Preview
%li.pull-right %li.md-header-toolbar
.toolbar-group
= markdown_toolbar_button({ icon: "bold", data: { "md-tag" => "**" }, title: "Add bold text" }) = markdown_toolbar_button({ icon: "bold", data: { "md-tag" => "**" }, title: "Add bold text" })
= markdown_toolbar_button({ icon: "italic", data: { "md-tag" => "*" }, title: "Add italic text" }) = markdown_toolbar_button({ icon: "italic", data: { "md-tag" => "*" }, title: "Add italic text" })
= markdown_toolbar_button({ icon: "quote", data: { "md-tag" => "> ", "md-prepend" => true }, title: "Insert a quote" }) = markdown_toolbar_button({ icon: "quote", data: { "md-tag" => "> ", "md-prepend" => true }, title: "Insert a quote" })
...@@ -26,8 +25,7 @@ ...@@ -26,8 +25,7 @@
= markdown_toolbar_button({ icon: "list-bulleted", data: { "md-tag" => "* ", "md-prepend" => true }, title: "Add a bullet list" }) = markdown_toolbar_button({ icon: "list-bulleted", data: { "md-tag" => "* ", "md-prepend" => true }, title: "Add a bullet list" })
= markdown_toolbar_button({ icon: "list-numbered", data: { "md-tag" => "1. ", "md-prepend" => true }, title: "Add a numbered list" }) = markdown_toolbar_button({ icon: "list-numbered", data: { "md-tag" => "1. ", "md-prepend" => true }, title: "Add a numbered list" })
= markdown_toolbar_button({ icon: "task-done", data: { "md-tag" => "* [ ] ", "md-prepend" => true }, title: "Add a task list" }) = markdown_toolbar_button({ icon: "task-done", data: { "md-tag" => "* [ ] ", "md-prepend" => true }, title: "Add a task list" })
.toolbar-group %button.toolbar-btn.toolbar-fullscreen-btn.js-zen-enter.has-tooltip{ type: "button", tabindex: -1, aria: { label: "Go full screen" }, title: "Go full screen", data: { container: "body" } }
%button.toolbar-btn.js-zen-enter.has-tooltip{ type: "button", tabindex: -1, aria: { label: "Go full screen" }, title: "Go full screen", data: { container: "body" } }
= sprite_icon("screen-full") = sprite_icon("screen-full")
.md-write-holder .md-write-holder
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
.environments-container .environments-container
- if @deployments.blank? - if @deployments.blank?
.blank-state.blank-state-no-icon .blank-state-row
.blank-state-center
%h2.blank-state-title %h2.blank-state-title
You don't have any deployments right now. You don't have any deployments right now.
%p.blank-state-text %p.blank-state-text
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
.dropdown-menu.dropdown-menu-align-right.hidden-lg .dropdown-menu.dropdown-menu-align-right.hidden-lg
%ul %ul
- if can_update_issue - if can_update_issue
%li= link_to 'Edit', edit_project_issue_path(@project, @issue) %li= link_to 'Edit', edit_project_issue_path(@project, @issue), class: 'issuable-edit'
- unless current_user == @issue.author - unless current_user == @issue.author
%li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue)) %li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue))
- if can_update_issue - if can_update_issue
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.sidebar-container .sidebar-container
.blocks-container .blocks-container
.block .block
%strong.prepend-top-10 %strong.inline.prepend-top-8
= @build.name = @build.name
- if can?(current_user, :update_build, @build) && @build.retryable? - if can?(current_user, :update_build, @build) && @build.retryable?
= link_to "Retry", retry_namespace_project_job_path(@project.namespace, @project, @build), class: 'js-retry-button pull-right btn btn-inverted-secondary btn-retry visible-md-block visible-lg-block', method: :post = link_to "Retry", retry_namespace_project_job_path(@project.namespace, @project, @build), class: 'js-retry-button pull-right btn btn-inverted-secondary btn-retry visible-md-block visible-lg-block', method: :post
......
- @no_container = true - @no_container = true
- @sort ||= sort_value_recently_updated - @sort ||= sort_value_recently_updated
- page_title _('TagsPage|Tags') - page_title s_('TagsPage|Tags')
- add_to_breadcrumbs("Repository", project_tree_path(@project)) - add_to_breadcrumbs("Repository", project_tree_path(@project))
.flex-list{ class: container_class } .flex-list{ class: container_class }
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
%li %li
If your HTTP repository is not publicly accessible, add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>. If your HTTP repository is not publicly accessible, add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>.
%li %li
The import will time out after 15 minutes. For repositories that take longer, use a clone/push combination. The import will time out after #{time_interval_in_words(Gitlab.config.gitlab_shell.git_timeout)}.
For repositories that take longer, use a clone/push combination.
%li %li
To migrate an SVN repository, check out #{link_to "this document", help_page_path('user/project/import/svn')}. To migrate an SVN repository, check out #{link_to "this document", help_page_path('user/project/import/svn')}.
%li %li
......
- show_create = local_assigns.fetch(:show_create, false)
- show_new_branch_form = show_new_repo? && show_create && can?(current_user, :push_code, @project) - show_new_branch_form = show_new_repo? && show_create && can?(current_user, :push_code, @project)
- dropdown_toggle_text = @ref || @project.default_branch - dropdown_toggle_text = @ref || @project.default_branch
= form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do = form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do
......
---
title: Impersonation no longer gets stuck on password change.
merge_request: 15497
author:
type: fixed
---
title: Disables autocomplete in filtered searc
merge_request: 15477
author: Jacopo Beschi @jacopo-beschi
type: added
---
title: Label addition/removal are not going to be redacted wrongfully in the API.
merge_request: 15080
author:
type: fixed
---
title: Add inline editing to issues on mobile
merge_request: 15438
author:
type: changed
---
title: Fix gitlab:backup rake for hashed storage based repositories
merge_request: 15400
author:
type: fixed
---
title: Add dropdown sort to group milestones
merge_request: 15230
author: George Andrinopoulos
type: added
---
title: Fix commits page throwing 500 when the multi-file editor was enabled
merge_request: 15502
author:
type: fixed
---
title: Set the default gitlab-shell timeout to 3 hours
merge_request: 15292
author:
type: fixed
---
title: Fix issue where clicking a GPG verification badge would scroll to the top of
the page
merge_request: 15407
author:
type: fixed
---
title: Removed unused rake task, 'rake gitlab:sidekiq:drop_post_receive'
merge_request: 15493
author:
type: fixed
---
title: Fix bitbucket wiki import with hashed storage enabled
merge_request: 15490
author:
type: fixed
--- ---
title: Fix hashed storage with project transfers to another namespace title: Fix blank states using old css
merge_request: merge_request:
author: author:
type: fixed type: fixed
--- ---
title: Make sure NotesActions#noteable returns a Noteable in the update action title: Align retry button with job title with new grid size
merge_request: merge_request:
author: author:
type: fixed type: fixed
---
title: Don't move repositories and attachments for projects using hashed storage
merge_request: 15479
author:
type: other
---
title: Fix crash when navigating to second page of the group dashbaord when there
are projects and groups on the first page
merge_request: 15456
author:
type: fixed
---
title: 'Add support of Mermaid (generation of diagrams and flowcharts from text)'
merge_request: 15107
author: Vitaliy @blackst0ne Klachkov
type: added
--- ---
title: Optimise getting the pipeline status of commits title: Update composite pipelines index to include "id"
merge_request: merge_request:
author: author:
type: performance type: performance
---
title: Update container repository path reference and allow using double underscore
merge_request: 15417
author:
type: fixed
---
title: Clarify wording of protected branch settings for the default branch
merge_request:
author:
type: other
---
title: Fixed new group milestone breadcrumbs
merge_request:
author:
type: fixed
---
title: Fix promoting milestone updating all issuables without milestone
merge_request:
author:
type: fixed
---
title: Add logs for monitoring the merge process
merge_request:
author:
type: other
--- ---
title: Truncate tree to max 1,000 items and display notice to users title: Use arrays in Pipeline#latest_builds_with_artifacts
merge_request: merge_request:
author: author:
type: performance type: performance
---
title: Add email confirmation parameters for user creation and update via API
merge_request:
author: Daniel Juarez
type: added
--- ---
title: Cache the number of user SSH keys title: Fetch blobs in bulk when generating diffs
merge_request: merge_request:
author: author:
type: performance type: performance
...@@ -673,8 +673,8 @@ production: &base ...@@ -673,8 +673,8 @@ production: &base
upload_pack: true upload_pack: true
receive_pack: true receive_pack: true
# Git import/fetch timeout # Git import/fetch timeout, in seconds. Defaults to 3 hours.
# git_timeout: 800 # git_timeout: 10800
# If you use non-standard ssh port you need to specify it # If you use non-standard ssh port you need to specify it
# ssh_port: 22 # ssh_port: 22
......
...@@ -514,7 +514,7 @@ Settings.gitlab_shell['ssh_port'] ||= 22 ...@@ -514,7 +514,7 @@ Settings.gitlab_shell['ssh_port'] ||= 22
Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user
Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user
Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.__send__(:build_gitlab_shell_ssh_path_prefix) Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.__send__(:build_gitlab_shell_ssh_path_prefix)
Settings.gitlab_shell['git_timeout'] ||= 800 Settings.gitlab_shell['git_timeout'] ||= 10800
# #
# Workhorse # Workhorse
......
Rails.application.config.middleware.use(BatchLoader::Middleware)
# Touch the lexers so it is registered with Rouge
Rouge::Lexers::Math
# Touch the lexers so it is registered with Rouge
Rouge::Lexers::Plantuml
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class CiPipelinesIndexOnProjectIdRefStatusId < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
TABLE = :ci_pipelines
OLD_COLUMNS = %i[project_id ref status].freeze
NEW_COLUMNS = %i[project_id ref status id].freeze
def up
unless index_exists?(TABLE, NEW_COLUMNS)
add_concurrent_index(TABLE, NEW_COLUMNS)
end
if index_exists?(TABLE, OLD_COLUMNS)
remove_concurrent_index(TABLE, OLD_COLUMNS)
end
end
def down
unless index_exists?(TABLE, OLD_COLUMNS)
add_concurrent_index(TABLE, OLD_COLUMNS)
end
if index_exists?(TABLE, NEW_COLUMNS)
remove_concurrent_index(TABLE, NEW_COLUMNS)
end
end
end
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
<<<<<<< HEAD
ActiveRecord::Schema.define(version: 20171120145444) do ActiveRecord::Schema.define(version: 20171120145444) do
=======
ActiveRecord::Schema.define(version: 20171121144800) do
>>>>>>> upstream/master
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
...@@ -459,7 +463,7 @@ ActiveRecord::Schema.define(version: 20171120145444) do ...@@ -459,7 +463,7 @@ ActiveRecord::Schema.define(version: 20171120145444) do
add_index "ci_pipelines", ["auto_canceled_by_id"], name: "index_ci_pipelines_on_auto_canceled_by_id", using: :btree add_index "ci_pipelines", ["auto_canceled_by_id"], name: "index_ci_pipelines_on_auto_canceled_by_id", using: :btree
add_index "ci_pipelines", ["pipeline_schedule_id"], name: "index_ci_pipelines_on_pipeline_schedule_id", using: :btree add_index "ci_pipelines", ["pipeline_schedule_id"], name: "index_ci_pipelines_on_pipeline_schedule_id", using: :btree
add_index "ci_pipelines", ["project_id", "ref", "status"], name: "index_ci_pipelines_on_project_id_and_ref_and_status", using: :btree add_index "ci_pipelines", ["project_id", "ref", "status", "id"], name: "index_ci_pipelines_on_project_id_and_ref_and_status_and_id", using: :btree
add_index "ci_pipelines", ["project_id", "sha"], name: "index_ci_pipelines_on_project_id_and_sha", using: :btree add_index "ci_pipelines", ["project_id", "sha"], name: "index_ci_pipelines_on_project_id_and_sha", using: :btree
add_index "ci_pipelines", ["project_id"], name: "index_ci_pipelines_on_project_id", using: :btree add_index "ci_pipelines", ["project_id"], name: "index_ci_pipelines_on_project_id", using: :btree
add_index "ci_pipelines", ["status"], name: "index_ci_pipelines_on_status", using: :btree add_index "ci_pipelines", ["status"], name: "index_ci_pipelines_on_status", using: :btree
......
...@@ -82,7 +82,7 @@ PUT /application/settings ...@@ -82,7 +82,7 @@ PUT /application/settings
| `clientside_sentry_enabled` | boolean | no | Enable Sentry error reporting for the client side | | `clientside_sentry_enabled` | boolean | no | Enable Sentry error reporting for the client side |
| `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes | | `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes |
| `default_artifacts_expire_in` | string | no | Set the default expiration time for each job's artifacts | | `default_artifacts_expire_in` | string | no | Set the default expiration time for each job's artifacts |
| `default_branch_protection` | integer | no | Determine if developers can push to master. Can take `0` _(not protected, both developers and masters can push new commits, force push or delete the branch)_, `1` _(partially protected, developers can push new commits, but cannot force push or delete the branch, masters can do anything)_ or `2` _(fully protected, developers cannot push new commits, force push or delete the branch, masters can do anything)_ as a parameter. Default is `2`. | | `default_branch_protection` | integer | no | Determine if developers can push to master. Can take `0` _(not protected, both developers and masters can push new commits, force push, or delete the branch)_, `1` _(partially protected, developers and masters can push new commits, but cannot force push or delete the branch)_ or `2` _(fully protected, developers cannot push new commits, but masters can; no-one can force push or delete the branch)_ as a parameter. Default is `2`. |
| `default_group_visibility` | string | no | What visibility level new groups receive. Can take `private`, `internal` and `public` as a parameter. Default is `private`. | | `default_group_visibility` | string | no | What visibility level new groups receive. Can take `private`, `internal` and `public` as a parameter. Default is `private`. |
| `default_project_visibility` | string | no | What visibility level new projects receive. Can take `private`, `internal` and `public` as a parameter. Default is `private`. | | `default_project_visibility` | string | no | What visibility level new projects receive. Can take `private`, `internal` and `public` as a parameter. Default is `private`. |
| `default_projects_limit` | integer | no | Project limit per user. Default is `100000` | | `default_projects_limit` | integer | no | Project limit per user. Default is `100000` |
......
...@@ -301,6 +301,7 @@ Parameters: ...@@ -301,6 +301,7 @@ Parameters:
- `location` (optional) - User's location - `location` (optional) - User's location
- `admin` (optional) - User is admin - true or false (default) - `admin` (optional) - User is admin - true or false (default)
- `can_create_group` (optional) - User can create groups - true or false - `can_create_group` (optional) - User can create groups - true or false
- `skip_reconfirmation` (optional) - Skip reconfirmation - true or false (default)
- `external` (optional) - Flags the user as external - true or false(default) - `external` (optional) - Flags the user as external - true or false(default)
- `shared_runners_minutes_limit` (optional) - Pipeline minutes quota for this user - `shared_runners_minutes_limit` (optional) - Pipeline minutes quota for this user
- `avatar` (optional) - Image file for user's avatar - `avatar` (optional) - Image file for user's avatar
......
...@@ -124,7 +124,7 @@ stages: ...@@ -124,7 +124,7 @@ stages:
1. First, all jobs of `build` are executed in parallel. 1. First, all jobs of `build` are executed in parallel.
1. If all jobs of `build` succeed, the `test` jobs are executed in parallel. 1. If all jobs of `build` succeed, the `test` jobs are executed in parallel.
1. If all jobs of `test` succeed, the `deploy` jobs are executed in parallel. 1. If all jobs of `test` succeed, the `deploy` jobs are executed in parallel.
1. If all jobs of `deploy` succeed, the commit is marked as `success`. 1. If all jobs of `deploy` succeed, the commit is marked as `passed`.
1. If any of the previous jobs fails, the commit is marked as `failed` and no 1. If any of the previous jobs fails, the commit is marked as `failed` and no
jobs of further stage are executed. jobs of further stage are executed.
......
...@@ -22,6 +22,52 @@ As an example you might create 5 issues in between counts, which would cause the ...@@ -22,6 +22,52 @@ As an example you might create 5 issues in between counts, which would cause the
> **Note:** In some cases the query count might change slightly between runs for unrelated reasons. In this case you might need to test `exceed_query_limit(control_count + acceptable_change)`, but this should be avoided if possible. > **Note:** In some cases the query count might change slightly between runs for unrelated reasons. In this case you might need to test `exceed_query_limit(control_count + acceptable_change)`, but this should be avoided if possible.
## Finding the source of the query
It may be useful to identify the source of the queries by looking at the call backtrace.
To enable this, run the specs with the `QUERY_RECORDER_DEBUG` environment variable set. For example:
```
QUERY_RECORDER_DEBUG=1 bundle exec rspec spec/requests/api/projects_spec.rb
```
This will log calls to QueryRecorder into the `test.log`. For example:
```
QueryRecorder SQL: SELECT COUNT(*) FROM "issues" WHERE "issues"."deleted_at" IS NULL AND "issues"."project_id" = $1 AND ("issues"."state" IN ('opened')) AND "issues"."confidential" = $2
--> /home/user/gitlab/gdk/gitlab/spec/support/query_recorder.rb:19:in `callback'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/fanout.rb:127:in `finish'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/fanout.rb:46:in `block in finish'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/fanout.rb:46:in `each'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/fanout.rb:46:in `finish'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:36:in `finish'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:25:in `instrument'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:601:in `exec_cache'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:585:in `execute_and_clear'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:356:in `select'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in `select_all'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `block in select_all'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `cache_sql'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `select_all'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation/calculations.rb:270:in `execute_simple_calculation'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation/calculations.rb:227:in `perform_calculation'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation/calculations.rb:133:in `calculate'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation/calculations.rb:48:in `count'
--> /home/user/gitlab/gdk/gitlab/app/services/base_count_service.rb:20:in `uncached_count'
--> /home/user/gitlab/gdk/gitlab/app/services/base_count_service.rb:12:in `block in count'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/cache.rb:299:in `block in fetch'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/cache.rb:585:in `block in save_block_result_to_cache'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/cache.rb:547:in `block in instrument'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/cache.rb:547:in `instrument'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/cache.rb:584:in `save_block_result_to_cache'
--> /home/user/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/cache.rb:299:in `fetch'
--> /home/user/gitlab/gdk/gitlab/app/services/base_count_service.rb:12:in `count'
--> /home/user/gitlab/gdk/gitlab/app/models/project.rb:1296:in `open_issues_count'
```
## See also ## See also
- [Bullet](profiling.md#Bullet) For finding `N+1` query problems - [Bullet](profiling.md#Bullet) For finding `N+1` query problems
......
...@@ -513,8 +513,7 @@ Check if GitLab and its environment are configured correctly: ...@@ -513,8 +513,7 @@ Check if GitLab and its environment are configured correctly:
### Compile GetText PO files ### Compile GetText PO files
sudo -u git -H bundle exec rake gettext:pack RAILS_ENV=production sudo -u git -H bundle exec rake gettext:compile RAILS_ENV=production
sudo -u git -H bundle exec rake gettext:po_to_json RAILS_ENV=production
### Compile Assets ### Compile Assets
......
...@@ -80,13 +80,13 @@ errors during usage. ...@@ -80,13 +80,13 @@ errors during usage.
- 256GB RAM supports up to 32,000 users - 256GB RAM supports up to 32,000 users
- More users? Run it on [multiple application servers](https://about.gitlab.com/high-availability/) - More users? Run it on [multiple application servers](https://about.gitlab.com/high-availability/)
We recommend having at least 2GB of swap on your server, even if you currently have We recommend having at least [2GB of swap on your server](https://askubuntu.com/a/505344/310789), even if you currently have
enough available RAM. Having swap will help reduce the chance of errors occurring enough available RAM. Having swap will help reduce the chance of errors occurring
if your available memory changes. We also recommend [configuring the kernel's swappiness setting](https://askubuntu.com/a/103916) if your available memory changes. We also recommend [configuring the kernel's swappiness setting](https://askubuntu.com/a/103916)
to a low value like `10` to make the most of your RAM while still having the swap to a low value like `10` to make the most of your RAM while still having the swap
available when needed. available when needed.
Notice: The 25 workers of Sidekiq will show up as separate processes in your process overview (such as top or htop) but they share the same RAM allocation since Sidekiq is a multithreaded application. Please see the section below about Unicorn workers for information about how many you need of those. Notice: The 25 workers of Sidekiq will show up as separate processes in your process overview (such as `top` or `htop`) but they share the same RAM allocation since Sidekiq is a multithreaded application. Please see the section below about Unicorn workers for information about how many you need of those.
## Database ## Database
...@@ -148,7 +148,7 @@ So for a machine with 2 cores, 3 unicorn workers is ideal. ...@@ -148,7 +148,7 @@ So for a machine with 2 cores, 3 unicorn workers is ideal.
For all machines that have 2GB and up we recommend a minimum of three unicorn workers. For all machines that have 2GB and up we recommend a minimum of three unicorn workers.
If you have a 1GB machine we recommend to configure only two Unicorn workers to prevent excessive swapping. If you have a 1GB machine we recommend to configure only two Unicorn workers to prevent excessive swapping.
To change the Unicorn workers when you have the Omnibus package please see [the Unicorn settings in the Omnibus GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/unicorn.md#unicorn-settings). To change the Unicorn workers when you have the Omnibus package (which defaults to the recommendation above) please see [the Unicorn settings in the Omnibus GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/unicorn.md#unicorn-settings).
## Redis and Sidekiq ## Redis and Sidekiq
......
...@@ -22,6 +22,7 @@ Visit the links below for details: ...@@ -22,6 +22,7 @@ Visit the links below for details:
- [Redmine](../user/project/integrations/redmine.md) - [Redmine](../user/project/integrations/redmine.md)
- [Jira](../user/project/integrations/jira.md) - [Jira](../user/project/integrations/jira.md)
- [Bugzilla](../user/project/integrations/bugzilla.md) - [Bugzilla](../user/project/integrations/bugzilla.md)
- [Custom Issue Tracker](../user/project/integrations/custom_issue_tracker.md)
### Service Template ### Service Template
......
...@@ -368,6 +368,37 @@ _Be advised that KaTeX only supports a [subset][katex-subset] of LaTeX._ ...@@ -368,6 +368,37 @@ _Be advised that KaTeX only supports a [subset][katex-subset] of LaTeX._
>**Note:** >**Note:**
This also works for the asciidoctor `:stem: latexmath`. For details see the [asciidoctor user manual][asciidoctor-manual]. This also works for the asciidoctor `:stem: latexmath`. For details see the [asciidoctor user manual][asciidoctor-manual].
### Mermaid
> If this is not rendered correctly, see
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#mermaid
It is possible to generate diagrams and flowcharts from text using [Mermaid][mermaid].
In order to generate a diagram or flowchart, you should write your text inside the `mermaid` block.
Example:
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
Becomes:
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
For details see the [Mermaid official page][mermaid].
## Standard Markdown ## Standard Markdown
### Headers ### Headers
...@@ -814,6 +845,7 @@ A link starting with a `/` is relative to the wiki root. ...@@ -814,6 +845,7 @@ A link starting with a `/` is relative to the wiki root.
[^2]: This is my awesome footnote. [^2]: This is my awesome footnote.
[markdown.md]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md [markdown.md]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md
[mermaid]: https://mermaidjs.github.io/ "Mermaid website"
[rouge]: http://rouge.jneen.net/ "Rouge website" [rouge]: http://rouge.jneen.net/ "Rouge website"
[redcarpet]: https://github.com/vmg/redcarpet "Redcarpet website" [redcarpet]: https://github.com/vmg/redcarpet "Redcarpet website"
[katex]: https://github.com/Khan/KaTeX "KaTeX website" [katex]: https://github.com/Khan/KaTeX "KaTeX website"
......
# Custom Issue Tracker Service
To enable the Custom Issue Tracker integration in a project, navigate to the
[Integrations page](project_services.md#accessing-the-project-services), click
the **Customer Issue Tracker** service, and fill in the required details on the page as described
in the table below.
| Field | Description |
| ----- | ----------- |
| `title` | A title for the issue tracker (to differentiate between instances, for example) |
| `description` | A name for the issue tracker (to differentiate between instances, for example) |
| `project_url` | Currently unused. Will be changed in a future release. |
| `issues_url` | The URL to the issue in the issue tracker project that is linked to this GitLab project. Note that the `issues_url` requires `:id` in the URL. This ID is used by GitLab as a placeholder to replace the issue number. For example, `https://customissuetracker.com/project-name/:id`. |
| `new_issue_url` | Currently unused. Will be changed in a future release. |
## Referencing issues
Issues are referenced with `#<ID>`, where `<ID>` is a number (example `#143`).
So with the example above, `#143` would refer to `https://customissuetracker.com/project-name/143`.
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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