diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-22 09:11:53 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-22 09:11:53 +0000 |
commit | 32a829445c8cd9e542acbf3168e0592ea8bdf323 (patch) | |
tree | 1f10c50090d324863f2a1f5c4f80c817abf411d1 /app | |
parent | a81524038e6dcc33493fcef5804f7f83433caf59 (diff) | |
download | gitlab-ce-32a829445c8cd9e542acbf3168e0592ea8bdf323.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
8 files changed, 36 insertions, 11 deletions
diff --git a/app/assets/javascripts/reports/codequality_report/components/codequality_issue_body.vue b/app/assets/javascripts/reports/codequality_report/components/codequality_issue_body.vue index 736c8668a34..59bd54eab60 100644 --- a/app/assets/javascripts/reports/codequality_report/components/codequality_issue_body.vue +++ b/app/assets/javascripts/reports/codequality_report/components/codequality_issue_body.vue @@ -33,17 +33,20 @@ export default { issueName() { return `${this.severityLabel} - ${this.issue.name}`; }, + issueSeverity() { + return this.issue.severity.toLowerCase(); + }, isStatusSuccess() { return this.status === STATUS_SUCCESS; }, severityClass() { - return SEVERITY_CLASSES[this.issue.severity] || SEVERITY_CLASSES.unknown; + return SEVERITY_CLASSES[this.issueSeverity] || SEVERITY_CLASSES.unknown; }, severityIcon() { - return SEVERITY_ICONS[this.issue.severity] || SEVERITY_ICONS.unknown; + return SEVERITY_ICONS[this.issueSeverity] || SEVERITY_ICONS.unknown; }, severityLabel() { - return this.$options.severityText[this.issue.severity] || this.$options.severityText.unknown; + return this.$options.severityText[this.issueSeverity] || this.$options.severityText.unknown; }, }, severityText: { diff --git a/app/assets/javascripts/reports/codequality_report/store/utils/codequality_parser.js b/app/assets/javascripts/reports/codequality_report/store/utils/codequality_parser.js index a794f5f0577..417297df43c 100644 --- a/app/assets/javascripts/reports/codequality_report/store/utils/codequality_parser.js +++ b/app/assets/javascripts/reports/codequality_report/store/utils/codequality_parser.js @@ -1,14 +1,16 @@ -export const parseCodeclimateMetrics = (issues = [], path = '') => { +export const parseCodeclimateMetrics = (issues = [], blobPath = '') => { return issues.map((issue) => { + // the `file_path` attribute from the artifact is returned as `file` by GraphQL + const issuePath = issue.file_path || issue.path; const parsedIssue = { name: issue.description, - path: issue.file_path, - urlPath: `${path}/${issue.file_path}#L${issue.line}`, + path: issuePath, + urlPath: `${blobPath}/${issuePath}#L${issue.line}`, ...issue, }; if (issue?.location?.path) { - let parseCodeQualityUrl = `${path}/${issue.location.path}`; + let parseCodeQualityUrl = `${blobPath}/${issue.location.path}`; parsedIssue.path = issue.location.path; if (issue?.location?.lines?.begin) { diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 53017beee85..ee5f4bb364a 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -17,6 +17,15 @@ module CommitsHelper commit_person_link(commit, options.merge(source: :committer)) end + def commit_committer_avatar(committer, options = {}) + user_avatar(options.merge({ + user: committer, + user_name: committer.name, + user_email: committer.email, + css_class: 'd-none d-sm-inline-block float-none gl-mr-0! gl-vertical-align-text-bottom' + })) + end + def commit_to_html(commit, ref, project) render 'projects/commits/commit.html', commit: commit, diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index a24776eb2e4..ee458d56b2a 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -178,7 +178,7 @@ module GroupsHelper end def default_help - s_("GroupSettings|This setting will be applied to all subgroups unless overridden by a group owner. Groups that already have access to the project will continue to have access unless removed manually.") + s_("GroupSettings|This setting is applied to all subgroups unless overridden by a group owner. Groups that have already been added to the project lose access.") end def ancestor_locked_but_you_can_override(group) diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 5f16b990d01..f43bbb157bb 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -10,7 +10,6 @@ class ApplicationSetting < ApplicationRecord ignore_columns %i[elasticsearch_shards elasticsearch_replicas], remove_with: '14.4', remove_after: '2021-09-22' ignore_column :seat_link_enabled, remove_with: '14.4', remove_after: '2021-09-22' - ignore_column :cloud_license_enabled, remove_with: '14.4', remove_after: '2021-09-22' INSTANCE_REVIEW_MIN_USERS = 50 GRAFANA_URL_ERROR_MESSAGE = 'Please check your Grafana URL setting in ' \ diff --git a/app/models/instance_configuration.rb b/app/models/instance_configuration.rb index 9565dae08b5..1019d845a8c 100644 --- a/app/models/instance_configuration.rb +++ b/app/models/instance_configuration.rb @@ -98,6 +98,11 @@ class InstanceConfiguration requests_per_period: application_settings[:throttle_authenticated_packages_api_requests_per_period], period_in_seconds: application_settings[:throttle_authenticated_packages_api_period_in_seconds] }, + authenticated_git_lfs_api: { + enabled: application_settings[:throttle_authenticated_git_lfs_enabled], + requests_per_period: application_settings[:throttle_authenticated_git_lfs_requests_per_period], + period_in_seconds: application_settings[:throttle_authenticated_git_lfs_period_in_seconds] + }, issue_creation: application_setting_limit_per_minute(:issues_create_limit), note_creation: application_setting_limit_per_minute(:notes_create_limit), project_export: application_setting_limit_per_minute(:project_export_limit), diff --git a/app/views/help/instance_configuration/_rate_limits.html.haml b/app/views/help/instance_configuration/_rate_limits.html.haml index d72bd845c5b..ed71b5a609c 100644 --- a/app/views/help/instance_configuration/_rate_limits.html.haml +++ b/app/views/help/instance_configuration/_rate_limits.html.haml @@ -24,6 +24,7 @@ = render 'help/instance_configuration/rate_limit_row', title: _('Protected Paths: requests'), rate_limit: rate_limits[:protected_paths] = render 'help/instance_configuration/rate_limit_row', title: _('Package Registry: unauthenticated API requests'), rate_limit: rate_limits[:unauthenticated_packages_api], public_visible: true = render 'help/instance_configuration/rate_limit_row', title: _('Package Registry: authenticated API requests'), rate_limit: rate_limits[:authenticated_packages_api] + = render 'help/instance_configuration/rate_limit_row', title: _('Authenticated Git LFS requests'), rate_limit: rate_limits[:authenticated_git_lfs_api] = render 'help/instance_configuration/rate_limit_row', title: _('Issue creation requests'), rate_limit: rate_limits[:issue_creation] = render 'help/instance_configuration/rate_limit_row', title: _('Note creation requests'), rate_limit: rate_limits[:note_creation] = render 'help/instance_configuration/rate_limit_row', title: _('Project export requests'), rate_limit: rate_limits[:project_export] diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index bc0d14743b9..62ed50f5a0c 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -39,8 +39,14 @@ .committer - commit_author_link = commit_author_link(commit, avatar: false, size: 24) - - commit_timeago = time_ago_with_tooltip(commit.authored_date, placement: 'bottom') - - commit_text = _('%{commit_author_link} authored %{commit_timeago}') % { commit_author_link: commit_author_link, commit_timeago: commit_timeago } + - commit_authored_timeago = time_ago_with_tooltip(commit.authored_date, placement: 'bottom') + - if commit.different_committer? && commit.committer + - commit_committer_link = commit_committer_link(commit) + - commit_committer_timeago = time_ago_with_tooltip(commit.committed_date, placement: 'bottom') + - commit_committer_avatar = commit_committer_avatar(commit.committer, size: 18, has_tooltip: false) + - commit_text = _('%{commit_author_link} authored %{commit_authored_timeago} and %{commit_committer_avatar} %{commit_committer_link} committed %{commit_committer_timeago}') % { commit_author_link: commit_author_link, commit_authored_timeago: commit_authored_timeago, commit_committer_avatar: commit_committer_avatar, commit_committer_link: commit_committer_link, commit_committer_timeago: commit_committer_timeago } + - else + - commit_text = _('%{commit_author_link} authored %{commit_authored_timeago}') % { commit_author_link: commit_author_link, commit_authored_timeago: commit_authored_timeago } #{ commit_text.html_safe } = render_if_exists 'projects/commits/project_namespace', show_project_name: show_project_name, project: project |