Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
06e3708ad3c3
Commit
cb61abb4
authored
Sep 24, 2019
by
GitLab Bot
Browse files
Add latest changes from gitlab-org/gitlab@master
parent
cb8985bf7487
Changes
58
Hide whitespace changes
Inline
Side-by-side
.eslintrc.yml
View file @
06e3708a
extends
:
-
'
@gitlab'
-
plugin:promise/recommended
globals
:
__webpack_public_path__
:
true
gl
:
false
...
...
@@ -42,6 +43,11 @@ rules:
no-jquery/no-load
:
error
no-jquery/no-load-shorthand
:
error
no-jquery/no-serialize
:
error
promise/always-return
:
off
promise/no-callback-in-promise
:
off
promise/no-nesting
:
off
promise/param-names
:
off
promise/valid-params
:
off
overrides
:
files
:
-
'
**/spec/**/*'
...
...
.gitlab/ci/global.gitlab-ci.yml
View file @
06e3708a
...
...
@@ -100,6 +100,7 @@
refs
:
-
master
-
/^\d+-\d+-auto-deploy-\d+$/
-
/^[\d-]+-stable(-ee)?$/
.only-review-schedules
:
only
:
...
...
.gitlab/ci/review.gitlab-ci.yml
View file @
06e3708a
.except-deploys
:
except
:
refs
:
-
/^[\d-]+-stable(-ee)?$/
-
/^\d+-\d+-auto-deploy-\d+$/
.review-docker
:
extends
:
-
.default-tags
-
.default-retry
-
.default-only
-
.except-deploys
image
:
registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine
services
:
-
docker:19.03.0-dind
...
...
@@ -36,6 +43,7 @@ schedule:review-cleanup:
-
.default-only
-
.only-code-qa-changes
-
.only-review-schedules
-
.except-deploys
stage
:
prepare
image
:
registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
allow_failure
:
true
...
...
@@ -52,6 +60,7 @@ schedule:review-cleanup:
extends
:
-
.default-only
-
.only-code-qa-changes
-
.except-deploys
image
:
ruby:2.6-alpine
stage
:
review-prepare
before_script
:
...
...
@@ -80,6 +89,7 @@ schedule:review-build-cng:
-
.default-retry
-
.default-only
-
.only-code-qa-changes
-
.except-deploys
stage
:
review
image
:
registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
dependencies
:
[]
...
...
@@ -257,6 +267,7 @@ parallel-spec-reports:
-
.default-only
-
.only-code-qa-changes
-
.only-review
-
.except-deploys
image
:
ruby:2.6-alpine
stage
:
post-test
dependencies
:
[
"
review-qa-all"
]
...
...
app/assets/javascripts/commons/vue.js
View file @
06e3708a
import
Vue
from
'
vue
'
;
import
GlFeatureFlagsPlugin
from
'
~/vue_shared/gl_feature_flags_plugin
'
;
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
Vue
.
config
.
productionTip
=
false
;
}
Vue
.
use
(
GlFeatureFlagsPlugin
);
app/assets/javascripts/monitoring/components/dashboard.vue
View file @
06e3708a
...
...
@@ -175,7 +175,6 @@ export default {
'
metricsWithData
'
,
'
useDashboardEndpoint
'
,
'
allDashboards
'
,
'
multipleDashboardsEnabled
'
,
'
additionalPanelTypesEnabled
'
,
]),
firstDashboard
()
{
...
...
@@ -318,7 +317,6 @@ export default {
<div
class=
"row"
>
<template
v-if=
"environmentsEndpoint"
>
<gl-form-group
v-if=
"multipleDashboardsEnabled"
:label=
"__('Dashboard')"
label-size=
"sm"
label-for=
"monitor-dashboards-dropdown"
...
...
app/assets/javascripts/monitoring/monitoring_bundle.js
View file @
06e3708a
...
...
@@ -14,7 +14,6 @@ export default (props = {}) => {
if
(
gon
.
features
)
{
store
.
dispatch
(
'
monitoringDashboard/setFeatureFlags
'
,
{
prometheusEndpointEnabled
:
gon
.
features
.
environmentMetricsUsePrometheusEndpoint
,
multipleDashboardsEnabled
:
gon
.
features
.
environmentMetricsShowMultipleDashboards
,
additionalPanelTypesEnabled
:
gon
.
features
.
environmentMetricsAdditionalPanelTypes
,
});
}
...
...
app/assets/javascripts/monitoring/stores/actions.js
View file @
06e3708a
...
...
@@ -37,10 +37,9 @@ export const setEndpoints = ({ commit }, endpoints) => {
export
const
setFeatureFlags
=
(
{
commit
},
{
prometheusEndpointEnabled
,
multipleDashboardsEnabled
,
additionalPanelTypesEnabled
},
{
prometheusEndpointEnabled
,
additionalPanelTypesEnabled
},
)
=>
{
commit
(
types
.
SET_DASHBOARD_ENABLED
,
prometheusEndpointEnabled
);
commit
(
types
.
SET_MULTIPLE_DASHBOARDS_ENABLED
,
multipleDashboardsEnabled
);
commit
(
types
.
SET_ADDITIONAL_PANEL_TYPES_ENABLED
,
additionalPanelTypesEnabled
);
};
...
...
@@ -51,13 +50,8 @@ export const setShowErrorBanner = ({ commit }, enabled) => {
export
const
requestMetricsDashboard
=
({
commit
})
=>
{
commit
(
types
.
REQUEST_METRICS_DATA
);
};
export
const
receiveMetricsDashboardSuccess
=
(
{
state
,
commit
,
dispatch
},
{
response
,
params
},
)
=>
{
if
(
state
.
multipleDashboardsEnabled
)
{
commit
(
types
.
SET_ALL_DASHBOARDS
,
response
.
all_dashboards
);
}
export
const
receiveMetricsDashboardSuccess
=
({
commit
,
dispatch
},
{
response
,
params
})
=>
{
commit
(
types
.
SET_ALL_DASHBOARDS
,
response
.
all_dashboards
);
commit
(
types
.
RECEIVE_METRICS_DATA_SUCCESS
,
response
.
dashboard
.
panel_groups
);
dispatch
(
'
fetchPrometheusMetrics
'
,
params
);
};
...
...
app/assets/javascripts/monitoring/stores/mutation_types.js
View file @
06e3708a
...
...
@@ -10,7 +10,6 @@ export const RECEIVE_ENVIRONMENTS_DATA_FAILURE = 'RECEIVE_ENVIRONMENTS_DATA_FAIL
export
const
SET_QUERY_RESULT
=
'
SET_QUERY_RESULT
'
;
export
const
SET_TIME_WINDOW
=
'
SET_TIME_WINDOW
'
;
export
const
SET_DASHBOARD_ENABLED
=
'
SET_DASHBOARD_ENABLED
'
;
export
const
SET_MULTIPLE_DASHBOARDS_ENABLED
=
'
SET_MULTIPLE_DASHBOARDS_ENABLED
'
;
export
const
SET_ADDITIONAL_PANEL_TYPES_ENABLED
=
'
SET_ADDITIONAL_PANEL_TYPES_ENABLED
'
;
export
const
SET_ALL_DASHBOARDS
=
'
SET_ALL_DASHBOARDS
'
;
export
const
SET_ENDPOINTS
=
'
SET_ENDPOINTS
'
;
...
...
app/assets/javascripts/monitoring/stores/mutations.js
View file @
06e3708a
...
...
@@ -89,9 +89,6 @@ export default {
[
types
.
SET_DASHBOARD_ENABLED
](
state
,
enabled
)
{
state
.
useDashboardEndpoint
=
enabled
;
},
[
types
.
SET_MULTIPLE_DASHBOARDS_ENABLED
](
state
,
enabled
)
{
state
.
multipleDashboardsEnabled
=
enabled
;
},
[
types
.
SET_GETTING_STARTED_EMPTY_STATE
](
state
)
{
state
.
emptyState
=
'
gettingStarted
'
;
},
...
...
app/assets/javascripts/monitoring/stores/state.js
View file @
06e3708a
...
...
@@ -8,7 +8,6 @@ export default () => ({
deploymentsEndpoint
:
null
,
dashboardEndpoint
:
invalidUrl
,
useDashboardEndpoint
:
false
,
multipleDashboardsEnabled
:
false
,
additionalPanelTypesEnabled
:
false
,
emptyState
:
'
gettingStarted
'
,
showEmptyState
:
true
,
...
...
app/assets/javascripts/users_select.js
View file @
06e3708a
...
...
@@ -7,6 +7,7 @@ import _ from 'underscore';
import
axios
from
'
./lib/utils/axios_utils
'
;
import
{
s__
,
__
,
sprintf
}
from
'
./locale
'
;
import
ModalStore
from
'
./boards/stores/modal_store
'
;
import
{
parseBoolean
}
from
'
./lib/utils/common_utils
'
;
// TODO: remove eventHub hack after code splitting refactor
window
.
emitSidebarEvent
=
window
.
emitSidebarEvent
||
$
.
noop
;
...
...
@@ -275,12 +276,13 @@ function UsersSelect(currentUser, els, options = {}) {
})
.
map
(
input
=>
{
const
userId
=
parseInt
(
input
.
value
,
10
);
const
{
avatarUrl
,
avatar_url
,
name
,
username
}
=
input
.
dataset
;
const
{
avatarUrl
,
avatar_url
,
name
,
username
,
canMerge
}
=
input
.
dataset
;
return
{
avatar_url
:
avatarUrl
||
avatar_url
,
id
:
userId
,
name
,
username
,
can_merge
:
parseBoolean
(
canMerge
),
};
});
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
View file @
06e3708a
<
script
>
import
$
from
'
jquery
'
;
import
{
__
}
from
'
~/locale
'
;
import
createFlash
from
'
~/flash
'
;
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
eventHub
from
'
../../event_hub
'
;
...
...
@@ -29,12 +31,12 @@ export default {
.
then
(
res
=>
res
.
data
)
.
then
(
data
=>
{
eventHub
.
$emit
(
'
UpdateWidgetData
'
,
data
);
new
window
.
Flash
(
'
The merge request can now be merged.
'
,
'
notice
'
);
// eslint-disable-line
create
Flash
(
__
(
'
The merge request can now be merged.
'
)
,
'
notice
'
);
$
(
'
.merge-request .detail-page-description .title
'
).
text
(
this
.
mr
.
title
);
})
.
catch
(()
=>
{
this
.
isMakingRequest
=
false
;
new
window
.
Flash
(
'
Something went wrong. Please try again.
'
);
// eslint-disable-line
create
Flash
(
__
(
'
Something went wrong. Please try again.
'
)
)
;
});
},
},
...
...
app/assets/javascripts/vue_shared/gl_feature_flags_plugin.js
0 → 100644
View file @
06e3708a
export
default
Vue
=>
{
Vue
.
mixin
({
provide
:
{
glFeatures
:
{
...((
window
.
gon
&&
window
.
gon
.
features
)
||
{})
},
},
});
};
app/assets/javascripts/vue_shared/mixins/gl_feature_flags_mixin.js
0 → 100644
View file @
06e3708a
export
default
()
=>
({
inject
:
{
glFeatures
:
{
from
:
'
glFeatures
'
,
default
:
()
=>
({}),
},
},
});
app/assets/stylesheets/pages/notes.scss
View file @
06e3708a
...
...
@@ -245,14 +245,6 @@ $note-form-margin-left: 72px;
}
}
.note-header
{
@include
notes-media
(
'max'
,
map-get
(
$grid-breakpoints
,
xs
))
{
.inline
{
display
:
block
;
}
}
}
.note-emoji-button
{
position
:
relative
;
line-height
:
1
;
...
...
@@ -635,10 +627,6 @@ $note-form-margin-left: 72px;
.note-headline-light
{
display
:
inline
;
@include
notes-media
(
'max'
,
map-get
(
$grid-breakpoints
,
xs
))
{
display
:
block
;
}
}
.note-headline-light
,
...
...
app/controllers/concerns/renders_assignees.rb
0 → 100644
View file @
06e3708a
# frozen_string_literal: true
module
RendersAssignees
def
preload_assignees_for_render
(
merge_request
)
merge_request
.
project
.
team
.
max_member_access_for_user_ids
(
merge_request
.
assignees
.
map
(
&
:id
))
end
end
app/controllers/projects/environments_controller.rb
View file @
06e3708a
...
...
@@ -12,7 +12,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController
before_action
:expire_etag_cache
,
only:
[
:index
]
before_action
only:
[
:metrics
,
:additional_metrics
,
:metrics_dashboard
]
do
push_frontend_feature_flag
(
:environment_metrics_use_prometheus_endpoint
,
default_enabled:
true
)
push_frontend_feature_flag
(
:environment_metrics_show_multiple_dashboards
)
push_frontend_feature_flag
(
:environment_metrics_additional_panel_types
)
push_frontend_feature_flag
(
:prometheus_computed_alerts
)
end
...
...
@@ -168,7 +167,7 @@ def metrics_dashboard
dashboard_path:
params
[
:dashboard
],
**
dashboard_params
.
to_h
.
symbolize_keys
)
els
if
Feature
.
enabled?
(
:environment_metrics_show_multiple_dashboards
,
project
)
els
e
result
=
dashboard_finder
.
find
(
project
,
current_user
,
...
...
@@ -177,8 +176,6 @@ def metrics_dashboard
)
result
[
:all_dashboards
]
=
dashboard_finder
.
find_all_paths
(
project
)
else
result
=
dashboard_finder
.
find
(
project
,
current_user
,
environment:
environment
)
end
respond_to
do
|
format
|
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
06e3708a
...
...
@@ -5,6 +5,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
include
IssuableActions
include
RendersNotes
include
RendersCommits
include
RendersAssignees
include
ToggleAwardEmoji
include
IssuableCollections
include
RecordUserLastActivity
...
...
@@ -41,6 +42,8 @@ def show
# use next to appease Rubocop
next
render
(
'invalid'
)
if
target_branch_missing?
preload_assignees_for_render
(
@merge_request
)
# Build a note object for comment form
@note
=
@project
.
notes
.
new
(
noteable:
@merge_request
)
...
...
app/helpers/issuables_helper.rb
View file @
06e3708a
...
...
@@ -372,6 +372,12 @@ def has_filter_bar_param?
finder
.
class
.
scalar_params
.
any?
{
|
p
|
params
[
p
].
present?
}
end
def
assignee_sidebar_data
(
assignee
,
merge_request:
nil
)
{
avatar_url:
assignee
.
avatar_url
,
name:
assignee
.
name
,
username:
assignee
.
username
}.
tap
do
|
data
|
data
[
:can_merge
]
=
merge_request
.
can_be_merged_by?
(
assignee
)
if
merge_request
end
end
private
def
sidebar_gutter_collapsed?
...
...
app/views/admin/dashboard/index.html.haml
View file @
06e3708a
...
...
@@ -40,7 +40,7 @@
.info-well
.well-segment.admin-well.admin-well-features
%h4
Features
=
feature_entry
(
_
(
'Sign up'
),
href:
admin_application_settings_path
(
anchor:
'js-signup-settings'
))
=
feature_entry
(
_
(
'Sign up'
),
href:
admin_application_settings_path
(
anchor:
'js-signup-settings'
)
,
enabled:
allow_signup?
)
=
feature_entry
(
_
(
'LDAP'
),
enabled:
Gitlab
.
config
.
ldap
.
enabled
)
=
feature_entry
(
_
(
'Gravatar'
),
href:
admin_application_settings_path
(
anchor:
'js-account-settings'
),
enabled:
gravatar_enabled?
)
=
feature_entry
(
_
(
'OmniAuth'
),
href:
admin_application_settings_path
(
anchor:
'js-signin-settings'
),
enabled:
Gitlab
::
Auth
.
omniauth_enabled?
)
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment