Commit fc4618ba authored by GitLab Bot's avatar GitLab Bot

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

# Conflicts:
#	app/controllers/admin/health_check_controller.rb
#	app/models/application_setting.rb
#	db/schema.rb
#	doc/administration/monitoring/prometheus/gitlab_metrics.md
#	doc/api/settings.md
#	locale/gitlab.pot

[ci skip]
parents 57e9d641 8f13e071
......@@ -2,9 +2,13 @@
class Admin::HealthCheckController < Admin::ApplicationController
def show
<<<<<<< HEAD
checks = ['standard']
checks << 'geo' if Gitlab::Geo.secondary?
@errors = HealthCheck::Utils.process_checks(checks)
=======
@errors = HealthCheck::Utils.process_checks(['standard'])
>>>>>>> upstream/master
end
end
......@@ -5,7 +5,10 @@ class ApplicationSetting < ActiveRecord::Base
include CacheMarkdownField
include TokenAuthenticatable
include IgnorableColumn
<<<<<<< HEAD
prepend EE::ApplicationSetting
=======
>>>>>>> upstream/master
add_authentication_token_field :runners_registration_token
add_authentication_token_field :health_check_access_token
......
......@@ -177,6 +177,11 @@ ActiveRecord::Schema.define(version: 20181008200441) do
t.boolean "throttle_authenticated_web_enabled", default: false, null: false
t.integer "throttle_authenticated_web_requests_per_period", default: 7200, null: false
t.integer "throttle_authenticated_web_period_in_seconds", default: 3600, null: false
<<<<<<< HEAD
=======
t.boolean "password_authentication_enabled_for_web"
t.boolean "password_authentication_enabled_for_git", default: true
>>>>>>> upstream/master
t.integer "gitaly_timeout_default", default: 55, null: false
t.integer "gitaly_timeout_medium", default: 30, null: false
t.integer "gitaly_timeout_fast", default: 10, null: false
......
......@@ -45,7 +45,10 @@ The following metrics are available:
| redis_ping_success | Gauge | 9.4 | Whether or not the last redis ping succeeded |
| redis_ping_latency_seconds | Gauge | 9.4 | Round trip time of the redis ping |
| user_session_logins_total | Counter | 9.4 | Counter of how many users have logged in |
<<<<<<< HEAD
| upload_file_does_not_exist | Counter | 10.7 | Number of times an upload record could not find its file |
=======
>>>>>>> upstream/master
| failed_login_captcha_total | Gauge | 11.0 | Counter of failed CAPTCHA attempts during login |
| successful_login_captcha_total | Gauge | 11.0 | Counter of successful CAPTCHA attempts during login |
......
......@@ -145,7 +145,10 @@ are listed in the descriptions of the relevant settings.
| `authorized_keys_enabled` | boolean | no | By default, we write to the `authorized_keys` file to support Git over SSH without additional configuration. GitLab can be optimized to authenticate SSH keys via the database file. Only disable this if you have configured your OpenSSH server to use the AuthorizedKeysCommand. |
| `auto_devops_domain` | string | no | Specify a domain to use by default for every project's Auto Review Apps and Auto Deploy stages. |
| `auto_devops_enabled` | boolean | no | Enable Auto DevOps for projects by default. It will automatically build, test, and deploy applications based on a predefined CI/CD configuration. |
<<<<<<< HEAD
| `check_namespace_plan` | boolean | no | **(Premium)** Enabling this will make only licensed EE features available to projects if the project namespace's plan includes the feature or if the project is public. |
=======
>>>>>>> upstream/master
| `clientside_sentry_dsn` | string | required by: `clientside_sentry_enabled` | Clientside Sentry Data Source Name. |
| `clientside_sentry_enabled` | boolean | no | (**If enabled, requires:** `clientside_sentry_dsn`) Enable Sentry error reporting for the client side. |
| `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes. |
......
......@@ -156,7 +156,7 @@ the feature you contribute through all of these steps.
1. Performance/scalability implications have been considered, addressed, and tested
1. [Documented][doc-guidelines] in the `/doc` directory
1. [Changelog entry added][changelog], if necessary
1. Reviewed and any concerns are addressed
1. Reviewed by UX/FE/BE and any concerns are addressed
1. Merged by a project maintainer
1. Added to the release blog article, if relevant
1. Added to [the website](https://gitlab.com/gitlab-com/www-gitlab-com/), if relevant
......
# Style guides and linting
See the relevant style guides for our guidelines and for information on linting:
## JavaScript
We defer to [Airbnb][airbnb-js-style-guide] on most style-related
conventions and enforce them with eslint.
See [our current .eslintrc][eslintrc] for specific rules and patterns.
See [our current .eslintrc](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.eslintrc.yml) for specific rules and patterns.
### Common
......@@ -21,10 +23,10 @@ refactor an existing one, you should abide by the eslint rules.
```javascript
// bad
/* eslint-disable */
// better
/* eslint-disable some-rule, some-other-rule */
// best
// nothing :)
```
......@@ -34,14 +36,14 @@ refactor an existing one, you should abide by the eslint rules.
```javascript
// bad
/* eslint-disable no-new */
import Foo from 'foo';
new Foo();
// better
import Foo from 'foo';
// eslint-disable-next-line no-new
new Foo();
```
......@@ -58,11 +60,11 @@ followed by any global declarations, then a blank newline prior to any imports o
/* global Foo */
/* eslint-disable no-new */
import Bar from './bar';
// good
/* eslint-disable no-new */
/* global Foo */
import Bar from './bar';
```
......@@ -73,7 +75,7 @@ followed by any global declarations, then a blank newline prior to any imports o
```javascript
// bad
/* globals Flash, Cookies, jQuery */
// good
/* global Flash */
/* global Cookies */
......@@ -85,7 +87,7 @@ followed by any global declarations, then a blank newline prior to any imports o
```javascript
// bad
fn(p1, p2, p3, p4) {}
// good
fn(options) {}
```
......@@ -191,28 +193,28 @@ Do not use them anymore and feel free to remove them when refactoring legacy cod
```javascript
// bad
const values = {foo: 1};
function impureFunction(items) {
const bar = 1;
items.foo = items.a * bar + 2;
return items.a;
}
const c = impureFunction(values);
// good
var values = {foo: 1};
function pureFunction (foo) {
var bar = 1;
foo = foo * bar + 2;
return foo;
}
var c = pureFunction(values.foo);
```
......@@ -231,10 +233,10 @@ Do not use them anymore and feel free to remove them when refactoring legacy cod
document.addEventListener('click', this.handleCallback)
},
handleCallback() {
}
}
// Good
export class Foo {
constructor() {
......@@ -253,12 +255,12 @@ Do not use them anymore and feel free to remove them when refactoring legacy cod
```javascript
const users = [ { name: 'Foo' }, { name: 'Bar' } ];
// bad
users.forEach((user, index) => {
user.id = index;
});
// good
const usersWithId = users.map((user, index) => {
return Object.assign({}, user, { id: index });
......@@ -272,10 +274,10 @@ Do not use them anymore and feel free to remove them when refactoring legacy cod
```javascript
// bad
+'10' // 10
// good
Number('10') // 10
// better
parseInt('10', 10);
```
......@@ -289,7 +291,7 @@ Do not use them anymore and feel free to remove them when refactoring legacy cod
<button class="add-user">
Add User
</button>
// good
<button class="js-add-user">
Add User
......@@ -299,10 +301,12 @@ Do not use them anymore and feel free to remove them when refactoring legacy cod
### Vue.js
#### `eslint-vue-plugin`
We default to [eslint-vue-plugin][eslint-plugin-vue], with the `plugin:vue/recommended`.
Please check this [rules][eslint-plugin-vue-rules] for more documentation.
#### Basic Rules
1. The service has it's own file
1. The store has it's own file
1. Use a function in the bundle file to instantiate the Vue component:
......@@ -314,7 +318,7 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
new Component({})
}
}
// good
document.addEventListener('DOMContentLoaded', () => new Vue({
el: '#element',
......@@ -336,7 +340,7 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
}
}
}
// good
class Store {
constructor() {
......@@ -354,14 +358,14 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
```javascript
// bad
import cardBoard from 'cardBoard.vue'
components: {
cardBoard,
};
// good
import CardBoard from 'cardBoard.vue'
components: {
CardBoard,
};
......@@ -373,13 +377,13 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
```javascript
// bad
<component class="btn">
// good
<component css-class="btn">
// bad
<component myProp="prop" />
// good
<component my-prop="prop" />
```
......@@ -387,6 +391,7 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
[#34371]: https://gitlab.com/gitlab-org/gitlab-ce/issues/34371
#### Alignment
1. Follow these alignment styles for the template method:
1. With more than one attribute, all attributes should be on a new line:
......@@ -395,31 +400,31 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
// bad
<component v-if="bar"
param="baz" />
<button class="btn">Click me</button>
// good
<component
v-if="bar"
param="baz"
/>
<button class="btn">
Click me
</button>
```
1. The tag can be inline if there is only one attribute:
```javascript
// good
<component bar="bar" />
// good
<component
bar="bar"
/>
// bad
<component
bar="bar" />
......@@ -434,7 +439,7 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
template: `
<button :class='style'>Button</button>
`
// good
template: `
<button :class="style">Button</button>
......@@ -447,7 +452,7 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
```javascript
// bad
props: ['foo']
// good
props: {
foo: {
......@@ -467,7 +472,7 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
type: String,
}
}
// good
props: {
foo: {
......@@ -490,7 +495,7 @@ On those a default key should not be provided.
required: false,
}
}
// good
props: {
foo: {
......@@ -499,7 +504,7 @@ On those a default key should not be provided.
default: 'bar'
}
}
// good
props: {
foo: {
......@@ -534,7 +539,7 @@ On those a default key should not be provided.
```javascript
// bad
<component v-on:click="eventHandler"/>
// good
<component @click="eventHandler"/>
```
......@@ -544,7 +549,7 @@ On those a default key should not be provided.
```javascript
// bad
<component v-bind:class="btn"/>
// good
<component :class="btsn"/>
```
......@@ -556,7 +561,7 @@ On those a default key should not be provided.
```javascript
// bad
<component></component>
// good
<component />
```
......@@ -650,7 +655,7 @@ Useful links:
title="Some tooltip text">
Text
</span>
// good
<span
v-tooltip
......@@ -666,10 +671,10 @@ Useful links:
```javascript
// bad
<span data-original-title="tooltip text">Foo</span>
// good
<span title="tooltip text">Foo</span>
$('span').tooltip('_fixTitle');
```
......
......@@ -142,12 +142,15 @@ msgstr ""
msgid "%{name}'s avatar"
msgstr ""
<<<<<<< HEAD
msgid "%{nip_domain} can be used as an alternative to a custom domain."
msgstr ""
msgid "%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead"
msgstr ""
=======
>>>>>>> upstream/master
msgid "%{openOrClose} %{noteable}"
msgstr ""
......@@ -349,9 +352,12 @@ msgstr ""
msgid "Access expiration date"
msgstr ""
<<<<<<< HEAD
msgid "Access to '%{classification_label}' not allowed"
msgstr ""
=======
>>>>>>> upstream/master
msgid "Account"
msgstr ""
......@@ -1548,9 +1554,12 @@ msgstr ""
msgid "CiVariable|Validation failed"
msgstr ""
<<<<<<< HEAD
msgid "ClassificationLabelUnavailable|is unavailable: %{reason}"
msgstr ""
=======
>>>>>>> upstream/master
msgid "Clear search"
msgstr ""
......@@ -2129,9 +2138,12 @@ msgid "Configure push mirrors."
msgstr ""
msgid "Configure storage path settings."
<<<<<<< HEAD
msgstr ""
msgid "Configure the %{link} integration."
=======
>>>>>>> upstream/master
msgstr ""
msgid "Configure the way a user creates a new account."
......@@ -4796,9 +4808,12 @@ msgstr ""
msgid "Maven package"
msgstr ""
<<<<<<< HEAD
msgid "Max access level"
msgstr ""
=======
>>>>>>> upstream/master
msgid "Maximum job timeout"
msgstr ""
......@@ -5416,9 +5431,12 @@ msgstr ""
msgid "November"
msgstr ""
<<<<<<< HEAD
msgid "OK"
msgstr ""
=======
>>>>>>> upstream/master
msgid "Oct"
msgstr ""
......@@ -6857,6 +6875,7 @@ msgid "SearchAutocomplete|in this project"
msgstr ""
msgid "Secret"
<<<<<<< HEAD
msgstr ""
msgid "Security"
......@@ -6872,6 +6891,8 @@ msgid "SecurityDashboard|Monitor vulnerabilities in your code"
msgstr ""
msgid "SecurityDashboard|Pipeline %{pipelineLink} triggered"
=======
>>>>>>> upstream/master
msgstr ""
msgid "Select"
......@@ -7583,9 +7604,12 @@ msgstr ""
msgid "The maximum file size allowed is 200KB."
msgstr ""
<<<<<<< HEAD
msgid "The passphrase required to decrypt the private key. This is optional and the value is encrypted at rest."
msgstr ""
=======
>>>>>>> upstream/master
msgid "The path to CI config file. Defaults to <code>.gitlab-ci.yml</code>"
msgstr ""
......@@ -7679,12 +7703,15 @@ msgstr ""
msgid "There are no unstaged changes"
msgstr ""
<<<<<<< HEAD
msgid "There was an error adding a todo."
msgstr ""
msgid "There was an error deleting the todo."
msgstr ""
=======
>>>>>>> upstream/master
msgid "There was an error loading users activity calendar."
msgstr ""
......
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