Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5cc30f97
Commit
5cc30f97
authored
Jan 14, 2020
by
Kirstie Cook
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary env var and cleanup
parent
218799cf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
13 deletions
+2
-13
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+1
-1
spec/controllers/projects/environments/sample_metrics_controller_spec.rb
...s/projects/environments/sample_metrics_controller_spec.rb
+0
-11
spec/lib/gitlab/metrics/dashboard/processor_spec.rb
spec/lib/gitlab/metrics/dashboard/processor_spec.rb
+1
-1
No files found.
app/controllers/projects/environments_controller.rb
View file @
5cc30f97
...
...
@@ -223,7 +223,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController
def
metrics_dashboard_params
params
.
permit
(
:embedded
,
:group
,
:title
,
:y_label
,
:dashboard_path
,
:environment
,
:sample_metrics
)
.
merge
(
dashboard_path:
params
[
:dashboard
],
environment:
environment
,
sample_metrics:
params
[
:sample_metrics
]
)
.
merge
(
dashboard_path:
params
[
:dashboard
],
environment:
environment
)
end
def
include_all_dashboards?
...
...
spec/controllers/projects/environments/sample_metrics_controller_spec.rb
View file @
5cc30f97
...
...
@@ -9,17 +9,6 @@ describe Projects::Environments::SampleMetricsController do
let_it_be
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
before
(
:context
)
do
RSpec
::
Mocks
.
with_temporary_scope
do
stub_env
(
'USE_SAMPLE_METRICS'
,
'true'
)
Rails
.
application
.
reload_routes!
end
end
after
(
:context
)
do
Rails
.
application
.
reload_routes!
end
before
do
project
.
add_reporter
(
user
)
sign_in
(
user
)
...
...
spec/lib/gitlab/metrics/dashboard/processor_spec.rb
View file @
5cc30f97
...
...
@@ -87,7 +87,7 @@ describe Gitlab::Metrics::Dashboard::Processor do
end
end
context
'when sample
metrics are present
'
do
context
'when sample
_metrics are requested
'
do
let
(
:process_params
)
{
[
project
,
dashboard_yml
,
sequence
,
{
environment:
environment
,
sample_metrics:
true
}]
}
it
'includes a sample metrics path for the prometheus endpoint with each metric'
do
...
...
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