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

Add latest changes from gitlab-org/gitlab@master

parent c792263e
No related branches found
No related tags found
No related merge requests found
Showing
with 132 additions and 57 deletions
Loading
Loading
@@ -74,6 +74,11 @@ const Api = {
});
},
 
groupLabels(namespace) {
const url = Api.buildUrl(Api.groupLabelsPath).replace(':namespace_path', namespace);
return axios.get(url).then(({ data }) => data);
},
// Return namespaces list. Filtered by query
namespaces(query, callback) {
const url = Api.buildUrl(Api.namespacesPath);
Loading
Loading
Loading
Loading
@@ -48,6 +48,8 @@ export default () => {
import('ee_component/analytics/cycle_analytics/components/custom_stage_form.vue'),
AddStageButton: () =>
import('ee_component/analytics/cycle_analytics/components/add_stage_button.vue'),
CustomStageFormContainer: () =>
import('ee_component/analytics/cycle_analytics/components/custom_stage_form_container.vue'),
},
mixins: [filterMixins, addStageMixin],
data() {
Loading
Loading
Loading
Loading
@@ -536,13 +536,6 @@ export const stringifyTime = (timeObject, fullNameFormat = false) => {
return reducedTime.length ? reducedTime : '0m';
};
 
/**
* Accepts a time string of any size (e.g. '1w 2d 3h 5m' or '1w 2d') and returns
* the first non-zero unit/value pair.
*/
export const abbreviateTime = timeStr =>
timeStr.split(' ').filter(unitStr => unitStr.charAt(0) !== '0')[0];
/**
* Calculates the milliseconds between now and a given date string.
* The result cannot become negative.
Loading
Loading
<script>
import { __, sprintf } from '~/locale';
import { abbreviateTime } from '~/lib/utils/datetime_utility';
import icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip';
 
Loading
Loading
@@ -41,12 +40,6 @@ export default {
},
},
computed: {
timeSpent() {
return this.abbreviateTime(this.timeSpentHumanReadable);
},
timeEstimate() {
return this.abbreviateTime(this.timeEstimateHumanReadable);
},
divClass() {
if (this.showComparisonState) {
return 'compare';
Loading
Loading
@@ -73,11 +66,11 @@ export default {
},
text() {
if (this.showComparisonState) {
return `${this.timeSpent} / ${this.timeEstimate}`;
return `${this.timeSpentHumanReadable} / ${this.timeEstimateHumanReadable}`;
} else if (this.showEstimateOnlyState) {
return `-- / ${this.timeEstimate}`;
return `-- / ${this.timeEstimateHumanReadable}`;
} else if (this.showSpentOnlyState) {
return `${this.timeSpent} / --`;
return `${this.timeSpentHumanReadable} / --`;
} else if (this.showNoTimeTrackingState) {
return __('None');
}
Loading
Loading
@@ -100,11 +93,6 @@ export default {
return this.showNoTimeTrackingState ? __('Time tracking') : this.timeTrackedTooltipText;
},
},
methods: {
abbreviateTime(timeStr) {
return abbreviateTime(timeStr);
},
},
};
</script>
 
Loading
Loading
Loading
Loading
@@ -110,7 +110,10 @@ export default {
<div class="ci-widget-container d-flex">
<div class="ci-widget-content">
<div class="media-body">
<div class="font-weight-bold js-pipeline-info-container">
<div
class="font-weight-bold js-pipeline-info-container"
data-qa-selector="merge_request_pipeline_info_content"
>
{{ pipeline.details.name }}
<gl-link :href="pipeline.path" class="pipeline-id font-weight-normal pipeline-number"
>#{{ pipeline.id }}</gl-link
Loading
Loading
import Vue from 'vue';
// see recaptcha_tags in app/views/shared/_recaptcha_form.html.haml
export const callbackName = 'recaptchaDialogCallback';
export const eventHub = new Vue();
const throwDuplicateCallbackError = () => {
throw new Error(`${callbackName} is already defined!`);
};
if (window[callbackName]) {
throwDuplicateCallbackError();
}
const callback = () => eventHub.$emit('submit');
Object.defineProperty(window, callbackName, {
get: () => callback,
set: throwDuplicateCallbackError,
});
<script>
import DeprecatedModal from './deprecated_modal.vue';
import { eventHub } from './recaptcha_eventhub';
 
export default {
name: 'RecaptchaModal',
Loading
Loading
@@ -30,14 +31,11 @@ export default {
},
 
mounted() {
if (window.recaptchaDialogCallback) {
throw new Error('recaptchaDialogCallback is already defined!');
}
window.recaptchaDialogCallback = this.submit.bind(this);
eventHub.$on('submit', this.submit);
},
 
beforeDestroy() {
window.recaptchaDialogCallback = null;
eventHub.$off('submit', this.submit);
},
 
methods: {
Loading
Loading
Loading
Loading
@@ -88,7 +88,7 @@ module BoardsHelper
end
 
def boards_link_text
if multiple_boards_available?
if current_board_parent.multiple_issue_boards_available?
s_("IssueBoards|Boards")
else
s_("IssueBoards|Board")
Loading
Loading
Loading
Loading
@@ -4,10 +4,10 @@ module Boards
module Lists
class UpdateService < Boards::BaseService
def execute(list)
return not_authorized if preferences? && !can_read?(list)
return not_authorized if position? && !can_admin?(list)
update_preferences_result = update_preferences(list) if can_read?(list)
update_position_result = update_position(list) if can_admin?(list)
 
if update_preferences(list) || update_position(list)
if update_preferences_result || update_position_result
success(list: list)
else
error(list.errors.messages, 422)
Loading
Loading
@@ -32,10 +32,6 @@ module Boards
{ collapsed: Gitlab::Utils.to_boolean(params[:collapsed]) }
end
 
def not_authorized
error("Not authorized", 403)
end
def preferences?
params.has_key?(:collapsed)
end
Loading
Loading
Loading
Loading
@@ -9,7 +9,7 @@
= _('Configure the %{link} integration.').html_safe % { link: link_to('Snowplow', 'https://snowplowanalytics.com/', target: '_blank') }
.settings-content
 
= form_for @application_setting, url: integrations_admin_application_settings_path, html: { class: 'fieldset-form' } do |f|
= form_for @application_setting, url: integrations_admin_application_settings_path(anchor: 'js-snowplow-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
 
%fieldset
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@
 
.issues-filters{ class: ("w-100" if type == :boards_modal) }
.issues-details-filters.filtered-search-block.d-flex.flex-column.flex-md-row{ class: block_css_class, "v-pre" => type == :boards_modal }
- if type == :boards && (multiple_boards_available? || current_board_parent.boards.size > 1)
- if type == :boards
= render "shared/boards/switcher", board: board
= form_tag page_filter_path, method: :get, class: 'filter-form js-filter-form w-100' do
- if params[:search].present?
Loading
Loading
---
title: Fix ordering of issue board lists not being persisted
merge_request: 17356
author:
type: fixed
---
title: Users can view the blame or history of a file with newlines in its filename.
merge_request: 17543
author: Jesse Hall @jessehall3
type: fixed
Loading
Loading
@@ -34,7 +34,7 @@ scope format: false do
# ref regex used in constraints. Regex verification now done in controller.
get 'logs_tree/*path', action: :logs_tree, as: :logs_file, format: false, constraints: {
id: /.*/,
path: /.*/
path: /[^\0]*/
}
end
end
Loading
Loading
Loading
Loading
@@ -4547,6 +4547,42 @@ msgstr ""
msgid "CustomCycleAnalytics|Add a stage"
msgstr ""
 
msgid "CustomCycleAnalytics|Add stage"
msgstr ""
msgid "CustomCycleAnalytics|Enter a name for the stage"
msgstr ""
msgid "CustomCycleAnalytics|Name"
msgstr ""
msgid "CustomCycleAnalytics|New stage"
msgstr ""
msgid "CustomCycleAnalytics|Please select a start event first"
msgstr ""
msgid "CustomCycleAnalytics|Select start event"
msgstr ""
msgid "CustomCycleAnalytics|Select stop event"
msgstr ""
msgid "CustomCycleAnalytics|Start event"
msgstr ""
msgid "CustomCycleAnalytics|Start event changed, please select a valid stop event"
msgstr ""
msgid "CustomCycleAnalytics|Start event label"
msgstr ""
msgid "CustomCycleAnalytics|Stop event"
msgstr ""
msgid "CustomCycleAnalytics|Stop event label"
msgstr ""
msgid "Customize colors"
msgstr ""
 
Loading
Loading
@@ -10208,9 +10244,6 @@ msgstr ""
msgid "New snippet"
msgstr ""
 
msgid "New stage"
msgstr ""
msgid "New subgroup"
msgstr ""
 
Loading
Loading
@@ -15698,6 +15731,9 @@ msgstr ""
msgid "There was an error fetching configuration for charts"
msgstr ""
 
msgid "There was an error fetching the form data"
msgstr ""
msgid "There was an error gathering the chart data"
msgstr ""
 
Loading
Loading
Loading
Loading
@@ -6,6 +6,16 @@ module QA
class Show < Page::Base
include Page::Component::Note
 
view 'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue' do
element :dropdown_toggle
element :download_email_patches
element :download_plain_diff
end
view 'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue' do
element :merge_request_pipeline_info_content
end
view 'app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue' do
element :merge_button
element :fast_forward_message, 'Fast-forward merge without a merge commit' # rubocop:disable QA/ElementWithPattern
Loading
Loading
@@ -27,12 +37,6 @@ module QA
element :squash_checkbox
end
 
view 'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue' do
element :dropdown_toggle
element :download_email_patches
element :download_plain_diff
end
view 'app/views/projects/merge_requests/show.html.haml' do
element :notes_tab
element :diffs_tab
Loading
Loading
@@ -111,6 +115,11 @@ module QA
end
end
 
def has_pipeline_status?(text)
# Pipelines can be slow, so we wait a bit longer than the usual 10 seconds
has_element?(:merge_request_pipeline_info_content, text: text, wait: 30)
end
def has_title?(title)
has_element?(:title, text: title)
end
Loading
Loading
Loading
Loading
@@ -11,6 +11,7 @@ module QA
 
view 'app/views/projects/edit.html.haml' do
element :advanced_settings
element :merge_request_settings
end
 
view 'app/views/projects/settings/_general.html.haml' do
Loading
Loading
@@ -41,6 +42,12 @@ module QA
end
end
 
def expand_merge_requests_settings(&block)
expand_section(:merge_request_settings) do
MergeRequest.perform(&block)
end
end
def expand_visibility_project_features_permissions(&block)
expand_section(:visibility_features_permissions_content) do
VisibilityFeaturesPermissions.perform(&block)
Loading
Loading
Loading
Loading
@@ -8,7 +8,6 @@ module QA
include Common
 
view 'app/views/projects/edit.html.haml' do
element :merge_request_settings
element :save_merge_request_changes
end
 
Loading
Loading
@@ -16,14 +15,18 @@ module QA
element :radio_button_merge_ff
end
 
def click_save_changes
click_element :save_merge_request_changes
end
def enable_ff_only
expand_section(:merge_request_settings) do
click_element :radio_button_merge_ff
click_element :save_merge_request_changes
end
click_element :radio_button_merge_ff
click_save_changes
end
end
end
end
end
end
QA::Page::Project::Settings::MergeRequest.prepend_if_ee("QA::EE::Page::Project::Settings::MergeRequest")
Loading
Loading
@@ -13,8 +13,12 @@ module QA
end
project.visit!
 
Page::Project::Menu.perform(&:click_settings)
Page::Project::Settings::MergeRequest.perform(&:enable_ff_only)
Page::Project::Menu.perform(&:go_to_general_settings)
Page::Project::Settings::Main.perform do |main|
main.expand_merge_requests_settings do |settings|
settings.enable_ff_only
end
end
 
merge_request = Resource::MergeRequest.fabricate! do |merge_request|
merge_request.project = project
Loading
Loading
Loading
Loading
@@ -162,10 +162,10 @@ describe Boards::ListsController do
end
 
context 'with unauthorized user' do
it 'returns a forbidden 403 response' do
it 'returns a 422 unprocessable entity response' do
move user: guest, board: board, list: planning, position: 6
 
expect(response).to have_gitlab_http_status(403)
expect(response).to have_gitlab_http_status(422)
end
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