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
c9253c3e
Commit
c9253c3e
authored
Apr 16, 2019
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rubocop cleanup
parent
3d302879
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+1
-1
spec/services/metrics_dashboard_processing_service_spec.rb
spec/services/metrics_dashboard_processing_service_spec.rb
+3
-4
No files found.
app/controllers/projects/environments_controller.rb
View file @
c9253c3e
...
...
@@ -158,7 +158,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController
end
def
metrics_dashboard
render_403
and
return
unless
Feature
.
enabled?
(
:environment_metrics_use_prometheus_endpoint
,
project
)
render_403
&&
return
unless
Feature
.
enabled?
(
:environment_metrics_use_prometheus_endpoint
,
project
)
respond_to
do
|
format
|
format
.
json
do
...
...
spec/services/metrics_dashboard_processing_service_spec.rb
View file @
c9253c3e
...
...
@@ -21,12 +21,11 @@ describe MetricsDashboardProcessingService do
let!
(
:project_metric
)
{
create
(
:prometheus_metric
,
project:
project
)
}
it
'includes project-specific metrics'
do
project_metric_details
=
{
query_range:
project_metric
.
query
,
unit:
project_metric
.
unit
,
label:
project_metric
.
legend
,
metric_id:
project_metric
.
id
,
metric_id:
project_metric
.
id
}
expect
(
all_metrics
).
to
include
project_metric_details
...
...
@@ -41,7 +40,7 @@ describe MetricsDashboardProcessingService do
end
it
'orders groups by priority and panels by weight'
do
expected_metrics_order
=
[
'metric_b'
,
'metric_a2'
,
'metric_a1'
]
expected_metrics_order
=
%w('metric_b metric_a2 metric_a1')
actual_metrics_order
=
all_metrics
.
map
{
|
m
|
m
[
:id
]
}
expect
(
actual_metrics_order
).
to
eq
expected_metrics_order
...
...
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