Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
038949853ce8
Commit
03894985
authored
Dec 06, 2019
by
GitLab Bot
Browse files
Add latest changes from gitlab-org/gitlab@master
parent
ecd722bcca91
Changes
46
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/monitoring/components/dashboard.vue
View file @
03894985
...
...
@@ -18,8 +18,6 @@
import
{
getParameterValues
,
mergeUrlParams
,
redirectTo
}
from
'
~/lib/utils/url_utility
'
;
import
invalidUrl
from
'
~/lib/utils/invalid_url
'
;
import
DateTimePicker
from
'
./date_time_picker/date_time_picker.vue
'
;
import
MonitorTimeSeriesChart
from
'
./charts/time_series.vue
'
;
import
MonitorSingleStatChart
from
'
./charts/single_stat.vue
'
;
import
GraphGroup
from
'
./graph_group.vue
'
;
import
EmptyState
from
'
./empty_state.vue
'
;
import
TrackEventDirective
from
'
~/vue_shared/directives/track_event
'
;
...
...
@@ -28,8 +26,6 @@
export
default
{
components
:
{
VueDraggable
,
MonitorTimeSeriesChart
,
MonitorSingleStatChart
,
PanelType
,
GraphGroup
,
EmptyState
,
...
...
app/assets/javascripts/monitoring/components/embed.vue
View file @
03894985
<
script
>
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
getParameterValues
,
removeParams
}
from
'
~/lib/utils/url_utility
'
;
import
PanelType
from
'
ee_else_ce/monitoring/components/panel_type.vue
'
;
import
GraphGroup
from
'
./graph_group.vue
'
;
...
...
@@ -4,5 +5,4 @@
import
GraphGroup
from
'
./graph_group.vue
'
;
import
MonitorTimeSeriesChart
from
'
./charts/time_series.vue
'
;
import
{
sidebarAnimationDuration
}
from
'
../constants
'
;
import
{
getTimeDiff
}
from
'
../utils
'
;
...
...
@@ -11,7 +11,7 @@
export
default
{
components
:
{
GraphGroup
,
MonitorTimeSeriesChart
,
PanelType
,
},
props
:
{
dashboardUrl
:
{
...
...
@@ -92,7 +92,7 @@
<
template
>
<div
class=
"metrics-embed"
:class=
"
{ 'd-inline-flex col-lg-6 p-0': isSingleChart }">
<div
v-if=
"charts.length"
class=
"row w-100 m-n2 pb-4"
>
<
monitor-time-series-chart
v-for=
"graphData in charts"
:key=
"
graphData.title
"
<
panel-type
v-for=
"
(
graphData
, graphIndex)
in charts"
:key=
"
`panel-type-$
{graphIndex}`
"
class="w-100"
...
...
@@ -98,2 +98,3 @@
class="w-100"
clipboard-text=""
:graph-data="graphData"
...
...
@@ -99,3 +100,2 @@
:graph-data="graphData"
:container-width=
"elWidth"
:group-id="dashboardUrl"
...
...
@@ -101,7 +101,4 @@
:group-id="dashboardUrl"
:project-path=
"null"
:show-border=
"true"
:single-embed=
"isSingleChart"
/>
</div>
</div>
...
...
app/assets/javascripts/monitoring/components/panel_type.vue
View file @
03894985
...
...
@@ -47,6 +47,11 @@
required
:
false
,
default
:
''
,
},
groupId
:
{
type
:
String
,
required
:
false
,
default
:
'
panel-type-chart
'
,
},
},
computed
:
{
...
mapState
(
'
monitoringDashboard
'
,
[
'
deploymentData
'
,
'
projectPath
'
]),
...
...
@@ -117,7 +122,7 @@
:deployment-data=
"deploymentData"
:project-path=
"projectPath"
:thresholds=
"getGraphAlertValues(graphData.metrics)"
group-id=
"
panel-type-chart
"
:
group-id=
"
groupId
"
>
<div
class=
"d-flex align-items-center"
>
<alert-widget
...
...
app/assets/javascripts/pages/snippets/show/index.js
View file @
03894985
...
...
@@ -5,11 +5,9 @@
import
snippetEmbed
from
'
~/snippet/snippet_embed
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
if
(
!
gon
.
features
.
snippetsVue
)
{
new
LineHighlighter
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
initNotes
();
new
ZenMode
();
// eslint-disable-line no-new
snippetEmbed
();
}
new
LineHighlighter
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
initNotes
();
new
ZenMode
();
// eslint-disable-line no-new
snippetEmbed
();
});
app/controllers/projects/merge_requests/diffs_controller.rb
View file @
03894985
...
...
@@ -28,6 +28,7 @@
positions
=
@merge_request
.
note_positions_for_paths
(
diffs
.
diff_file_paths
,
current_user
)
diffs
.
unfold_diff_files
(
positions
.
unfoldable
)
diffs
.
write_cache
options
=
{
merge_request:
@merge_request
,
...
...
app/mailers/emails/profile.rb
View file @
03894985
...
...
@@ -34,3 +34,5 @@
# rubocop: enable CodeReuse/ActiveRecord
end
end
Emails
::
Profile
.
prepend_if_ee
(
'EE::Emails::Profile'
)
app/models/ci/legacy_stage.rb
View file @
03894985
...
...
@@ -5,6 +5,7 @@
# We should migrate this object to actual database record in the future
class
LegacyStage
include
StaticModel
include
Presentable
attr_reader
:pipeline
,
:name
...
...
app/models/merge_request.rb
View file @
03894985
...
...
@@ -27,8 +27,6 @@
SORTING_PREFERENCE_FIELD
=
:merge_requests_sort
prepend_if_ee
(
'::EE::MergeRequest'
)
# rubocop: disable Cop/InjectEnterpriseEditionModule
belongs_to
:target_project
,
class_name:
"Project"
belongs_to
:source_project
,
class_name:
"Project"
belongs_to
:merge_user
,
class_name:
"User"
...
...
@@ -1531,3 +1529,5 @@
Gitlab
::
EtagCaching
::
Store
.
new
.
touch
(
key
)
end
end
MergeRequest
.
prepend_if_ee
(
'::EE::MergeRequest'
)
app/models/personal_access_token.rb
View file @
03894985
...
...
@@ -70,3 +70,5 @@
"gitlab:personal_access_token:
#{
user_id
}
"
end
end
PersonalAccessToken
.
prepend_if_ee
(
'EE::PersonalAccessToken'
)
app/presenters/ci/legacy_stage_presenter.rb
0 → 100644
View file @
03894985
# frozen_string_literal: true
module
Ci
class
LegacyStagePresenter
<
Gitlab
::
View
::
Presenter
::
Delegated
presents
:legacy_stage
def
latest_ordered_statuses
preload_statuses
(
legacy_stage
.
statuses
.
latest_ordered
)
end
def
retried_ordered_statuses
preload_statuses
(
legacy_stage
.
statuses
.
retried_ordered
)
end
private
def
preload_statuses
(
statuses
)
statuses
.
tap
do
|
statuses
|
# rubocop: disable CodeReuse/ActiveRecord
ActiveRecord
::
Associations
::
Preloader
.
new
.
preload
(
preloadable_statuses
(
statuses
),
:tags
)
# rubocop: enable CodeReuse/ActiveRecord
end
end
def
preloadable_statuses
(
statuses
)
statuses
.
reject
do
|
status
|
status
.
instance_of?
(
::
GenericCommitStatus
)
||
status
.
instance_of?
(
::
Ci
::
Bridge
)
end
end
end
end
app/views/admin/application_settings/_account_and_limit.html.haml
View file @
03894985
...
...
@@ -23,6 +23,9 @@
=
f
.
label
:session_expire_delay
,
_
(
'Session duration (minutes)'
),
class:
'label-light'
=
f
.
number_field
:session_expire_delay
,
class:
'form-control'
%span
.form-text.text-muted
#session_expire_delay_help_block
=
_
(
'GitLab restart is required to apply changes'
)
=
render_if_exists
'admin/application_settings/personal_access_token_expiration_policy'
,
form:
f
.form-group
=
f
.
label
:user_oauth_applications
,
_
(
'User OAuth applications'
),
class:
'label-bold'
.form-check
...
...
app/views/projects/stage/_stage.html.haml
View file @
03894985
-
stage
=
stage
.
present
(
current_user:
current_user
)
%tr
%th
{
colspan:
10
}
%strong
...
...
@@ -6,8 +8,8 @@
=
ci_icon_for_status
(
stage
.
status
)
=
stage
.
name
.
titleize
=
render
stage
.
statuses
.
latest_ordered
,
stage:
false
,
ref:
false
,
pipeline_link:
false
,
allow_retry:
true
=
render
stage
.
statuses
.
retried_ordered
,
stage:
false
,
ref:
false
,
pipeline_link:
false
,
retried:
true
=
render
stage
.
latest_ordered
_statuses
,
stage:
false
,
ref:
false
,
pipeline_link:
false
,
allow_retry:
true
=
render
stage
.
retried_ordered
_statuses
,
stage:
false
,
ref:
false
,
pipeline_link:
false
,
retried:
true
%tr
%td
{
colspan:
10
}
app/views/shared/_personal_access_tokens_form.html.haml
View file @
03894985
...
...
@@ -18,6 +18,9 @@
.form-group.col-md-6
=
f
.
label
:expires_at
,
_
(
'Expires at'
),
class:
'label-bold'
.input-icon-wrapper
=
render_if_exists
'personal_access_tokens/callout_max_personal_access_token_lifetime'
=
f
.
text_field
:expires_at
,
class:
"datepicker form-control"
,
placeholder:
'YYYY-MM-DD'
.form-group
...
...
app/views/snippets/show.html.haml
View file @
03894985
...
...
@@ -4,8 +4,5 @@
-
breadcrumb_title
@snippet
.
to_reference
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
_
(
"Snippets"
)
-
if
Feature
.
enabled?
(
:snippets_vue
)
#js-snippet-view
{
'data-qa-selector'
:
'snippet_view'
}
-
else
=
render
'shared/snippets/header'
=
render
'shared/snippets/header'
...
...
@@ -11,5 +8,5 @@
.personal-snippets
%article
.file-holder.snippet-file-content
=
render
'shared/snippets/blob'
.personal-snippets
%article
.file-holder.snippet-file-content
=
render
'shared/snippets/blob'
...
...
@@ -15,4 +12,4 @@
.row-content-block.top-block.content-component-block
=
render
'award_emoji/awards_block'
,
awardable:
@snippet
,
inline:
true
.row-content-block.top-block.content-component-block
=
render
'award_emoji/awards_block'
,
awardable:
@snippet
,
inline:
true
...
...
@@ -18,2 +15,2 @@
#notes
.limited-width-notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
false
#notes
.limited-width-notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
false
changelogs/unreleased/preserve-merge-train-rows-after-merge.yml
0 → 100644
View file @
03894985
---
title
:
Preserve merge train history
merge_request
:
19864
author
:
type
:
changed
config/sidekiq_queues.yml
View file @
03894985
...
...
@@ -123,3 +123,5 @@
- [refresh_license_compliance_checks, 2]
- [design_management_new_version, 1]
- [epics, 2]
- [personal_access_tokens, 1]
db/migrate/20190920122420_add_max_personal_access_token_lifetime_to_application_settings.rb
0 → 100644
View file @
03894985
# frozen_string_literal: true
class
AddMaxPersonalAccessTokenLifetimeToApplicationSettings
<
ActiveRecord
::
Migration
[
5.2
]
DOWNTIME
=
false
def
change
add_column
:application_settings
,
:max_personal_access_token_lifetime
,
:integer
end
end
db/migrate/20191106144901_add_state_to_merge_trains.rb
0 → 100644
View file @
03894985
# frozen_string_literal: true
class
AddStateToMergeTrains
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
MERGE_TRAIN_STATUS_CREATED
=
0
# Equivalent to MergeTrain.statuses[:created]
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_column_with_default
:merge_trains
,
:status
,
:integer
,
limit:
2
,
default:
MERGE_TRAIN_STATUS_CREATED
end
def
down
remove_column
:merge_trains
,
:status
end
end
db/migrate/20191112105448_add_index_on_personal_access_tokens_user_id_and_expires_at.rb
0 → 100644
View file @
03894985
# frozen_string_literal: true
class
AddIndexOnPersonalAccessTokensUserIdAndExpiresAt
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_pat_on_user_id_and_expires_at'
disable_ddl_transaction!
def
up
add_concurrent_index
:personal_access_tokens
,
[
:user_id
,
:expires_at
],
name:
INDEX_NAME
,
using: :btree
end
def
down
remove_concurrent_index_by_name
:personal_access_tokens
,
INDEX_NAME
end
end
db/migrate/20191118155702_add_index_on_status_to_merge_trains.rb
0 → 100644
View file @
03894985
# frozen_string_literal: true
class
AddIndexOnStatusToMergeTrains
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_for_status_per_branch_per_project'
disable_ddl_transaction!
def
up
add_concurrent_index
:merge_trains
,
[
:target_project_id
,
:target_branch
,
:status
],
name:
INDEX_NAME
remove_concurrent_index
:merge_trains
,
:target_project_id
end
def
down
add_concurrent_index
:merge_trains
,
:target_project_id
remove_concurrent_index
:merge_trains
,
[
:target_project_id
,
:target_branch
,
:status
],
name:
INDEX_NAME
end
end
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
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