Skip to content
Snippets Groups Projects
Commit 775816e6 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent e98d69bc
No related branches found
No related tags found
No related merge requests found
Showing
with 154 additions and 41 deletions
Loading
Loading
@@ -249,7 +249,7 @@ gem 'asana', '~> 0.9'
gem 'ruby-fogbugz', '~> 0.2.1'
 
# Kubernetes integration
gem 'kubeclient', '~> 4.4.0'
gem 'kubeclient', '~> 4.6.0'
 
# Sanitize user input
gem 'sanitize', '~> 4.6'
Loading
Loading
Loading
Loading
@@ -286,6 +286,9 @@ GEM
fast_gettext (1.6.0)
ffaker (2.10.0)
ffi (1.11.3)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
rake
flipper (0.17.1)
flipper-active_record (0.17.1)
activerecord (>= 4.2, < 7)
Loading
Loading
@@ -493,15 +496,16 @@ GEM
html2text (0.2.0)
nokogiri (~> 1.6)
htmlentities (4.3.4)
http (3.3.0)
http (4.2.0)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 2.0)
http_parser.rb (~> 0.6.0)
http-parser (~> 1.2.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
http-form_data (2.1.1)
http_parser.rb (0.6.0)
http-parser (1.2.1)
ffi-compiler (>= 1.0, < 2.0)
httparty (0.16.4)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
Loading
Loading
@@ -557,8 +561,8 @@ GEM
kramdown (2.1.0)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
kubeclient (4.4.0)
http (~> 3.0)
kubeclient (4.6.0)
http (>= 3.0, < 5.0)
recursive-open-struct (~> 1.0, >= 1.0.4)
rest-client (~> 2.0)
launchy (2.4.3)
Loading
Loading
@@ -1247,7 +1251,7 @@ DEPENDENCIES
jwt (~> 2.1.0)
kaminari (~> 1.0)
knapsack (~> 1.17)
kubeclient (~> 4.4.0)
kubeclient (~> 4.6.0)
letter_opener_web (~> 1.3.4)
license_finder (~> 5.4)
licensee (~> 8.9)
Loading
Loading
Loading
Loading
@@ -6,21 +6,31 @@ import { __ } from '~/locale';
import { textColorForBackground } from '~/lib/utils/color_utils';
 
export default () => {
const $broadcastMessageColor = $('input#broadcast_message_color');
const $broadcastMessagePreview = $('div.broadcast-message-preview');
const $broadcastMessageColor = $('.js-broadcast-message-color');
const $broadcastMessageType = $('.js-broadcast-message-type');
const $broadcastBannerMessagePreview = $('.js-broadcast-banner-message-preview');
const $broadcastMessage = $('.js-broadcast-message-message');
const previewPath = $broadcastMessage.data('previewPath');
const $jsBroadcastMessagePreview = $('.js-broadcast-message-preview');
$broadcastMessageColor.on('input', function onMessageColorInput() {
const previewColor = $(this).val();
$broadcastMessagePreview.css('background-color', previewColor);
$broadcastBannerMessagePreview.css('background-color', previewColor);
});
 
$('input#broadcast_message_font').on('input', function onMessageFontInput() {
const previewColor = $(this).val();
$broadcastMessagePreview.css('color', previewColor);
$broadcastBannerMessagePreview.css('color', previewColor);
});
 
const $broadcastMessage = $('textarea#broadcast_message_message');
const previewPath = $broadcastMessage.data('previewPath');
const $jsBroadcastMessagePreview = $('.js-broadcast-message-preview');
$broadcastMessageType.on('change', () => {
const $broadcastMessageColorFormGroup = $('.js-broadcast-message-background-color-form-group');
const $broadcastNotificationMessagePreview = $('.js-broadcast-notification-message-preview');
$broadcastMessageColorFormGroup.toggleClass('hidden');
$broadcastBannerMessagePreview.toggleClass('hidden');
$broadcastNotificationMessagePreview.toggleClass('hidden');
});
 
$broadcastMessage.on(
'input',
Loading
Loading
@@ -58,7 +68,7 @@ export default () => {
 
$('.label-color-preview').css(selectedColorStyle);
 
return $broadcastMessagePreview.css(selectedColorStyle);
return $jsBroadcastMessagePreview.css(selectedColorStyle);
};
 
const setSuggestedColor = e => {
Loading
Loading
@@ -67,7 +77,10 @@ export default () => {
.val(color)
// Notify the form, that color has changed
.trigger('input');
updateColorPreview();
// Only banner supports colors
if ($broadcastMessageType === 'banner') {
updateColorPreview();
}
return e.preventDefault();
};
 
Loading
Loading
.broadcast-message {
@extend .alert-warning;
padding: 10px;
text-align: center;
padding: $gl-padding-8;
 
div,
p {
Loading
Loading
@@ -15,9 +13,29 @@
}
}
 
.broadcast-message-preview {
.broadcast-banner-message {
@extend .broadcast-message;
@extend .alert-warning;
text-align: center;
}
.broadcast-notification-message {
@extend .broadcast-message;
margin-bottom: 20px;
position: fixed;
bottom: $gl-padding;
right: $gl-padding;
max-width: 300px;
width: auto;
background: $white-light;
border: 1px solid $gray-200;
box-shadow: 0 1px 2px 0 rgba($black, 0.1);
border-radius: $border-radius-default;
z-index: 999;
&.preview {
position: static;
}
}
 
.toggle-colors {
Loading
Loading
Loading
Loading
@@ -22,6 +22,7 @@
min-width: $job-line-number-width;
margin-left: -$job-line-number-margin;
padding-right: 1em;
user-select: none;
 
&:hover,
&:active,
Loading
Loading
Loading
Loading
@@ -75,6 +75,7 @@ class Projects::GitHttpController < Projects::GitHttpClientController
end
 
def enqueue_fetch_statistics_update
return if Gitlab::Database.read_only?
return if repo_type.wiki?
return unless project&.daily_statistics_enabled?
 
Loading
Loading
# frozen_string_literal: true
 
module BroadcastMessagesHelper
def current_broadcast_messages
BroadcastMessage.current(request.path)
def current_broadcast_banner_messages
BroadcastMessage.current_banner_messages(request.path)
end
 
def broadcast_message(message)
def current_broadcast_notification_message
BroadcastMessage.current_notification_messages(request.path).last
end
def broadcast_message(message, opts = {})
return unless message.present?
 
content_tag :div, dir: 'auto', class: 'broadcast-message', style: broadcast_message_style(message) do
sprite_icon('bullhorn', size: 16, css_class: 'vertical-align-text-top mr-2') << ' ' << render_broadcast_message(message)
classes = "broadcast-#{message.broadcast_type}-message #{opts[:preview] && 'preview'}"
content_tag :div, dir: 'auto', class: classes, style: broadcast_message_style(message) do
concat sprite_icon('bullhorn', size: 16, css_class: 'vertical-align-text-top')
concat ' '
concat render_broadcast_message(message)
end
end
 
def broadcast_message_style(broadcast_message)
return '' if broadcast_message.notification?
style = []
 
if broadcast_message.color.present?
Loading
Loading
@@ -40,4 +50,8 @@ module BroadcastMessagesHelper
def render_broadcast_message(broadcast_message)
Banzai.render_field(broadcast_message, :message).html_safe
end
def broadcast_type_options
BroadcastMessage.broadcast_types.keys.map { |w| [w.humanize, w] }
end
end
Loading
Loading
@@ -27,7 +27,7 @@ module UserCalloutsHelper
end
 
def show_tabs_feature_highlight?
!user_dismissed?(TABS_POSITION_HIGHLIGHT) && !Rails.env.test?
current_user && !user_dismissed?(TABS_POSITION_HIGHLIGHT) && !Rails.env.test?
end
 
private
Loading
Loading
.broadcast-message-preview{ style: broadcast_message_style(@broadcast_message) }
= sprite_icon('bullhorn', size: 16, css_class:'vertical-align-text-top mr-2')
.broadcast-banner-message.js-broadcast-banner-message-preview.mt-2{ style: broadcast_message_style(@broadcast_message), class: ('hidden' unless @broadcast_message.banner? ) }
= sprite_icon('bullhorn', size: 16, css_class:'vertical-align-text-top')
.js-broadcast-message-preview
- if @broadcast_message.message.present?
= render_broadcast_message(@broadcast_message)
- else
Your message here
- if Feature.enabled?(:broadcast_notification_type)
.d-flex.justify-content-center
.broadcast-notification-message.preview.js-broadcast-notification-message-preview.mt-2{ class: ('hidden' unless @broadcast_message.notification? ) }
= sprite_icon('bullhorn', size: 16, css_class:'vertical-align-text-top')
.js-broadcast-message-preview
- if @broadcast_message.message.present?
= render_broadcast_message(@broadcast_message)
- else
Your message here
 
= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form js-quick-submit js-requires-input'} do |f|
= form_errors(@broadcast_message)
 
.form-group.row
.form-group.row.mt-4
.col-sm-2.col-form-label
= f.label :message
.col-sm-10
= f.text_area :message, class: "form-control js-autosize",
= f.text_area :message, class: "form-control js-autosize js-broadcast-message-message",
required: true,
dir: 'auto',
data: { preview_path: preview_admin_broadcast_messages_path }
.form-group.row
- if Feature.enabled?(:broadcast_notification_type)
.form-group.row
.col-sm-2.col-form-label
= f.label :broadcast_type, _('Type')
.col-sm-10
= f.select :broadcast_type, broadcast_type_options, {}, class: 'form-control js-broadcast-message-type'
.form-group.row.js-broadcast-message-background-color-form-group{ class: ('hidden' unless @broadcast_message.banner? ) }
.col-sm-2.col-form-label
= f.label :color, _("Background color")
.col-sm-10
Loading
Loading
@@ -25,7 +40,7 @@
.input-group-prepend
.input-group-text.label-color-preview{ :style => 'background-color: ' + @broadcast_message.color + '; color: ' + @broadcast_message.font }
= '&nbsp;'.html_safe
= f.text_field :color, class: "form-control"
= f.text_field :color, class: "form-control js-broadcast-message-color"
.form-text.text-muted
= _('Choose any color.')
%br
Loading
Loading
Loading
Loading
@@ -20,6 +20,7 @@
%th Starts
%th Ends
%th Target Path
%th Type
%th &nbsp;
%tbody
- @broadcast_messages.each do |message|
Loading
Loading
@@ -27,13 +28,15 @@
%td
= broadcast_message_status(message)
%td
= broadcast_message(message)
= broadcast_message(message, preview: true)
%td
= message.starts_at
%td
= message.ends_at
%td
= message.target_path
%td
= message.broadcast_type.capitalize
%td
= link_to sprite_icon('pencil-square'), edit_admin_broadcast_message_path(message), title: 'Edit', class: 'btn'
= link_to sprite_icon('remove'), admin_broadcast_message_path(message), method: :delete, remote: true, title: 'Remove', class: 'js-remove-tr btn btn-danger'
Loading
Loading
- current_broadcast_messages&.each do |message|
- current_broadcast_banner_messages.each do |message|
= broadcast_message(message)
- if Feature.enabled?(:broadcast_notification_type)
= broadcast_message(current_broadcast_notification_message)
.bs-callout.bs-callout-warning
%i.fa.fa-warning
%strong= _("Warning:")
- pages_host = Gitlab.config.pages.host
= s_("GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS.").html_safe % { pages_host: pages_host }
%strong= external_link(s_("GitLabPages|Learn more."), "https://docs.gitlab.com/ee/user/project/pages/introduction.html#limitations")
Loading
Loading
@@ -15,6 +15,7 @@
 
%hr.clearfix
 
= render 'ssl_limitations_warning' if @project.pages_subdomain.include?(".")
= render 'access'
= render 'use'
- if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https
Loading
Loading
---
title: Display SSL limitations warning for project's pages under namespace that contains
dot
merge_request: 21874
author:
type: other
---
title: Hide merge request tab popover for anonymous users
merge_request: 22613
author:
type: fixed
---
title: Prevent job log line numbers from being selected
merge_request: 22691
author:
type: fixed
---
title: Bump kubeclient version from 4.4.0 to 4.6.0
merge_request: 22347
author:
type: added
Loading
Loading
@@ -8762,6 +8762,9 @@ msgstr ""
msgid "GitLabPages|Learn how to upload your static site and have it served by GitLab by following the %{link_start}documentation on GitLab Pages%{link_end}."
msgstr ""
 
msgid "GitLabPages|Learn more."
msgstr ""
msgid "GitLabPages|Maximum size of pages (MB)"
msgstr ""
 
Loading
Loading
@@ -8798,6 +8801,9 @@ msgstr ""
msgid "GitLabPages|Verified"
msgstr ""
 
msgid "GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS."
msgstr ""
msgid "GitLabPages|With GitLab Pages you can host your static websites on GitLab. Combined with the power of GitLab CI and the help of GitLab Runner you can deploy static pages for your individual projects, your user or your group."
msgstr ""
 
Loading
Loading
@@ -20459,6 +20465,9 @@ msgstr ""
msgid "Want to see the data? Please ask an administrator for access."
msgstr ""
 
msgid "Warning:"
msgstr ""
msgid "We could not determine the path to remove the epic"
msgstr ""
 
Loading
Loading
Loading
Loading
@@ -89,6 +89,10 @@ module QA
end
 
def all_elements(name, **kwargs)
if kwargs.keys.none? { |key| [:minimum, :maximum, :count, :between].include?(key) }
raise ArgumentError, "Please use :minimum, :maximum, :count, or :between so that all is more reliable"
end
wait_for_requests
 
all(element_selector_css(name), **kwargs)
Loading
Loading
Loading
Loading
@@ -45,17 +45,17 @@ module QA
click_element :comment_button
end
 
def toggle_comments
all_elements(:toggle_comments_button).last.click
def toggle_comments(position)
all_elements(:toggle_comments_button, minimum: position)[position - 1].click
end
 
def type_reply_to_discussion(reply_text)
all_elements(:discussion_reply_tab).last.click
def type_reply_to_discussion(position, reply_text)
all_elements(:discussion_reply_tab, minimum: position)[position - 1].click
fill_element :reply_input, reply_text
end
 
def reply_to_discussion(reply_text)
type_reply_to_discussion(reply_text)
def reply_to_discussion(position, reply_text)
type_reply_to_discussion(position, reply_text)
click_element :reply_comment_button
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment