diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 18:09:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 18:09:00 +0000 |
commit | eb1f5a3e087b7d6a3e85f2724b5a475cc9d9d37d (patch) | |
tree | d572a6d931152ae0dd10427237f5811893438552 /app | |
parent | b304a72312465ed4c0a568ee6a6ea5e97f705c9b (diff) | |
download | gitlab-ce-eb1f5a3e087b7d6a3e85f2724b5a475cc9d9d37d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
11 files changed, 55 insertions, 54 deletions
diff --git a/app/assets/javascripts/error_tracking/components/error_tracking_list.vue b/app/assets/javascripts/error_tracking/components/error_tracking_list.vue index a90f446159d..70f257180c6 100644 --- a/app/assets/javascripts/error_tracking/components/error_tracking_list.vue +++ b/app/assets/javascripts/error_tracking/components/error_tracking_list.vue @@ -19,7 +19,7 @@ import AccessorUtils from '~/lib/utils/accessor'; import Icon from '~/vue_shared/components/icon.vue'; import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue'; import { __ } from '~/locale'; -import _ from 'underscore'; +import { isEmpty } from 'lodash'; export const tableDataClass = 'table-col d-flex d-sm-table-cell align-items-center'; @@ -139,7 +139,7 @@ export default { 'cursor', ]), paginationRequired() { - return !_.isEmpty(this.pagination); + return !isEmpty(this.pagination); }, }, watch: { diff --git a/app/assets/javascripts/error_tracking/components/stacktrace_entry.vue b/app/assets/javascripts/error_tracking/components/stacktrace_entry.vue index 4e63e167260..8db0b1c5da0 100644 --- a/app/assets/javascripts/error_tracking/components/stacktrace_entry.vue +++ b/app/assets/javascripts/error_tracking/components/stacktrace_entry.vue @@ -1,5 +1,5 @@ <script> -import _ from 'underscore'; +import { escape as esc } from 'lodash'; import { GlTooltip } from '@gitlab/ui'; import { __, sprintf } from '~/locale'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; @@ -62,7 +62,7 @@ export default { ? sprintf( __(`%{spanStart}in%{spanEnd} %{errorFn}`), { - errorFn: `<strong>${_.escape(this.errorFn)}</strong>`, + errorFn: `<strong>${esc(this.errorFn)}</strong>`, spanStart: `<span class="text-tertiary">`, spanEnd: `</span>`, }, diff --git a/app/assets/javascripts/mirrors/mirror_repos.js b/app/assets/javascripts/mirrors/mirror_repos.js index 33e9b1c4e46..e5acaaf9366 100644 --- a/app/assets/javascripts/mirrors/mirror_repos.js +++ b/app/assets/javascripts/mirrors/mirror_repos.js @@ -1,5 +1,5 @@ import $ from 'jquery'; -import _ from 'underscore'; +import { debounce } from 'lodash'; import { __ } from '~/locale'; import Flash from '~/flash'; import axios from '~/lib/utils/axios_utils'; @@ -62,7 +62,7 @@ export default class MirrorRepos { } registerUpdateListeners() { - this.debouncedUpdateUrl = _.debounce(() => this.updateUrl(), 200); + this.debouncedUpdateUrl = debounce(() => this.updateUrl(), 200); this.$urlInput.on('input', () => this.debouncedUpdateUrl()); this.$protectedBranchesInput.on('change', () => this.updateProtectedBranches()); this.$table.on('click', '.js-delete-mirror', event => this.deleteMirror(event)); diff --git a/app/assets/javascripts/mirrors/ssh_mirror.js b/app/assets/javascripts/mirrors/ssh_mirror.js index bb5ae6ce2d1..550e1aeeb9c 100644 --- a/app/assets/javascripts/mirrors/ssh_mirror.js +++ b/app/assets/javascripts/mirrors/ssh_mirror.js @@ -1,5 +1,5 @@ import $ from 'jquery'; -import _ from 'underscore'; +import { escape as esc } from 'lodash'; import { __ } from '~/locale'; import axios from '~/lib/utils/axios_utils'; import Flash from '~/flash'; @@ -162,7 +162,7 @@ export default class SSHMirror { const $fingerprintsList = this.$hostKeysInformation.find('.js-fingerprints-list'); let fingerprints = ''; sshHostKeys.fingerprints.forEach(fingerprint => { - const escFingerprints = _.escape(fingerprint.fingerprint); + const escFingerprints = esc(fingerprint.fingerprint); fingerprints += `<code>${escFingerprints}</code>`; }); diff --git a/app/assets/javascripts/registry/settings/components/registry_settings_app.vue b/app/assets/javascripts/registry/settings/components/registry_settings_app.vue index 2156c4469da..87e65d354bb 100644 --- a/app/assets/javascripts/registry/settings/components/registry_settings_app.vue +++ b/app/assets/javascripts/registry/settings/components/registry_settings_app.vue @@ -1,7 +1,7 @@ <script> import { mapActions, mapState } from 'vuex'; -import { GlAlert } from '@gitlab/ui'; -import { sprintf, s__ } from '~/locale'; +import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui'; +import { s__ } from '~/locale'; import { FETCH_SETTINGS_ERROR_MESSAGE } from '../../shared/constants'; @@ -11,22 +11,16 @@ export default { components: { SettingsForm, GlAlert, + GlSprintf, + GlLink, + }, + i18n: { + unavailableFeatureText: s__( + 'ContainerRegistry|Currently, the Container Registry tag expiration feature is not available for projects created before GitLab version 12.8. For updates and more information, visit Issue %{linkStart}#196124%{linkEnd}', + ), }, computed: { ...mapState(['isDisabled']), - notAvailableMessage() { - return sprintf( - s__( - 'ContainerRegistry|Currently, the Container Registry tag expiration feature is not available for projects created before GitLab version 12.8. For updates and more information, visit Issue %{linkStart}#196124%{linkEnd}', - ), - { - linkStart: - '<a href="https://gitlab.com/gitlab-org/gitlab/issues/196124" target="_blank" rel="noopener noreferrer">', - linkEnd: '</a>', - }, - false, - ); - }, }, mounted() { this.fetchSettings().catch(() => @@ -56,7 +50,15 @@ export default { </ul> <settings-form v-if="!isDisabled" /> <gl-alert v-else :dismissible="false"> - <p v-html="notAvailableMessage"></p> + <p> + <gl-sprintf :message="$options.i18n.unavailableFeatureText"> + <template #link="{content}"> + <gl-link href="https://gitlab.com/gitlab-org/gitlab/issues/196124" target="_blank"> + {{ content }} + </gl-link> + </template> + </gl-sprintf> + </p> </gl-alert> </div> </template> diff --git a/app/assets/javascripts/registry/shared/components/expiration_policy_fields.vue b/app/assets/javascripts/registry/shared/components/expiration_policy_fields.vue index a15b854cb9b..3e212f09e35 100644 --- a/app/assets/javascripts/registry/shared/components/expiration_policy_fields.vue +++ b/app/assets/javascripts/registry/shared/components/expiration_policy_fields.vue @@ -1,7 +1,7 @@ <script> import { uniqueId } from 'lodash'; -import { GlFormGroup, GlToggle, GlFormSelect, GlFormTextarea } from '@gitlab/ui'; -import { s__, __, sprintf } from '~/locale'; +import { GlFormGroup, GlToggle, GlFormSelect, GlFormTextarea, GlSprintf } from '@gitlab/ui'; +import { s__, __ } from '~/locale'; import { NAME_REGEX_LENGTH } from '../constants'; import { mapComputedToEvent } from '../utils'; @@ -11,6 +11,7 @@ export default { GlToggle, GlFormSelect, GlFormTextarea, + GlSprintf, }, props: { formOptions: { @@ -70,27 +71,6 @@ export default { policyEnabledText() { return this.enabled ? __('enabled') : __('disabled'); }, - toggleDescriptionText() { - return sprintf( - s__('ContainerRegistry|Docker tag expiration policy is %{toggleStatus}'), - { - toggleStatus: `<strong>${this.policyEnabledText}</strong>`, - }, - false, - ); - }, - regexHelpText() { - return sprintf( - s__( - 'ContainerRegistry|Wildcards such as %{codeStart}.*-stable%{codeEnd} or %{codeStart}production/.*%{codeEnd} are supported. To select all tags, use %{codeStart}.*%{codeEnd}', - ), - { - codeStart: '<code>', - codeEnd: '</code>', - }, - false, - ); - }, nameRegexState() { return this.name_regex ? this.name_regex.length <= NAME_REGEX_LENGTH : null; }, @@ -139,7 +119,15 @@ export default { v-model="enabled" :disabled="isLoading" /> - <span class="mb-2 ml-1 lh-2" v-html="toggleDescriptionText"></span> + <span class="mb-2 ml-1 lh-2"> + <gl-sprintf + :message="s__('ContainerRegistry|Docker tag expiration policy is %{toggleStatus}')" + > + <template #toggleStatus> + <strong>{{ policyEnabledText }}</strong> + </template> + </gl-sprintf> + </span> </div> </gl-form-group> @@ -190,7 +178,19 @@ export default { trim /> <template #description> - <span ref="regex-description" v-html="regexHelpText"></span> + <span ref="regex-description"> + <gl-sprintf + :message=" + s__( + 'ContainerRegistry|Wildcards such as %{codeStart}.*-stable%{codeEnd} or %{codeStart}production/.*%{codeEnd} are supported. To select all tags, use %{codeStart}.*%{codeEnd}', + ) + " + > + <template #code="{content}"> + <code>{{ content }}</code> + </template> + </gl-sprintf> + </span> </template> </gl-form-group> </div> diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 35f803302eb..b14a1179d46 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -44,7 +44,6 @@ class Projects::IssuesController < Projects::ApplicationController before_action do push_frontend_feature_flag(:vue_issuable_sidebar, project.group) - push_frontend_feature_flag(:issue_link_types, project) end around_action :allow_gitaly_ref_name_caching, only: [:discussions] diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index 939d8bc4bef..e3df61dadae 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -161,7 +161,7 @@ class DiffNote < Note def positions_complete return if self.original_position.complete? && self.position.complete? - errors.add(:position, "is invalid") + errors.add(:position, "is incomplete") end def keep_around_commits diff --git a/app/models/project_services/chat_message/base_message.rb b/app/models/project_services/chat_message/base_message.rb index 529af1277b0..5c39a80b32d 100644 --- a/app/models/project_services/chat_message/base_message.rb +++ b/app/models/project_services/chat_message/base_message.rb @@ -16,7 +16,7 @@ module ChatMessage def initialize(params) @markdown = params[:markdown] || false - @project_name = params.dig(:project, :path_with_namespace) || params[:project_name] + @project_name = params[:project_name] || params.dig(:project, :path_with_namespace) @project_url = params.dig(:project, :web_url) || params[:project_url] @user_full_name = params.dig(:user, :name) || params[:user_full_name] @user_name = params.dig(:user, :username) || params[:user_name] diff --git a/app/models/project_services/chat_notification_service.rb b/app/models/project_services/chat_notification_service.rb index b84a79453c1..46c8260ab48 100644 --- a/app/models/project_services/chat_notification_service.rb +++ b/app/models/project_services/chat_notification_service.rb @@ -157,7 +157,7 @@ class ChatNotificationService < Service end def project_name - project.full_name.gsub(/\s/, '') + project.full_name end def project_url diff --git a/app/views/projects/settings/operations/_incidents.html.haml b/app/views/projects/settings/operations/_incidents.html.haml index fa2f3d7dc08..756d4042613 100644 --- a/app/views/projects/settings/operations/_incidents.html.haml +++ b/app/views/projects/settings/operations/_incidents.html.haml @@ -2,7 +2,7 @@ - setting = project_incident_management_setting - templates = setting.available_issue_templates.map { |t| [t.name, t.key] } -%section.settings.no-animate.js-incident-management-settings +%section.settings.no-animate.qa-incident-management-settings .settings-header %h4= _('Incidents') %button.btn.js-settings-toggle{ type: 'button' } |