Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Oct 2, 2020
1 parent 8955630 commit 91ef4dc
Show file tree
Hide file tree
Showing 50 changed files with 265 additions and 522 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { GlAlert } from '@gitlab/ui';
import { __ } from '~/locale';
import { __, sprintf } from '~/locale';
import ServiceDeskSetting from './service_desk_setting.vue';
import ServiceDeskService from '../services/service_desk_service';
import eventHub from '../event_hub';
Expand Down Expand Up @@ -122,11 +122,13 @@ export default {
this.incomingEmail = data?.service_desk_address;
this.showAlert(__('Changes were successfully made.'), 'success');
})
.catch(() =>
.catch(err => {
this.showAlert(
__('An error occurred while saving the template. Please check if the template exists.'),
),
)
sprintf(__('An error occured while making the changes: %{error}'), {
error: err?.response?.data?.message,
}),
);
})
.finally(() => {
this.isTemplateSaving = false;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { GlButton, GlFormSelect, GlToggle, GlLoadingIcon } from '@gitlab/ui';
import { GlButton, GlFormSelect, GlToggle, GlLoadingIcon, GlSprintf } from '@gitlab/ui';
import { __ } from '~/locale';
import tooltip from '~/vue_shared/directives/tooltip';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
Expand All @@ -17,6 +17,7 @@ export default {
GlFormSelect,
GlToggle,
GlLoadingIcon,
GlSprintf,
},
mixins: [glFeatureFlagsMixin()],
props: {
Expand Down Expand Up @@ -60,6 +61,7 @@ export default {
selectedTemplate: this.initialSelectedTemplate,
outgoingName: this.initialOutgoingName || __('GitLab Support Bot'),
projectKey: this.initialProjectKey,
baseEmail: this.incomingEmail.replace(this.initialProjectKey, ''),
};
},
computed: {
Expand Down Expand Up @@ -123,12 +125,33 @@ export default {
/>
</div>
</div>
<span v-if="projectKey" class="form-text text-muted">
<gl-sprintf :message="__('Emails sent to %{email} will still be supported')">
<template #email>
<code>{{ baseEmail }}</code>
</template>
</gl-sprintf>
</span>
</template>
<template v-else>
<gl-loading-icon :inline="true" />
<span class="sr-only">{{ __('Fetching incoming email') }}</span>
</template>

<template v-if="hasProjectKeySupport">
<label for="service-desk-project-suffix" class="mt-3">
{{ __('Project name suffix') }}
</label>
<input id="service-desk-project-suffix" v-model.trim="projectKey" class="form-control" />
<span class="form-text text-muted">
{{
__(
'Project name suffix is a user-defined string which will be appended to the project path, and will form the Service Desk email address.',
)
}}
</span>
</template>

<label for="service-desk-template-select" class="mt-3">
{{ __('Template to append to all Service Desk issues') }}
</label>
Expand All @@ -144,27 +167,16 @@ export default {
<span class="form-text text-muted">
{{ __('Emails sent from Service Desk will have this name') }}
</span>
<template v-if="hasProjectKeySupport">
<label for="service-desk-project-suffix" class="mt-3">
{{ __('Project name suffix') }}
</label>
<input id="service-desk-project-suffix" v-model.trim="projectKey" class="form-control" />
<span class="form-text text-muted mb-3">
{{
__(
'Project name suffix is a user-defined string which will be appended to the project path, and will form the Service Desk email address.',
)
}}
</span>
</template>
<gl-button
variant="success"
class="gl-mt-5"
:disabled="isTemplateSaving"
@click="onSaveTemplate"
>
{{ __('Save changes') }}
</gl-button>
<div class="gl-display-flex gl-justify-content-end">
<gl-button
variant="success"
class="gl-mt-5"
:disabled="isTemplateSaving"
@click="onSaveTemplate"
>
{{ __('Save changes') }}
</gl-button>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export default {
:size="12"
:title="stateTitle"
:aria-label="state"
data-testid="referenceIcon"
/>
{{ displayReference }}
</component>
Expand All @@ -105,6 +106,7 @@ export default {
:title="removeButtonLabel"
:aria-label="removeButtonLabel"
:disabled="removeDisabled"
data-testid="removeBtn"
type="button"
class="js-issue-token-remove-button"
@click="onRemoveRequest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const mixins = {
return this.isMergeRequest && this.pipelineStatus && Object.keys(this.pipelineStatus).length;
},
isOpen() {
return this.state === 'opened';
return this.state === 'opened' || this.state === 'reopened';
},
isClosed() {
return this.state === 'closed';
Expand Down
4 changes: 2 additions & 2 deletions app/models/postgresql/replication_slot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def self.in_use?
def self.lag_too_great?(max = 100.megabytes)
return false unless in_use?

lag_function = "#{Gitlab::Database.pg_wal_lsn_diff}" \
"(#{Gitlab::Database.pg_current_wal_insert_lsn}(), restart_lsn)::bigint"
lag_function = "pg_wal_lsn_diff" \
"(pg_current_wal_insert_lsn(), restart_lsn)::bigint"

# We force the use of a transaction here so the query always goes to the
# primary, even when using the EE DB load balancer.
Expand Down
1 change: 1 addition & 0 deletions app/views/projects/issues/_discussion.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- add_page_startup_api_call discussions_path(@issue)
- add_page_startup_api_call notes_url

- @gfm_form = true

Expand Down
12 changes: 6 additions & 6 deletions doc/administration/redis/replication_and_failover_external.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ which ideally should not have Redis or Sentinels in the same machine:
sentinels:
-
host: 10.0.0.1
port: 26379 # point to sentinel, not to redis port
port: 26379 # point to sentinel, not to redis port
-
host: 10.0.0.2
port: 26379 # point to sentinel, not to redis port
port: 26379 # point to sentinel, not to redis port
-
host: 10.0.0.3
port: 26379 # point to sentinel, not to redis port
port: 26379 # point to sentinel, not to redis port
```
1. [Restart GitLab](../restart_gitlab.md#installations-from-source) for the changes to take effect.
Expand Down Expand Up @@ -353,13 +353,13 @@ or a failover promotes a different **Primary** node.
sentinels:
-
host: 10.0.0.1
port: 26379 # point to sentinel, not to redis port
port: 26379 # point to sentinel, not to redis port
-
host: 10.0.0.2
port: 26379 # point to sentinel, not to redis port
port: 26379 # point to sentinel, not to redis port
-
host: 10.0.0.3
port: 26379 # point to sentinel, not to redis port
port: 26379 # point to sentinel, not to redis port
```
1. [Restart GitLab](../restart_gitlab.md#installations-from-source) for the changes to take effect.
Expand Down
6 changes: 3 additions & 3 deletions doc/administration/redis/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ production:
sentinels:
-
host: 10.0.0.1
port: 26379 # point to sentinel, not to redis port
port: 26379 # point to sentinel, not to redis port
-
host: 10.0.0.2
port: 26379 # point to sentinel, not to redis port
port: 26379 # point to sentinel, not to redis port
-
host: 10.0.0.3
port: 26379 # point to sentinel, not to redis port
port: 26379 # point to sentinel, not to redis port
```
When in doubt, read the [Redis Sentinel documentation](https://redis.io/topics/sentinel).
5 changes: 0 additions & 5 deletions doc/gitlab-geo/after_setup.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/bring-primary-back.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/configuration.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/configuration_source.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/database.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/database_source.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/disaster-recovery.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/docker_registry.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/faq.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/ha.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/object_storage.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/planned-failover.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/security-review.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/ssh.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/troubleshooting.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/tuning.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/updating_the_geo_nodes.md

This file was deleted.

5 changes: 0 additions & 5 deletions doc/gitlab-geo/using_a_geo_server.md

This file was deleted.

8 changes: 4 additions & 4 deletions doc/integration/cas.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ To enable the CAS OmniAuth provider you must register your application with your
- { name: 'cas3',
label: 'cas',
args: {
url: 'CAS_SERVER',
login_url: '/CAS_PATH/login',
service_validate_url: '/CAS_PATH/p3/serviceValidate',
logout_url: '/CAS_PATH/logout'} }
url: 'CAS_SERVER',
login_url: '/CAS_PATH/login',
service_validate_url: '/CAS_PATH/p3/serviceValidate',
logout_url: '/CAS_PATH/logout' } }
```
1. Change 'CAS_PATH' to the root of your CAS instance (ie. `cas`).
Expand Down
2 changes: 1 addition & 1 deletion doc/integration/facebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ To enable the Facebook OmniAuth provider you must register your application with

```yaml
- { name: 'facebook', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' }
app_secret: 'YOUR_APP_SECRET' }
```
1. Change 'YOUR_APP_ID' to the API key from Facebook page in step 10.
Expand Down
24 changes: 13 additions & 11 deletions doc/integration/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,18 @@ Follow these steps to incorporate the GitHub OAuth 2 app in your GitLab server:

```yaml
- { name: 'github', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
args: { scope: 'user:email' } }
app_secret: 'YOUR_APP_SECRET',
args: { scope: 'user:email' } }
```
For GitHub Enterprise:
```yaml
- { name: 'github', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
url: "https://github.example.com/",
args: { scope: 'user:email' } }
- { name: 'github',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
url: "https://github.example.com/",
args: { scope: 'user:email' } }
```
**Replace `https://github.example.com/` with your GitHub URL.**
Expand Down Expand Up @@ -125,11 +126,12 @@ omnibus_gitconfig['system'] = { "http" => ["sslVerify = false"] }
For installation from source:

```yaml
- { name: 'github', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
url: "https://github.example.com/",
verify_ssl: false,
args: { scope: 'user:email' } }
- { name: 'github',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
url: "https://github.example.com/",
verify_ssl: false,
args: { scope: 'user:email' } }
```

You will also need to disable Git SSL verification on the server hosting GitLab.
Expand Down
Loading

0 comments on commit 91ef4dc

Please sign in to comment.