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
8ec12e42
Commit
8ec12e42
authored
Jun 17, 2020
by
Ryan Cobb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up controller
parent
7eed995e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
app/controllers/projects/metrics_dashboard_controller.rb
app/controllers/projects/metrics_dashboard_controller.rb
+10
-7
No files found.
app/controllers/projects/metrics_dashboard_controller.rb
View file @
8ec12e42
...
@@ -8,13 +8,7 @@ class Projects::MetricsDashboardController < Projects::ApplicationController
...
@@ -8,13 +8,7 @@ class Projects::MetricsDashboardController < Projects::ApplicationController
end
end
def
metrics_dashboard_page
def
metrics_dashboard_page
@environment
=
if
metrics_dashboard_page_params
[
:environment
]
if
environment
project
.
environments
.
find
(
metrics_dashboard_page_params
[
:environment
])
else
project
.
default_environment
end
if
@environment
render
'projects/environments/metrics'
render
'projects/environments/metrics'
else
else
render_404
render_404
...
@@ -23,6 +17,15 @@ class Projects::MetricsDashboardController < Projects::ApplicationController
...
@@ -23,6 +17,15 @@ class Projects::MetricsDashboardController < Projects::ApplicationController
private
private
def
environment
@environment
||=
if
metrics_dashboard_page_params
[
:environment
]
project
.
environments
.
find
(
metrics_dashboard_page_params
[
:environment
])
else
project
.
default_environment
end
end
def
metrics_dashboard_page_params
def
metrics_dashboard_page_params
params
.
permit
(
:environment
)
params
.
permit
(
:environment
)
end
end
...
...
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