diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-13 06:07:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-13 06:07:09 +0300 |
commit | b4558e74dac09cdce238caa99f89f5ff9863815c (patch) | |
tree | 464a588b27baf646d06a11735e742ac0bc868311 /app | |
parent | 886f0a286c2b7efb048fb30199cb4d691a722cc9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
9 files changed, 70 insertions, 26 deletions
diff --git a/app/assets/javascripts/issues/show/components/incidents/timeline_events_item.vue b/app/assets/javascripts/issues/show/components/incidents/timeline_events_item.vue index bc7c7c505e0..90ee4351e39 100644 --- a/app/assets/javascripts/issues/show/components/incidents/timeline_events_item.vue +++ b/app/assets/javascripts/issues/show/components/incidents/timeline_events_item.vue @@ -1,5 +1,5 @@ <script> -import { GlDropdown, GlDropdownItem, GlIcon, GlSprintf } from '@gitlab/ui'; +import { GlDropdown, GlDropdownItem, GlIcon, GlSprintf, GlBadge } from '@gitlab/ui'; import SafeHtml from '~/vue_shared/directives/safe_html'; import { formatDate } from '~/lib/utils/datetime_utility'; import { timelineItemI18n } from './constants'; @@ -13,6 +13,7 @@ export default { GlDropdownItem, GlIcon, GlSprintf, + GlBadge, }, directives: { SafeHtml, @@ -31,6 +32,11 @@ export default { type: String, required: true, }, + eventTag: { + type: String, + required: false, + default: null, + }, }, computed: { time() { @@ -50,11 +56,16 @@ export default { <gl-icon :name="getEventIcon(action)" class="note-icon" /> </div> <div class="timeline-event-note timeline-event-border" data-testid="event-text-container"> - <strong class="gl-font-lg" data-testid="event-time"> - <gl-sprintf :message="$options.i18n.timeUTC"> - <template #time>{{ time }}</template> - </gl-sprintf> - </strong> + <div class="gl-display-flex gl-align-items-center gl-mb-3"> + <strong class="gl-font-lg" data-testid="event-time"> + <gl-sprintf :message="$options.i18n.timeUTC"> + <template #time>{{ time }}</template> + </gl-sprintf> + </strong> + <gl-badge v-if="eventTag" variant="muted" icon="tag" class="gl-ml-3"> + {{ eventTag }} + </gl-badge> + </div> <div v-safe-html="noteHtml" class="md"></div> </div> <gl-dropdown diff --git a/app/controllers/concerns/vscode_cdn_csp.rb b/app/controllers/concerns/vscode_cdn_csp.rb index 8446d237f16..dc8cea966e5 100644 --- a/app/controllers/concerns/vscode_cdn_csp.rb +++ b/app/controllers/concerns/vscode_cdn_csp.rb @@ -6,7 +6,7 @@ module VSCodeCDNCSP included do content_security_policy do |policy| - next if !Feature.enabled?(:vscode_web_ide) || policy.directives.blank? + next if policy.directives.blank? default_src = Array(policy.directives['default-src'] || []) policy.directives['frame-src'] ||= default_src diff --git a/app/serializers/issue_entity.rb b/app/serializers/issue_entity.rb index 82eef55205a..397f333008c 100644 --- a/app/serializers/issue_entity.rb +++ b/app/serializers/issue_entity.rb @@ -7,11 +7,15 @@ class IssueEntity < IssuableEntity item.try(:upcase) end + format_with(:iso8601) do |item| + item.try(:iso8601) + end + expose :state expose :milestone_id expose :updated_by_id - expose :created_at - expose :updated_at + expose :created_at, format_with: :iso8601 + expose :updated_at, format_with: :iso8601 expose :milestone, using: API::Entities::Milestone expose :labels, using: LabelEntity expose :lock_version diff --git a/app/serializers/merge_request_metrics_entity.rb b/app/serializers/merge_request_metrics_entity.rb index 1c9db08d103..ded82a9ef45 100644 --- a/app/serializers/merge_request_metrics_entity.rb +++ b/app/serializers/merge_request_metrics_entity.rb @@ -1,8 +1,12 @@ # frozen_string_literal: true class MergeRequestMetricsEntity < Grape::Entity - expose :latest_closed_at, as: :closed_at - expose :merged_at + format_with(:iso8601) do |item| + item.try(:iso8601) + end + + expose :latest_closed_at, as: :closed_at, format_with: :iso8601 + expose :merged_at, format_with: :iso8601 expose :latest_closed_by, as: :closed_by, using: UserEntity expose :merged_by, using: UserEntity end diff --git a/app/validators/json_schemas/build_report_result_data.json b/app/validators/json_schemas/build_report_result_data.json index 0a12c9c39a7..d109389a046 100644 --- a/app/validators/json_schemas/build_report_result_data.json +++ b/app/validators/json_schemas/build_report_result_data.json @@ -3,11 +3,16 @@ "description": "Build report result data", "type": "object", "properties": { - "coverage": { "type": "float" }, + "coverage": { + "type": "number", + "format": "float" + }, "tests": { "type": "object", - "items": { "$ref": "./build_report_result_data_tests.json" } + "items": { + "$ref": "./build_report_result_data_tests.json" + } } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/app/validators/json_schemas/build_report_result_data_tests.json b/app/validators/json_schemas/build_report_result_data_tests.json index 610070fde5f..3b6a2688313 100644 --- a/app/validators/json_schemas/build_report_result_data_tests.json +++ b/app/validators/json_schemas/build_report_result_data_tests.json @@ -3,12 +3,24 @@ "description": "Build report result data tests", "type": "object", "properties": { - "name": { "type": "string" }, - "duration": { "type": "string" }, - "failed": { "type": "integer" }, - "errored": { "type": "integer" }, - "skipped": { "type": "integer" }, - "success": { "type": "integer" } + "name": { + "type": "string" + }, + "duration": { + "type": "string" + }, + "failed": { + "type": "integer" + }, + "errored": { + "type": "integer" + }, + "skipped": { + "type": "integer" + }, + "success": { + "type": "integer" + } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/app/validators/json_schemas/daily_build_group_report_result_data.json b/app/validators/json_schemas/daily_build_group_report_result_data.json index 2b073506375..5b153b47b1e 100644 --- a/app/validators/json_schemas/daily_build_group_report_result_data.json +++ b/app/validators/json_schemas/daily_build_group_report_result_data.json @@ -3,7 +3,10 @@ "description": "Daily build group report result data", "type": "object", "properties": { - "coverage": { "type": "float" } + "coverage": { + "type": "number", + "format": "float" + } }, "additionalProperties": false -} +}
\ No newline at end of file diff --git a/app/views/invites/show.html.haml b/app/views/invites/show.html.haml index c1ee12bb6c8..5f65405c8bc 100644 --- a/app/views/invites/show.html.haml +++ b/app/views/invites/show.html.haml @@ -17,8 +17,10 @@ = html_escape(_("You have been invited by %{link_to_inviter} to join %{source_name} %{strong_open}%{link_to_source}%{strong_close} as %{role}")) % { link_to_inviter: link_to_inviter, source_name: @invite_details[:title], strong_open: '<strong>'.html_safe, link_to_source: link_to_source, strong_close: '</strong>'.html_safe, role: @member.human_access } .actions - = link_to _("Accept invitation"), accept_invite_url(@token), method: :post, class: "btn gl-button btn-confirm" - = link_to _("Decline"), decline_invite_url(@token), method: :post, class: "btn gl-button btn-danger gl-ml-3" + = render Pajamas::ButtonComponent.new(variant: :confirm, method: :post, href: accept_invite_url(@token)) do + = _("Accept invitation") + = render Pajamas::ButtonComponent.new(variant: :danger, method: :post, href: decline_invite_url(@token), button_options: { class: 'gl-ml-3' }) do + = _("Decline") - else %p diff --git a/app/views/jira_connect/users/show.html.haml b/app/views/jira_connect/users/show.html.haml index 569c4587f14..5db6cb44ff6 100644 --- a/app/views/jira_connect/users/show.html.haml +++ b/app/views/jira_connect/users/show.html.haml @@ -11,7 +11,10 @@ = s_('JiraService|You can now close this window and%{br}return to the GitLab for Jira application.').html_safe % { br: '<br>'.html_safe } - if @jira_app_link - %p= link_to s_('Integrations|Return to GitLab for Jira'), @jira_app_link, class: 'gl-button btn btn-confirm' + %p + = render Pajamas::ButtonComponent.new(href: @jira_app_link, variant: :confirm) do + = s_('Integrations|Return to GitLab for Jira') + %p= link_to _('Sign out'), destroy_user_session_path, method: :post |