Skip to content
Snippets Groups Projects
Unverified Commit cfe77ce4 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Merge remote-tracking branch 'origin/master' into...

Merge remote-tracking branch 'origin/master' into camilstaps/gitlab-ce-new-66023-public-private-fork-counts
parents 934d4925 95d16dc0
No related branches found
No related tags found
No related merge requests found
Showing
with 167 additions and 72 deletions
Loading
Loading
@@ -134,6 +134,15 @@ review-stop:
artifacts:
paths: []
 
review-cleanup-failed-deployment:
extends: review-stop
stage: prepare
when: on_success
needs: []
allow_failure: false
script:
- delete_failed_release
.review-qa-base:
extends:
- .review-docker
Loading
Loading
Loading
Loading
@@ -8,7 +8,6 @@
"style": "dash"
},
"line-length": false,
"commands-show-output": false,
"no-duplicate-header": {
"allow_different_nesting": true
},
Loading
Loading
Loading
Loading
@@ -275,3 +275,8 @@ RSpec/BeSuccessMatcher:
- 'ee/spec/support/shared_examples/controllers/**/*'
- 'spec/support/controllers/**/*'
- 'ee/spec/support/controllers/**/*'
Scalability/FileUploads:
Enabled: true
Include:
- 'lib/api/**/*.rb'
- 'ee/lib/api/**/*.rb'
export default {
data() {
return {
isCustomStageForm: false,
};
},
methods: {
showAddStageForm: () => {},
hideAddStageForm: () => {},
},
};
Loading
Loading
@@ -23,7 +23,10 @@ export default {
</script>
 
<template>
<div :class="{ active: isActive }" class="stage-nav-item d-flex pl-4 pr-4 m-0 mb-1 ml-2 rounded">
<div
:class="{ active: isActive }"
class="stage-nav-item d-flex pl-4 pr-4 m-0 mb-1 ml-2 rounded border-color-default border-style-solid border-width-1px"
>
<slot></slot>
<div v-if="canEdit" class="dropdown">
<gl-button
Loading
Loading
Loading
Loading
@@ -3,6 +3,7 @@ import Vue from 'vue';
import Cookies from 'js-cookie';
import { GlEmptyState } from '@gitlab/ui';
import filterMixins from 'ee_else_ce/analytics/cycle_analytics/mixins/filter_mixins';
import addStageMixin from 'ee_else_ce/analytics/cycle_analytics/mixins/add_stage_mixin';
import Flash from '../flash';
import { __ } from '~/locale';
import Translate from '../vue_shared/translate';
Loading
Loading
@@ -43,8 +44,12 @@ export default () => {
DateRangeDropdown: () =>
import('ee_component/analytics/shared/components/date_range_dropdown.vue'),
'stage-nav-item': stageNavItem,
CustomStageForm: () =>
import('ee_component/analytics/cycle_analytics/components/custom_stage_form.vue'),
AddStageButton: () =>
import('ee_component/analytics/cycle_analytics/components/add_stage_button.vue'),
},
mixins: [filterMixins],
mixins: [filterMixins, addStageMixin],
data() {
return {
store: CycleAnalyticsStore,
Loading
Loading
@@ -124,6 +129,7 @@ export default () => {
return;
}
 
this.hideAddStageForm();
this.isLoadingStage = true;
this.store.setStageEvents([], stage);
this.store.setActiveStage(stage);
Loading
Loading
<script>
import Icon from '~/vue_shared/components/icon.vue';
export default {
components: {
Icon,
},
props: {
name: {
type: String,
Loading
Loading
@@ -15,15 +20,42 @@ export default {
required: true,
},
},
data() {
return {
showGroup: true,
};
},
computed: {
caretIcon() {
return this.collapseGroup && this.showGroup ? 'angle-down' : 'angle-right';
},
},
created() {
this.showGroup = this.collapseGroup;
},
methods: {
collapse() {
this.showGroup = !this.showGroup;
},
},
};
</script>
 
<template>
<div v-if="showPanels" class="card prometheus-panel">
<div class="card-header">
<h4>{{ name }}</h4>
<div class="card-header d-flex align-items-center">
<h4 class="flex-grow-1">{{ name }}</h4>
<a role="button" @click="collapse">
<icon :size="16" :aria-label="__('Toggle collapse')" :name="caretIcon" />
</a>
</div>
<div
v-if="collapseGroup"
v-show="collapseGroup && showGroup"
class="card-body prometheus-graph-group"
>
<slot></slot>
</div>
<div v-if="collapseGroup" class="card-body prometheus-graph-group"><slot></slot></div>
</div>
<div v-else class="prometheus-graph-group"><slot></slot></div>
</template>
Loading
Loading
@@ -67,18 +67,14 @@ export default {
saveAssignees() {
this.loading = true;
 
function setLoadingFalse() {
this.loading = false;
}
this.mediator
.saveAssignees(this.field)
.then(setLoadingFalse.bind(this))
.then(() => {
this.loading = false;
refreshUserMergeRequestCounts();
})
.catch(() => {
setLoadingFalse();
this.loading = false;
return new Flash(__('Error occurred when saving assignees'));
});
},
Loading
Loading
import Vue from 'vue';
import VueResource from 'vue-resource';
Vue.use(VueResource);
import axios from '~/lib/utils/axios_utils';
 
export default class SidebarService {
constructor(endpointMap) {
Loading
Loading
@@ -18,23 +15,15 @@ export default class SidebarService {
}
 
get() {
return Vue.http.get(this.endpoint);
return axios.get(this.endpoint);
}
 
update(key, data) {
return Vue.http.put(
this.endpoint,
{
[key]: data,
},
{
emulateJSON: true,
},
);
return axios.put(this.endpoint, { [key]: data });
}
 
getProjectsAutocomplete(searchTerm) {
return Vue.http.get(this.projectsAutocompleteEndpoint, {
return axios.get(this.projectsAutocompleteEndpoint, {
params: {
search: searchTerm,
},
Loading
Loading
@@ -42,11 +31,11 @@ export default class SidebarService {
}
 
toggleSubscription() {
return Vue.http.post(this.toggleSubscriptionEndpoint);
return axios.post(this.toggleSubscriptionEndpoint);
}
 
moveIssue(moveToProjectId) {
return Vue.http.post(this.moveIssueEndpoint, {
return axios.post(this.moveIssueEndpoint, {
move_to_project_id: moveToProjectId,
});
}
Loading
Loading
Loading
Loading
@@ -32,7 +32,10 @@ export default class SidebarMediator {
 
// If there are no ids, that means we have to unassign (which is id = 0)
// And it only accepts an array, hence [0]
return this.service.update(field, selected.length === 0 ? [0] : selected);
const assignees = selected.length === 0 ? [0] : selected;
const data = { assignee_ids: assignees };
return this.service.update(field, data);
}
 
setMoveToProjectId(projectId) {
Loading
Loading
@@ -42,8 +45,7 @@ export default class SidebarMediator {
fetch() {
return this.service
.get()
.then(response => response.json())
.then(data => {
.then(({ data }) => {
this.processFetchedData(data);
})
.catch(() => new Flash(__('Error occurred when fetching sidebar data')));
Loading
Loading
@@ -71,23 +73,17 @@ export default class SidebarMediator {
}
 
fetchAutocompleteProjects(searchTerm) {
return this.service
.getProjectsAutocomplete(searchTerm)
.then(response => response.json())
.then(data => {
this.store.setAutocompleteProjects(data);
return this.store.autocompleteProjects;
});
return this.service.getProjectsAutocomplete(searchTerm).then(({ data }) => {
this.store.setAutocompleteProjects(data);
return this.store.autocompleteProjects;
});
}
 
moveIssue() {
return this.service
.moveIssue(this.store.moveToProjectId)
.then(response => response.json())
.then(data => {
if (window.location.pathname !== data.web_url) {
visitUrl(data.web_url);
}
});
return this.service.moveIssue(this.store.moveToProjectId).then(({ data }) => {
if (window.location.pathname !== data.web_url) {
visitUrl(data.web_url);
}
});
}
}
Loading
Loading
@@ -67,6 +67,18 @@
max-height: calc(100vh - 100px);
}
 
details {
margin-bottom: $gl-padding;
summary {
margin-bottom: $gl-padding;
}
*:first-child:not(summary) {
margin-top: $gl-padding;
}
}
// Single code lines should wrap
code {
font-family: $monospace-font;
Loading
Loading
Loading
Loading
@@ -41,7 +41,6 @@
width: 20%;
}
 
.fa {
color: $cycle-analytics-light-gray;
 
Loading
Loading
@@ -146,7 +145,6 @@
 
.stage-nav-item {
line-height: 65px;
border: 1px solid $border-color;
 
&.active {
background: $blue-50;
Loading
Loading
Loading
Loading
@@ -24,12 +24,16 @@
 
.settings {
// border-top for each item except the top one
+ .settings {
border-top: 1px solid $border-color;
}
border-top: 1px solid $border-color;
 
&:first-of-type {
margin-top: 10px;
border: 0;
}
+ div .settings:first-of-type {
margin-top: 0;
border-top: 1px solid $border-color;
}
 
&.animating {
Loading
Loading
Loading
Loading
@@ -15,3 +15,9 @@
font-size: $size;
}
}
.border-width-1px { border-width: 1px; }
.border-style-dashed { border-style: dashed; }
.border-style-solid { border-style: solid; }
.border-color-blue-300 { border-color: $blue-300; }
.border-color-default { border-color: $border-color; }
Loading
Loading
@@ -103,7 +103,7 @@ module EventsHelper
words << "at"
end
 
words << event.project_name
words << event.resource_parent_name
 
words.join(" ")
end
Loading
Loading
@@ -223,3 +223,5 @@ module EventsHelper
end
end
end
EventsHelper.prepend_if_ee('EE::EventsHelper')
# frozen_string_literal: true
module ReleasesHelper
IMAGE_PATH = 'illustrations/releases.svg'
DOCUMENTATION_PATH = 'user/project/releases/index'
def illustration
image_path(IMAGE_PATH)
end
def help_page
help_page_path(DOCUMENTATION_PATH)
end
def url_for_merge_requests
project_merge_requests_url(@project, params_for_issue_and_mr_paths)
end
def url_for_issues
project_issues_url(@project, params_for_issue_and_mr_paths)
end
def data_for_releases_page
{
project_id: @project.id,
illustration_path: illustration,
documentation_path: help_page,
merge_requests_url: url_for_merge_requests,
issues_url: url_for_issues
}
end
private
def params_for_issue_and_mr_paths
{ scope: 'all', state: 'opened' }
end
end
Loading
Loading
@@ -31,15 +31,6 @@ class ApplicationSetting < ApplicationRecord
serialize :repository_storages # rubocop:disable Cop/ActiveRecordSerialize
serialize :asset_proxy_whitelist, Array # rubocop:disable Cop/ActiveRecordSerialize
 
self.ignored_columns += %i[
clientside_sentry_dsn
clientside_sentry_enabled
koding_enabled
koding_url
sentry_dsn
sentry_enabled
]
cache_markdown_field :sign_in_text
cache_markdown_field :help_page_text
cache_markdown_field :shared_runners_text, pipeline: :plain_markdown
Loading
Loading
Loading
Loading
@@ -3,6 +3,8 @@
class Event < ApplicationRecord
include Sortable
include FromUnion
include Presentable
default_scope { reorder(nil) }
 
CREATED = 1
Loading
Loading
@@ -135,6 +137,10 @@ class Event < ApplicationRecord
end
end
 
def present
super(presenter_class: ::EventPresenter)
end
# rubocop:disable Metrics/CyclomaticComplexity
# rubocop:disable Metrics/PerceivedComplexity
def visible_to_user?(user = nil)
Loading
Loading
@@ -161,12 +167,8 @@ class Event < ApplicationRecord
# rubocop:enable Metrics/PerceivedComplexity
# rubocop:enable Metrics/CyclomaticComplexity
 
def project_name
if project
project.full_name
else
"(deleted project)"
end
def resource_parent
project || group
end
 
def target_title
Loading
Loading
Loading
Loading
@@ -33,8 +33,6 @@ class Note < ApplicationRecord
end
end
 
self.ignored_columns += %i[original_discussion_id]
cache_markdown_field :note, pipeline: :note, issuable_state_filter_enabled: true
 
redact_field :note
Loading
Loading
# frozen_string_literal: true
 
class NotificationSetting < ApplicationRecord
self.ignored_columns += %i[events]
enum level: { global: 3, watch: 2, participating: 1, mention: 4, disabled: 0, custom: 5 }
 
default_value_for :level, NotificationSetting.levels[:global]
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