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
063cafcc
Commit
063cafcc
authored
Apr 30, 2020
by
Ryan Cobb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix name collision
parent
f767c8a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
app/helpers/environments_helper.rb
app/helpers/environments_helper.rb
+7
-7
ee/app/helpers/ee/environments_helper.rb
ee/app/helpers/ee/environments_helper.rb
+5
-5
No files found.
app/helpers/environments_helper.rb
View file @
063cafcc
...
...
@@ -23,9 +23,9 @@ module EnvironmentsHelper
def
metrics_data
(
project
,
environment
)
metrics_data
=
{}
metrics_data
.
merge!
(
project_data
(
project
))
if
project
metrics_data
.
merge!
(
environment_data
(
environment
))
if
environment
metrics_data
.
merge!
(
project_and_environment_data
(
project
,
environment
))
if
project
&&
environment
metrics_data
.
merge!
(
project_
metrics_
data
(
project
))
if
project
metrics_data
.
merge!
(
environment_
metrics_
data
(
environment
))
if
environment
metrics_data
.
merge!
(
project_and_environment_
metrics_
data
(
project
,
environment
))
if
project
&&
environment
metrics_data
.
merge!
(
static_data
)
metrics_data
...
...
@@ -46,7 +46,7 @@ module EnvironmentsHelper
private
def
project_data
(
project
)
def
project_
metrics_
data
(
project
)
return
{}
unless
project
{
...
...
@@ -64,7 +64,7 @@ module EnvironmentsHelper
}
end
def
environment_data
(
environment
)
def
environment_
metrics_
data
(
environment
)
return
{}
unless
environment
{
...
...
@@ -75,7 +75,7 @@ module EnvironmentsHelper
}
end
def
project_and_environment_data
(
project
,
environment
)
def
project_and_environment_
metrics_
data
(
project
,
environment
)
return
{}
unless
project
&&
environment
{
...
...
@@ -87,7 +87,7 @@ module EnvironmentsHelper
}
end
def
static_data
def
static_
metrics_
data
{
'documentation-path'
=>
help_page_path
(
'administration/monitoring/prometheus/index.md'
),
'empty-getting-started-svg-path'
=>
image_path
(
'illustrations/monitoring/getting_started.svg'
),
...
...
ee/app/helpers/ee/environments_helper.rb
View file @
063cafcc
...
...
@@ -30,12 +30,12 @@ module EE
super
.
merge
(
ee_environments_folder_list_view_data
)
end
override
:project_data
def
project_data
(
project
)
ee_project_data
=
{}
ee_project_data
[
'logs_path'
]
=
project_logs_path
(
project
)
if
can?
(
current_user
,
:read_pod_logs
,
project
)
override
:project_
metrics_
data
def
project_
metrics_
data
(
project
)
ee_project_
metrics_
data
=
{}
ee_project_
metrics_
data
[
'logs_path'
]
=
project_logs_path
(
project
)
if
can?
(
current_user
,
:read_pod_logs
,
project
)
super
.
merge
(
ee_project_data
)
super
.
merge
(
ee_project_
metrics_
data
)
end
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